added update of return and removed trading strategy from product page

This commit is contained in:
Ritikesh yadav
2024-06-18 11:19:16 +05:30
parent 571e7f0041
commit 90490dfacf
12 changed files with 82 additions and 22 deletions

View File

@@ -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')) {

View File

@@ -578,6 +578,46 @@
<!--end::Input-->
</div>
@if($fund->funds->returns)
@php($count = count($fund->funds->returns))
@for($i=0; $i<($count > 3 ? 3 :$count); $i++)
{{-- <div class="col-md-4 mb-2">
<p>{{$ventureCapitalFund->returns[$i]->label}}</p>
<span>{{$ventureCapitalFund->returns[$i]->value.' %'}}</span>
</div> --}}
<div class="col-md-6 mt-4">
<!--begin::Label-->
<label class="fs-6 fw-semibold form-label mt-3">
<span class="required">{{$fund->funds->returns[$i]->label}}</span>
<!-- <i class="fas fa-exclamation-circle ms-1 fs-7" data-bs-toggle="tooltip" title="Enter the contact's name."></i> -->
</label>
<!--end::Label-->
<!--begin::Input-->
<input type="text" class="form-control form-control-solid" name="{{'return'.$fund->funds->returns[$i]->label}}" placeholder='Enter 3 Year Return' value="{{$fund->funds->returns[$i]->value}}" />
<!--end::Input-->
</div>
@endfor
{{-- @if($count > 3)
<div class="tables row">
@for($i=3; $i<$count; $i++)
<div class="col-md-4 mb-2">
<p>{{$ventureCapitalFund->returns[$i]->label}}</p>
<span>{{$ventureCapitalFund->returns[$i]->value.' %'}}</span>
</div>
@endfor
</div>
@endif --}}
@endif
<div class="col-md-6 mt-4">

View File

@@ -379,11 +379,11 @@
<p>Focused Real Estate Sectors</p>
<span>{{ $angelFund->focused_real_estate_sectors ?? 'N/A' }}</span>
</div>
<div class="col-md-6">
{{-- <div class="col-md-6">
<p>Trading Strategy Used</p>
<span>{{ $productData->trading_strategy_used ?? 'N/A' }}</span>
</div>
</div> --}}
</div>
</div>
</div>

View File

@@ -600,13 +600,13 @@
<span>{{ $productData->focused_real_estate_sectors ?? 'N/A' }}</span>
</div>
<div class="col-md-4">
{{-- <div class="col-md-4">
<p>Trading Strategy Used </p>
<span>{{ $productData->trading_strategy_used ?? '-' }}</span>
</div>
</div> --}}
</div>

View File

@@ -321,11 +321,10 @@
{{-- @dd($productData) --}}
<span>{{ $productData->focused_sectors_industries ?? 'N/A' }}</span>
</div>
<div class="col-md-4">
{{-- <div class="col-md-4">
<p>Trading Strategy Used</p>
{{-- @dd($productData) --}}
<span>{{ $productData->trading_strategy_used ?? '-' }}</span>
</div>
</div> --}}
</div>
</div>
</div>

View File

@@ -376,10 +376,10 @@
<p>Regions Covered (Geographical Locations covered by the fund)</p>
<span>{{ $infrastructureFund->regions_covered ?? 'N/A' }}</span>
</div>
<div class="col-md-6">
{{-- <div class="col-md-6">
<p>Trading Strategy Used</p>
<span>{{ $productData->trading_strategy_used ?? '-' }}</span>
</div>
</div> --}}
</div>
</div>
</div>

View File

@@ -348,10 +348,10 @@
<p>Trading strategy</p>
<span>{{ $longOnlyEquityFund->trading_strategy ?? 'N/A' }}</span>
</div>
<div class="col-md-4">
{{-- <div class="col-md-4">
<p>Trading Strategy Used</p>
<span>{{ $longOnlyEquityFund->trading_strategy_used ?? 'N/A' }}</span>
</div>
</div> --}}
</div>
</div>
</div>

View File

@@ -140,10 +140,10 @@
<p>Involved in short selling</p>
<h4>{{ $privateCreditFund->involved_in_short_selling ?? 'N/A' }}</h4>
</div>
<div class="col-md-4">
{{-- <div class="col-md-4">
<p>Trading strategy used</p>
<h4>{{ $privateCreditFund->trading_strategy_used ?? '-' }}</h4>
</div>
</div> --}}
</div>
{{-- <div class="tables row">
<div class="col-md-4">

View File

@@ -363,10 +363,10 @@
<p>Trading Strategy</p>
<span>{{ $product->trading_strategy ?? 'N/A' }}</span>
</div>
<div class="col-md-4">
{{-- <div class="col-md-4">
<p>Trading Strategy Used</p>
<span>{{ $product->trading_strategy_used ?? 'N/A' }}</span>
</div>
</div> --}}
<div class="col-md-4">
<p>Involved In Short Selling</p>
<span>{{ $product->involved_in_short_selling ?? 'N/A' }}</span>

View File

@@ -373,10 +373,10 @@
<p>ISIN Code</p>
<span>{{ $productData->isin_code ?? 'N/A' }}</span>
</div>
<div class="col-md-4">
{{-- <div class="col-md-4">
<p>Trading Strategy Used</p>
<span>{{ $productData->trading_strategy_used ?? 'N/A' }}</span>
</div>
</div> --}}
</div>
</div>
</div>

View File

@@ -685,10 +685,10 @@
<p>Involved In Short Selling</p>
<span>{{ $productData->involved_in_short_selling }}</span>
</div>
<div class="col-md-4" >
{{-- <div class="col-md-4" >
<p>Trading Strategy Used</p>
<span>{{ $productData->trading_strategy_used }}</span>
</div>
</div> --}}
</div>
</div>

View File

@@ -399,10 +399,10 @@
<p>Involved In Short Selling</p>
<span>{{ $ventureCapitalFund->involved_in_short_selling ?? "N/A" }}</span>
</div>
<div class="col-md-4">
{{-- <div class="col-md-4">
<p>Trading Strategy Used</p>
<span>{{ $ventureCapitalFund->trading_strategy_used ?? '-' }}</span>
</div>
</div> --}}
</div>
</div>
</div>