Merge pull request #284 from Ritikeshyadav/RitikeshFreeu

Ritikesh freeu
This commit is contained in:
Ritikeshyadav
2024-06-12 19:39:04 +05:30
committed by GitHub
18 changed files with 65 additions and 62 deletions

View File

@@ -522,7 +522,7 @@ class ManageFreeUInvestmentController extends Controller
'year3_return' => $request->year3_return,
]);
$product = Product::where('id', $request->product_fund_id)->first();
$product = Product::where('id', (int)$request->product_fund_id)->first();
// dd($product);
if ($request->has('presentation')) {
if (\File::exists(public_path('/uploads/product/presentation/' . $product->presentation))) {
@@ -530,7 +530,7 @@ class ManageFreeUInvestmentController extends Controller
}
$productpresentation = time() . '_presentation' . '.' . $request->presentation->extension();
$request->presentation->move(public_path('/uploads/product/presentation'), $productpresentation);
$updatepresentation = Product::where('id', $request->product_fund_id)->update([
$updatepresentation = Product::where('id', (int)$request->product_fund_id)->update([
'presentation' => $productpresentation,
]);
}
@@ -541,7 +541,7 @@ class ManageFreeUInvestmentController extends Controller
}
$productfactsheet = time() . '_factsheet' . '.' . $request->fact_sheet->extension();
$request->fact_sheet->move(public_path('uploads/product/fact_sheet'), $productfactsheet);
$updatefactsheet = Product::where('id', $request->product_fund_id)->update([
$updatefactsheet = Product::where('id', (int)$request->product_fund_id)->update([
'fact_sheet' => $productfactsheet,
]);
}
@@ -562,27 +562,27 @@ class ManageFreeUInvestmentController extends Controller
}
}
$imagesToRemove = $request->input('images_to_remove')[0];
// dd($imagesToRemove);
if (!empty($imagesToRemove)) {
$imagesToRemoveJson = $request->input('images_to_remove')[0];
$imagesToRemove = json_decode($imagesToRemoveJson);
foreach ($imagesToRemove as $imageId) {
$userFile = ProductImage::find($imageId);
if ($userFile) {
$file_path = public_path($userFile->images);
if (file_exists($file_path)) {
unlink($file_path);
}
// $imagesToRemove = $request->input('images_to_remove')[0];
// // dd($imagesToRemove);
// if (!empty($imagesToRemove)) {
// $imagesToRemoveJson = $request->input('images_to_remove')[0];
// $imagesToRemove = json_decode($imagesToRemoveJson);
// foreach ($imagesToRemove as $imageId) {
// $userFile = ProductImage::find($imageId);
// if ($userFile) {
// $file_path = public_path($userFile->images);
// if (file_exists($file_path)) {
// unlink($file_path);
// }
// Delete the record from the database
$userFile->delete();
}
}
}
// // Delete the record from the database
// $userFile->delete();
// }
// }
// }
$fund = Fund::find($request->fund_id);
$type = Product::where('id', $fund->products_id)->update(['type' => $request->type,'description'=> $request->description]);
$type = Product::where('id', (int)$fund->product_fund_id)->update(['type' => $request->type,'description'=> $request->description]);
return response()->json(['status' => 200, 'message' => 'Fund Updated Successfully']);
}

View File

