From 25d2b6df13bcf3da1c12645f63cd2a1d315e4d4f Mon Sep 17 00:00:00 2001 From: Ritikesh yadav Date: Tue, 18 Jun 2024 13:09:36 +0530 Subject: [PATCH] added key and value in product details api --- app/Http/Resources/AngelFundResource.php | 9 ++++++++- app/Http/Resources/FundForDistressedAssetResource.php | 11 +++++++++-- app/Http/Resources/HedgeFundResource.php | 7 +++++-- app/Http/Resources/InfrastructureFundResource.php | 10 ++++++++-- app/Http/Resources/LongOnlyEquityResource.php | 2 +- app/Http/Resources/PrivateEquityFundResource.php | 7 +++++++ .../PrivateInvestmentInPublicEquityFundResource.php | 9 ++++++++- app/Http/Resources/PrivateRealEstateFundResource.php | 10 +++++++++- app/Http/Resources/VentureCapitalFundResource.php | 3 +++ public/assets/css/FrontendCss/style.css | 2 +- 10 files changed, 59 insertions(+), 11 deletions(-) diff --git a/app/Http/Resources/AngelFundResource.php b/app/Http/Resources/AngelFundResource.php index f430aa6..7fda09e 100644 --- a/app/Http/Resources/AngelFundResource.php +++ b/app/Http/Resources/AngelFundResource.php @@ -61,7 +61,14 @@ class AngelFundResource extends JsonResource 'hurdle_rate' => $this->hurdle_rate, 'other_expenses' => $this->other_expenses, 'focused_sectors_industries' => $this->focused_sectors_industries, - 'company' => $this->companies + 'company' => $this->companies, + 'description' => Product::find($this->products_id) == null ? null : Product::where('id',$this->products_id)->value('description'), + 'isin_code' => $this->isin_code, + 'focused_funds' => $this->focused_funds, + 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, + 'valuation_per_security_nav' => $this->valuation_per_security_nav, + 'trading_strategy_used' => $this->trading_strategy_used, + 'involved_in_short_selling' => $this->involved_in_short_selling, ]; } } diff --git a/app/Http/Resources/FundForDistressedAssetResource.php b/app/Http/Resources/FundForDistressedAssetResource.php index 5222541..a396d78 100644 --- a/app/Http/Resources/FundForDistressedAssetResource.php +++ b/app/Http/Resources/FundForDistressedAssetResource.php @@ -33,7 +33,7 @@ class FundForDistressedAssetResource extends JsonResource 'fund_name' => $this->fund_name, 'slug' => $this->slug, 'isin_code' => $this->isin_code, - // 'registration_number' => $this->registration_number, + 'registration_number' => $this->registration_number, 'fund_category' => $this->fund_category, 'fund_structure' => $this->fund_structure, 'fund_strategy' => $this->fund_strategy, @@ -64,6 +64,13 @@ class FundForDistressedAssetResource extends JsonResource 'other_expenses' => $this->other_expenses, 'focused_sectors_industries' => $this->focused_sectors_industries, 'minimum_investment' => $this->minimum_investment, - 'company' => $this->companies + 'company' => $this->companies, + 'description' => Product::find($this->products_id) == null ? null : Product::where('id',$this->products_id)->value('description'), + // 'isin_code' => $this->isin_code, + 'focused_funds' => $this->focused_funds, + 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, + 'valuation_per_security_nav' => $this->valuation_per_security_nav, + 'trading_strategy_used' => $this->trading_strategy_used, + 'involved_in_short_selling' => $this->involved_in_short_selling, ]; } } diff --git a/app/Http/Resources/HedgeFundResource.php b/app/Http/Resources/HedgeFundResource.php index 61305c8..3b2fb9d 100644 --- a/app/Http/Resources/HedgeFundResource.php +++ b/app/Http/Resources/HedgeFundResource.php @@ -72,8 +72,11 @@ class HedgeFundResource extends JsonResource 'regions_covered' => $this->regions_covered, 'isin_code'=>$this->isin_code, 'focused_real_estate_sectors'=>$this->focused_real_estate_sectors, - 'rera_complied_property' =>$this->rera_complied_property, - 'return_on_investment'=>$this->return_on_investment + 'rera_complied_property' =>$this->rera_complied_property, + 'description' => Product::find($this->products_id) == null ? null : Product::where('id',$this->products_id)->value('description'), + 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, + 'valuation_per_security_nav' => $this->valuation_per_security_nav, + 'trading_strategy_used' => $this->trading_strategy_used, ]; } } diff --git a/app/Http/Resources/InfrastructureFundResource.php b/app/Http/Resources/InfrastructureFundResource.php index dd09aa0..58f2eae 100644 --- a/app/Http/Resources/InfrastructureFundResource.php +++ b/app/Http/Resources/InfrastructureFundResource.php @@ -33,7 +33,7 @@ class InfrastructureFundResource extends JsonResource 'fund_name' => $this->fund_name ?? '', 'slug' => $this->slug ?? '', 'isin_code' => $this->isin_code ?? '', - // 'registration_number' => $this->registration_number, + 'registration_number' => $this->registration_number, 'fund_category' => $this->fund_category ?? '', 'fund_structure' => $this->fund_structure ?? '', 'fund_strategy' => $this->fund_strategy ?? '', @@ -65,7 +65,13 @@ class InfrastructureFundResource extends JsonResource 'focused_sectors_industries' => $this->focused_sectors_industries ?? '', 'regions_covered' => $this->regions_covered ?? '', 'company' => $this->companies, - 'minimum_investment' => $this->minimum_investment + 'minimum_investment' => $this->minimum_investment, + 'description' => Product::find($this->products_id) == null ? null : Product::where('id',$this->products_id)->value('description'), + 'focused_funds' => $this->focused_funds, + 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, + 'valuation_per_security_nav' => $this->valuation_per_security_nav, + 'trading_strategy_used' => $this->trading_strategy_used, + 'involved_in_short_selling' => $this->involved_in_short_selling, ]; } } diff --git a/app/Http/Resources/LongOnlyEquityResource.php b/app/Http/Resources/LongOnlyEquityResource.php index a8e0f9e..eb9e578 100644 --- a/app/Http/Resources/LongOnlyEquityResource.php +++ b/app/Http/Resources/LongOnlyEquityResource.php @@ -80,7 +80,7 @@ class LongOnlyEquityResource extends JsonResource 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, 'valuation_per_security_nav' => $this->valuation_per_security_nav, 'trading_strategy_used' => $this->trading_strategy_used, - // 'product_images' => ProductImage::where('product_xid',$this->products_id)->get(), + 'description' => Product::find($this->products_id) == null ? null : Product::where('id',$this->products_id)->value('description'), ]; } } diff --git a/app/Http/Resources/PrivateEquityFundResource.php b/app/Http/Resources/PrivateEquityFundResource.php index e02a98e..5d42b8d 100644 --- a/app/Http/Resources/PrivateEquityFundResource.php +++ b/app/Http/Resources/PrivateEquityFundResource.php @@ -65,6 +65,13 @@ class PrivateEquityFundResource extends JsonResource 'regions_covered' => $this->regions_covered, 'company' => $this->companies, 'minimum_investment' => $this->minimum_investment, + 'description' => Product::find($this->products_id) == null ? null : Product::where('id',$this->products_id)->value('description'), + 'isin_code' => $this->isin_code, + 'focused_funds' => $this->focused_funds, + 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, + 'valuation_per_security_nav' => $this->valuation_per_security_nav, + 'trading_strategy_used' => $this->trading_strategy_used, + 'involved_in_short_selling' => $this->involved_in_short_selling, ]; } } diff --git a/app/Http/Resources/PrivateInvestmentInPublicEquityFundResource.php b/app/Http/Resources/PrivateInvestmentInPublicEquityFundResource.php index 30d5ac9..ccecb54 100644 --- a/app/Http/Resources/PrivateInvestmentInPublicEquityFundResource.php +++ b/app/Http/Resources/PrivateInvestmentInPublicEquityFundResource.php @@ -67,7 +67,14 @@ class PrivateInvestmentInPublicEquityFundResource extends JsonResource 'minimum_investment' => $this->minimum_investment, 'target_irr'=>$this->target_irr, 'focused_sectors_industries'=>$this->focused_sectors_industries, - 'rera_complied_property'=>$this->rera_complied_property + 'rera_complied_property'=>$this->rera_complied_property, + 'description' => Product::find($this->products_id) == null ? null : Product::where('id',$this->products_id)->value('description'), + 'isin_code' => $this->isin_code, + 'focused_funds' => $this->focused_funds, + 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, + 'valuation_per_security_nav' => $this->valuation_per_security_nav, + 'trading_strategy_used' => $this->trading_strategy_used, + 'involved_in_short_selling' => $this->involved_in_short_selling, ]; } } diff --git a/app/Http/Resources/PrivateRealEstateFundResource.php b/app/Http/Resources/PrivateRealEstateFundResource.php index 744cfbf..ba3d493 100644 --- a/app/Http/Resources/PrivateRealEstateFundResource.php +++ b/app/Http/Resources/PrivateRealEstateFundResource.php @@ -16,6 +16,7 @@ class PrivateRealEstateFundResource extends JsonResource */ public function toArray($request) { + // dd($this); $images = ProductImage::where('product_xid', $this->products_id)->get(); $imagePaths = []; if (!empty($images)) { @@ -66,7 +67,14 @@ class PrivateRealEstateFundResource extends JsonResource 'rera_complied_property' => $this->rera_complied_property, 'regions_covered' => $this->regions_covered, 'companies' => $this->companies, - 'minimum_investment' => $this->minimum_investment + 'minimum_investment' => $this->minimum_investment, + 'description' => Product::find($this->products_id) == null ? null : Product::where('id',$this->products_id)->value('description'), + 'isin_code' => $this->isin_code, + 'focused_funds' => $this->focused_funds, + 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, + 'valuation_per_security_nav' => $this->valuation_per_security_nav, + 'trading_strategy_used' => $this->trading_strategy_used, + 'involved_in_short_selling' => $this->involved_in_short_selling, ]; } } diff --git a/app/Http/Resources/VentureCapitalFundResource.php b/app/Http/Resources/VentureCapitalFundResource.php index 44b9127..0728593 100644 --- a/app/Http/Resources/VentureCapitalFundResource.php +++ b/app/Http/Resources/VentureCapitalFundResource.php @@ -76,6 +76,9 @@ class VentureCapitalFundResource extends JsonResource 'trading_strategy' => $this->trading_strategy, 'trading_strategy_used' => $this->trading_strategy_used, 'involved_in_short_selling' => $this->involved_in_short_selling, + 'description' => Product::find($this->products_id) == null ? null : Product::where('id',$this->products_id)->value('description'), + 'return_on_investment_irr_dpi_rvpi_tvpi' => $this->return_on_investment_irr_dpi_rvpi_tvpi, + 'valuation_per_security_nav' => $this->valuation_per_security_nav, ]; } diff --git a/public/assets/css/FrontendCss/style.css b/public/assets/css/FrontendCss/style.css index 4759b6d..7025bed 100644 --- a/public/assets/css/FrontendCss/style.css +++ b/public/assets/css/FrontendCss/style.css @@ -3480,7 +3480,7 @@ input:focus { .card-container .card-info p { font-size: 16px; line-height: 1.3; - text-align: left; + text-align: left !important; } .card-container .card-info img {