diff --git a/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php b/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php index 965a02e..2139dab 100644 --- a/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php +++ b/app/Http/Controllers/Admin/ManageFreeUInvestmentController.php @@ -42,6 +42,7 @@ use App\Models\ProductPhotoDocuments; use Illuminate\Support\Facades\Validator; use File; use App\Models\Company; +use App\Models\FundReturn; class ManageFreeUInvestmentController extends Controller { @@ -465,7 +466,7 @@ class ManageFreeUInvestmentController extends Controller public function updateFundProduct(Request $request) { - // dd($request->description); + // dd($request->return2019); // $request->validate([ // 'issuer' => 'required' // ]); @@ -522,6 +523,26 @@ class ManageFreeUInvestmentController extends Controller 'year3_return' => $request->year3_return, ]); + if($request->return2019 || $request->return2020 || $request->return2021 || $request->return2022 ) + { + if($request->return2019) + { + FundReturn::where(['funds_id'=>$request->fund_id,'label'=>2019])->update(['value'=>$request->return2019]); + } + if($request->return2020) + { + FundReturn::where(['funds_id'=>$request->fund_id,'label'=>2020])->update(['value'=>$request->return2020]); + } + if($request->return2021) + { + FundReturn::where(['funds_id'=>$request->fund_id,'label'=>2021])->update(['value'=>$request->return2021]); + } + if($request->return2022) + { + FundReturn::where(['funds_id'=>$request->fund_id,'label'=>2022])->update(['value'=>$request->return2022]); + } + } + $product = Product::where('id', (int)$request->product_fund_id)->first(); // dd($product); if ($request->has('presentation')) { diff --git a/resources/views/Admin/Pages/manage_freeu_investment/edit-product/funds.blade.php b/resources/views/Admin/Pages/manage_freeu_investment/edit-product/funds.blade.php index 3018391..5c35c91 100644 --- a/resources/views/Admin/Pages/manage_freeu_investment/edit-product/funds.blade.php +++ b/resources/views/Admin/Pages/manage_freeu_investment/edit-product/funds.blade.php @@ -578,6 +578,46 @@ + @if($fund->funds->returns) + @php($count = count($fund->funds->returns)) + @for($i=0; $i<($count > 3 ? 3 :$count); $i++) + {{--
+

{{$ventureCapitalFund->returns[$i]->label}}

+ {{$ventureCapitalFund->returns[$i]->value.' %'}} +
--}} +
+ + + + + + + + + + + + + +
+ @endfor + {{-- @if($count > 3) +
+ @for($i=3; $i<$count; $i++) +
+

{{$ventureCapitalFund->returns[$i]->label}}

+ {{$ventureCapitalFund->returns[$i]->value.' %'}} +
+ @endfor +
+ @endif --}} + @endif
diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/angel-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/angel-fund-product.blade.php index ac97dbf..92a1938 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/angel-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/angel-fund-product.blade.php @@ -379,11 +379,11 @@

Focused Real Estate Sectors

{{ $angelFund->focused_real_estate_sectors ?? 'N/A' }}
-
+ {{--

Trading Strategy Used

{{ $productData->trading_strategy_used ?? 'N/A' }} -
+
--}} diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/fund-for-distressed-asset-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/fund-for-distressed-asset-product.blade.php index 3921d0e..aa7dad9 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/fund-for-distressed-asset-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/fund-for-distressed-asset-product.blade.php @@ -600,13 +600,13 @@ {{ $productData->focused_real_estate_sectors ?? 'N/A' }} -
+ {{--

Trading Strategy Used

{{ $productData->trading_strategy_used ?? '-' }} -
+
--}} diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/hedge-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/hedge-fund-product.blade.php index 4070832..05568a9 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/hedge-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/hedge-fund-product.blade.php @@ -321,11 +321,10 @@ {{-- @dd($productData) --}} {{ $productData->focused_sectors_industries ?? 'N/A' }} -
+ {{--

Trading Strategy Used

- {{-- @dd($productData) --}} {{ $productData->trading_strategy_used ?? '-' }} -
+
--}} diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/infrastructure-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/infrastructure-fund-product.blade.php index 7da4d98..ab957e9 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/infrastructure-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/infrastructure-fund-product.blade.php @@ -376,10 +376,10 @@

Regions Covered (Geographical Locations covered by the fund)

{{ $infrastructureFund->regions_covered ?? 'N/A' }} -
+ {{--

Trading Strategy Used

{{ $productData->trading_strategy_used ?? '-' }} -
+
--}} diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php index f12aa89..bfa8d2a 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php @@ -348,10 +348,10 @@

Trading strategy

{{ $longOnlyEquityFund->trading_strategy ?? 'N/A' }} -
+ {{--

Trading Strategy Used

{{ $longOnlyEquityFund->trading_strategy_used ?? 'N/A' }} -
+
--}} diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/private-credit-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/private-credit-fund-product.blade.php index 4daa192..996b53c 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/private-credit-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/private-credit-fund-product.blade.php @@ -140,10 +140,10 @@

Involved in short selling

{{ $privateCreditFund->involved_in_short_selling ?? 'N/A' }}

-
+ {{--

Trading strategy used

{{ $privateCreditFund->trading_strategy_used ?? '-' }}

-
+
--}} {{--
diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/private-equity-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/private-equity-fund-product.blade.php index a47161a..fb5cc09 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/private-equity-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/private-equity-fund-product.blade.php @@ -363,10 +363,10 @@

Trading Strategy

{{ $product->trading_strategy ?? 'N/A' }}
-
+ {{--

Trading Strategy Used

{{ $product->trading_strategy_used ?? 'N/A' }} -
+
--}}

Involved In Short Selling

{{ $product->involved_in_short_selling ?? 'N/A' }} diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/private-investment-public-equity-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/private-investment-public-equity-product.blade.php index 8c2ccd2..c3f14c2 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/private-investment-public-equity-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/private-investment-public-equity-product.blade.php @@ -373,10 +373,10 @@

ISIN Code

{{ $productData->isin_code ?? 'N/A' }}
-
+ {{--

Trading Strategy Used

{{ $productData->trading_strategy_used ?? 'N/A' }} -
+
--}}
diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/private-real-estate-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/private-real-estate-fund-product.blade.php index 881a60f..b6df5df 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/private-real-estate-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/private-real-estate-fund-product.blade.php @@ -685,10 +685,10 @@

Involved In Short Selling

{{ $productData->involved_in_short_selling }} -
+ {{--

Trading Strategy Used

{{ $productData->trading_strategy_used }} -
+
--}} diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/venture-capital-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/venture-capital-fund-product.blade.php index 9371fb4..bca21d7 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/venture-capital-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/venture-capital-fund-product.blade.php @@ -399,10 +399,10 @@

Involved In Short Selling

{{ $ventureCapitalFund->involved_in_short_selling ?? "N/A" }} -
+ {{--

Trading Strategy Used

{{ $ventureCapitalFund->trading_strategy_used ?? '-' }} -
+
--}}