@@ -1149,6 +1149,7 @@ class ManageUserProductController extends Controller
{
if($commissionDetail->commission_type == 'One-Time Commission' || $commissionDetail->commission_type == 'Hybrid Structure')
{
// dd($commissionDetail->commission_type);
$total_investment = (int)$amount;
$applicable_rate = floatval($commissionDetail->upfront_rate);
$gross_commission_earned = $total_investment / 100 * $applicable_rate ;
@@ -1159,7 +1160,7 @@ class ManageUserProductController extends Controller
'monthly_id' => $monthlyId,
'total_investment_or_commitment_amount' => $total_investment,
'applicable_rate' => $commissionDetail->upfront_rate,
'type_of_commission' => $commissionDetail->commission_type,
'type_of_commission' => $commissionDetail->commission_type == 'Hybrid Structure' ? 'Hybrid Commission(Upfront)':$commissionDetail->commission_type,
'gross_commissioned_earned_inr' => $gross_commission_earned,
'gst' => $commissionDetail->gst,
'tds' => $commissionDetail->tds,

View File

@@ -26,9 +26,9 @@ class GlobalPrivateEquityFundController extends Controller
public function globalPrivateEquityFundPage()
{
// $privateEquity = $this->privateEquityFundAllData()->getData();
$openGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->globalPrivateEquityFund()->open()->active()->latest()->get();
$resaleGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->globalPrivateEquityFund()->fullyFunded()->active()->latest()->get();
$fullyFundedGPEF = Product::has('funds')->with('funds', 'categorys')->funds()->globalPrivateEquityFund()->fullyFunded()->active()->latest()->get();
$openGPEF = Product::has('funds')->with('funds.compaines', 'categorys')->funds()->globalPrivateEquityFund()->open()->active()->latest()->get();
$resaleGPEF = Product::has('funds')->with('funds.compaines', 'categorys')->funds()->globalPrivateEquityFund()->fullyFunded()->active()->latest()->get();
$fullyFundedGPEF = Product::has('funds')->with('funds.compaines', 'categorys')->funds()->globalPrivateEquityFund()->fullyFunded()->active()->latest()->get();
$learnMore = (new FractionalRealEstateFrontendController)->globalPrivateEquityFundQuestionAndAnswer()->getData();
// $faqs = (new FractionalRealEstateFrontendController)->globalPrivateEquityFundQuestionAndAnswerFaqs()->getData();
// dd($openGPEF);

View File

@@ -28,7 +28,7 @@ class GlobalVentureCapitalFund extends Controller
$ventureCapitalFund = Fund::where('slug',$slug)->first();
$productData = Fund::where('slug','=',$slug)->first();
$productData = Product::where('id','=',$productData->products_id)->first();
// dd($ventureCapitalFund);
// dd($productData);
return view('Frontend.Pages.venture-capital-funds.product',compact('ventureCapitalFund','productData'));
}

View File

@@ -38,18 +38,19 @@ class StoreTestimonialRequest extends FormRequest
public function validated()
{
if($this->client_images === 'male.jpg' || $this->client_images === 'female.png'){
$image = $this->client_images;
}
if($this->client_images === "One"){
if($this->has('client_images_one')){
$image = time() . '.' . $this->client_images_one->extension();
$this->client_images_one->move(public_path('/uploads/testimonials/images'), $image);
}
}
return array_merge(parent::validated(), [
'rating' => $this->rating,
'client_image' => $image
]);
// if($this->client_images === 'male.jpg' || $this->client_images === 'female.png'){
// $image = $this->client_images;
// }
// if($this->client_images === "One"){
// if($this->has('client_images_one')){
// $image = time() . '.' . $this->client_images_one->extension();
// $this->client_images_one->move(public_path('/uploads/testimonials/images'), $image);
// }
// }
// return array_merge(parent::validated(), [
// 'rating' => $this->rating,
// 'client_image' => $image
// ]);
return parent::validated();
}
}

View File

@@ -112,7 +112,7 @@ class FundImport implements ToCollection, WithHeadingRow
'ytd' => $row['ytd'],
'year1_return' => $row['1_year_return'],
'year3_return' => $row['3_year_return'],
'date_as_on' => getConvertedDate($row['data_as_on']) ?? null,
'date_as_on' => array_key_exists('data_as_on',$row->toArray()) ? getConvertedDate($row['data_as_on']) ?? null : null,
]);
if ($returns) {
foreach ($returns as $key => $value) {

View File

@@ -280,7 +280,7 @@ class Product extends Model
public function scopeGlobalPrivateEquityFund($query)
{
return $query->where(['categories_id' => Category::GlobalPrivateEquityFundId, 'tables_id' => 3, 'status' => true]);
return $query->where(['categories_id' => Category::GlobalPrivateEquityFundId, 'status' => true]);
}
public function scopePrivateEquityFunds($query)

View File

@@ -100,7 +100,7 @@ class LeadService{
}
public function storeNote($request){
return LeadNote::updateOrCreate(['leads_id'=>$request->leads_id],['notes'=>$request->notes]);
return LeadNote::updateOrCreate(['leads_id'=>$request->leads_id],['notes'=>$request->notes,'created_by'=>\Auth::user()->id]);
}
public function storeAttachments($request){

View File

@@ -7,7 +7,7 @@ use App\Models\Admin\Testimonial;
class TestimonialService
{
public function getTestimonials(){
return Testimonial::all();
return Testimonial::latest()->get();
}
public function store($request){

View File

@@ -37,7 +37,7 @@
<textarea class="ckeditor form-control form-control-solid max-h-100px resize-none" name="description" placeholder="Type Your message"></textarea>
</div>
</div>
<div class="row justify-content-between">
{{-- <div class="row justify-content-between">
<div class="col-4">
<div class="col-md-12 mt-5 row">
@@ -77,7 +77,7 @@
</div>
</div>
</div>
</div>
</div> --}}
<div id="inputContainer">
<input style="display: none" type="file" name="client_img" id="testimonial_image" class="form-control form-control-solid">
</div>

View File

@@ -39,7 +39,7 @@
</div>
</div>
<div class="row justify-content-between">
{{-- <div class="row justify-content-between">
<div class="col-4">
<div class="col-md-12 mt-5 row">
<label class="fs-6 fw-semibold form-label mt-3">
@@ -72,7 +72,7 @@
</div>
</div>
</div>
</div>
</div> --}}
<div class="submit_btn d-flex justify-content-center my-15">
<button style="background-color:#0E86D4!important" type="submit" id="update_testimonial_btn" class="btn btn-primary">Update</button>

View File

@@ -85,11 +85,11 @@
<tr class="text-start align-top text-muted fw-bold fs-7 text-uppercase gs-0">
<th class="w-60px pe-2 align-top">Sr. No.</th>
<th class="min-w-100 w-125px align-top">Name</th>
<th class="min-w-100 w-125px align-top">Image</th>
{{-- <th class="min-w-100 w-125px align-top">Image</th> --}}
<th class="min-w-125px w-150px align-top">Designation/Company Name</th>
<th class="min-w-50px w-300px align-top">Message</th>
<!-- <th class="min-w-50px w-75px align-top">Tag Name</th> -->
<th class="min-w-50px w-100px align-top">Rating</th>
{{-- <th class="min-w-50px w-100px align-top">Rating</th> --}}
<th class="min-w-50px w-75px align-top">Date</th>
<th class="text-center min-w-100px w-200px align-top">Actions</th>
</tr>
@@ -111,18 +111,18 @@
<td>
<p>{{ $datas->client_name }}</p>
</td>
<td>
{{-- <td>
<div class="img d-flex align-items-center w-80px">
<img src="{{$datas->client_image}}" alt="" class="w-100 rounded-1" />
</div>
</td>
</td> --}}
<td>{{ $datas->client_designation_company_name }}</td>
<td>{{ substr(strip_tags($datas->description), 0, 80)}}</td>
<!--end::User=-->
<!--begin::Last login=-->
<!-- <td>{{ $datas->tag_name }}</td> -->
<td class="">
{{-- <td class="">
<div class="m_container">
<div class="row">
<div class="col mt-4">
@@ -132,7 +132,6 @@
<div class="col">
<div class="m_rated ">
@for($i=1; $i<=$datas->rating; $i++)
{{-- <input type="radio" id="star{{$i}}" class="rate" name="rating" value="5"/> --}}
<label class="star-rating-complete" title="text">{{$i}} stars</label>
@endfor
</div>
@@ -142,7 +141,7 @@
</div>
</div>
</div>
</td>
</td> --}}
<td>
<div class="badge badge-light fw-bold">{{ date('d/m/Y',strtotime($datas->created_at)) }}</div>
</td>

View File

@@ -1944,7 +1944,7 @@
},
total_fees_paid: {
required: true,
digits: true,
// digits: true,
},
no_of_units_alloted: {
required: true,
@@ -2015,7 +2015,7 @@
},
total_fees_paid: {
required: 'Please enter total fees paid',
digits: 'Please enter digits',
// digits: 'Please enter digits',
},
no_of_units_alloted: {
required: 'Please enter no. of units alloted',

View File

@@ -780,7 +780,7 @@
<ul class="list-group list-group-flush display-notes">
@foreach ($lead->notes as $data)
<li class="list-group-item">{{ $data->notes }} <br>By
{{ $data->admin->name }} At
{{ $data->admin->name ?? 'N/A' }} At
{{ $data->created_at->format('H:i:s d/m/y') }}
</li>
@endforeach

View File

@@ -79,7 +79,7 @@
<!--begin::Table row-->
<tr class="text-start text-muted fw-bold fs-7 text-uppercase gs-0">
<th class="w-60px pe-2 align-top">Sr no</th>
<th class="min-w-75px w-75px align-top">User Name</th>
{{-- <th class="min-w-75px w-75px align-top">User Name</th> --}}
<th class="min-w-75px w-75px align-top">Seller Name</th>
<th class="min-w-75px w-75px align-top">City</th>
<!-- <th class="min-w-75px w-250px align-top">Review</th> -->
@@ -110,7 +110,7 @@
</td>
<!--end::Checkbox-->
<!--begin::User=-->
<th>{{$profile->users->name}}</th>
{{-- <th>{{$profile->users->name}}</th> --}}
<th>{{$profile->name}}</th>
<th>{{$profile->city}}</th>
<!--begin::Joined-->

View File

@@ -180,7 +180,7 @@
<div class="d-flex flex-column mb-2">
<span class="fs-2 fw-bold text-gray-800 me-2 lh-1 ls-n2"
id="total-gross-commission-sum"> 0.0</span>
<span class="fs-7 text-black-400">Gross Earn</span>
<span class="fs-7 text-black-400">Gross Earned</span>
</div>
</div>
<div class="m-0">

View File

@@ -109,7 +109,7 @@
name="proof_of_address_of_foreign" class="iv-input form-control p-2">
</div>--}}
<div class="col-md-6 mb-4">
<label class="mandatory" for="occupation">Proof of Address (In India) [Utility Bill]</label>
<label class="mandatory" for="occupation">Proof of Address (Foreign Country) [Utility Bill]</label>
<input type="file" id="utility" name="utility" class="iv-input form-control p-2" accept="image/jpeg,image/png,image/jpg,application/pdf">
</div>
<div class="col-md-6 mb-4">

View File

@@ -3,7 +3,9 @@
@if(count($testimonial))
<div class="testi_slider_sec">
<div class="container">
<div class="h2">Testmonials</div>
<div class="bg-brown-head mb-4">
<h3>Testmonials</h3>
</div>
<div id="testimonial_sliders">
@foreach ($testimonial as $singleTestimonial)
<div class="inn_testi">