Merge branch 'main' of https://github.com/Ritikeshyadav/my-freeu into RitikeshFreeu

This commit is contained in:
Ritikesh yadav
2024-05-14 13:05:27 +05:30
9 changed files with 81 additions and 23 deletions

View File

@@ -130,7 +130,8 @@ class ManageUserProductController extends Controller
// $hyfProductNames = $this->getAllProductNames(Category::HighYieldFinanceId);
// $sdiProductNames = $this->getAllProductNames(Category::SecuritizedDebtInstrumentId);
// $idProductNames = $this->getAllProductNames(Category::InvoiceDiscountingId);
$companies = Company::active()->get();
// making unique custom id
$count = MonthlyUpdateMaster::get()->count();
@@ -144,11 +145,24 @@ class ManageUserProductController extends Controller
}
$customID .= $count;
// dd($customID);
$companies = Company::active()->get();
// return view('Admin.Pages.manage_investors..manage_user_product.manage_user_add', compact('users','aifProductNames','freProductNames','p2pProductNames','ifaProductNames','lbfProductNames','cagaProductNames','vdProductNames','hyfProductNames','sdiProductNames','idProductNames','companies'));
return view('Admin.Pages.manage_investors.manage_user_product.manage_user_add', compact('users', 'aifProductNames', 'freProductNames', 'companies','customID'));
}
public function userProduct(Request $request){
$data = Product::with('alternativeInvestmentFund.companies','categorys')->where('id',$request->id)->first();
// dd($data);
if($data->alternativeInvestmentFund != null){
return response()->json(['status'=>200,'category'=>'aif','data'=>$data]);
}
$data = Product::with('fractional_real_estate','categorys')->where('id',$request->id)->first();
if($data->fractional_real_estate != null){
return response()->json(['status'=>200,'category'=>'fre','data'=>$data]);
}
}
function getAllProductNames($categoriesId)
{
return Product::

View File

@@ -33,6 +33,7 @@ class DashboardController extends Controller
{
$user = $this->getUser()->data;
$currentInvestmentProduct = $this->view_investors_details('Holding');
// dd($currentInvestmentProduct);
$reedemedInvestmentProduct = $this->view_investors_details('Reedemed');
// investment on watchlist
@@ -363,13 +364,13 @@ class DashboardController extends Controller
}
$dataArr = [
'id' => $singleMUM->id,
'company_logo' => Company::find($singleMUM->investment_platform)->value('company_logo'),
'company_logo' => Company::where('id',$singleMUM->investment_platform)->value('company_logo'),
'custom_id' => $singleMUM->custom_id,
'categories' => $categories,
'product_category' => $singleMUM->product_category,
'product_name' => $singleMUM->product_name,
'date_of_investment' => $singleMUM->created_at->format('d/m/y'),
'company_name' => Company::find($singleMUM->investment_platform)->value('company_name'),
'company_name' => Company::where('id',$singleMUM->investment_platform)->value('company_name'),
'route_id' => \Crypt::encrypt($singleMUM->custom_id)
];
$dataArr['total_investment_amount'] = $amount;
@@ -387,7 +388,7 @@ class DashboardController extends Controller
}
$dataArr = [
// 'id' => $singleMUM->id,
'company_logo' => Company::find($singleMUM->investment_platform)->value('company_logo'),
'company_logo' => Company::where('id',$singleMUM->investment_platform)->value('company_logo'),
'custom_id' => $singleMUM->custom_id,
'categories' => $singleMUM->categories,
// 'product_category' => $singleMUM->product_category,
@@ -405,6 +406,7 @@ class DashboardController extends Controller
{
// $customId = Crypt::decrypt($customId);
$data = $this->getInvestmentDetails($customId);
// dd($data);
return view('Frontend.Pages.profile.investment-details.index', compact('data'));
}
@@ -413,9 +415,10 @@ class DashboardController extends Controller
$data = array();
$customId = Crypt::decrypt($customId);
$monthlyUpdateMaster = MonthlyUpdateMaster::where('custom_id', $customId)->firstOrFail();
// dd($monthlyUpdateMaster);
$data['basic-details'] = $monthlyUpdateMaster;
$data['company_name'] = Company::find($monthlyUpdateMaster->investment_platform)->value('company_name');
$data['company_logo'] = Company::find($monthlyUpdateMaster->investment_platform)->value('company_logo');
$data['company_name'] = Company::where('id',$monthlyUpdateMaster->investment_platform)->value('company_name');
$data['company_logo'] = Company::where('id',$monthlyUpdateMaster->investment_platform)->value('company_logo');
if (MonthlyUpdateAlternativeInvestmentFund::where('custom_id', $customId)->exists()) {
$data['category'] = 'Alternative Investment Fund';
$data['data'] = MonthlyUpdateAlternativeInvestmentFund::where(['custom_id' => $customId, 'status' => true])->latest()->first();

View File

@@ -248,12 +248,13 @@ class MarketPlaceController extends Controller
$id = $offering['data']->id;
$userData = array();
$user = ModelsUser::find(auth()->guard('users')->user()->id);
$dataOfBuyerForm = MarketplaceBuyerForm::first();
$userData = (object)[
'name' => $user->name ?? null,
'contact_number' => $user->contact_number ?? null,
'email' => $user->email ?? $user->email,
];
return view('Frontend.Pages.profile.market-list.buyer-form', compact('table', 'id', 'userData'));
return view('Frontend.Pages.profile.market-list.buyer-form', compact('table', 'id', 'userData','dataOfBuyerForm'));
}
//editBuyerForm start by hritik on 5-4-2024

View File

@@ -110,6 +110,14 @@ class Product extends Model
return $this->hasOne(Category::class, 'id', 'categories_id');
}
// public function aif(){
// return $this->hasOne(AlternativeInvestmentFund::class,'id', 'products_id');
// }
public function companies(){
return $this->belongsTo(Company::class,'companies_id',);
}
public function scopeFractionalRealEstate($query)
{
return $query->where('tables_id', 1);

View File

@@ -51,7 +51,7 @@ function imagePath($path = null)
$finalPath = "https://staging.jerichoalternatives.in/";
}
if (env('APP_ENV') == 'local') {
$finalPath = "http://localhost/freeu/my-freeu/";
$finalPath = "http://localhost/my-freeu/";
}
return $finalPath . $path;
}

View File

@@ -69,14 +69,14 @@
<span>Investor Name</span>
</label>
<!--begin::Input-->
<input type="text" class="form-control form-control-solid" name="investor_name" />
<input type="text" class="form-control form-control-solid" readonly id="investor_name" name="investor_name" />
</div>
<div class="form-box mb-5">
<label class="fs-6 fw-semibold form-label mt-3">
<span>Select a Product</span>
</label>
<select name="product_id" id="selectProduct1" class="form-select form-select-solid selectProduct" data-form="1" style="height: 100%">
<select name="product_id" id="selectProduct1" class="form-select form-select-solid selectProduct choose_product" data-form="1" style="height: 100%">
<option value="">Select a Product</option>
@foreach($aifProductNames as $data)
<option value="{{$data->id}}">{{$data->product_name}}</option>
@@ -89,7 +89,7 @@
<span>Product/Fund Name</span>
</label>
<!--begin::Input-->
<input type="text" class="form-control form-control-solid product_name_1" name="product_name" />
<input type="text" class="form-control form-control-solid product_name_1" readonly id="product_name" name="product_name" readonly />
</div>
<div class="form-box mb-5">
<label class="fs-6 fw-semibold form-label mt-3">
@@ -103,7 +103,7 @@
<span>Product Category</span>
</label>
<!--begin::Input-->
<input type="text" class="form-control form-control-solid" name="product_category" />
<input type="text" class="form-control form-control-solid" readonly id="product_category" name="product_category" />
</div>
<div class="form-box mb-5">
<label class="fs-6 fw-semibold form-label mt-3">
@@ -184,7 +184,7 @@
<span>Fund Category</span>
</label>
<!--begin::Input-->
<input type="text" class="form-control form-control-solid" name="fund_category" />
<input type="text" class="form-control form-control-solid" readonly id="fund_category" name="fund_category" />
</div>
<div class="form-box mb-5">
<label class="fs-6 fw-semibold form-label mt-3">
@@ -700,14 +700,14 @@
<span>Investor Name</span>
</label>
<!--begin::Input-->
<input type="text" class="form-control form-control-solid" name="investor_name" />
<input type="text" class="form-control form-control-solid" readonly id="invester_name2" name="investor_name" />
</div>
<div class="form-box mb-5">
<label class="fs-6 fw-semibold form-label mt-3">
<span>Product Category</span>
</label>
<!--begin::Input-->
<input type="text" class="form-control form-control-solid" name="product_category" />
<input type="text" class="form-control form-control-solid" readonly id="product_category2" name="product_category" />
</div>
<div class="form-box mb-5">
<label class="fs-6 fw-semibold form-label mt-3">
@@ -715,7 +715,7 @@
</label>
<!--begin::Input-->
<!-- <input type="text" class="form-control form-control-solid" name="product_name" /> -->
<select name="product_id" id="selectProduct5" class="form-select form-select-solid selectProduct" data-form="5" style="height: 100%">
<select name="product_id" id="selectProduct5" class="form-select form-select-solid selectProduct choose_product" data-form="5" style="height: 100%">
<option value="">Select a Product</option>
@foreach($freProductNames as $data)
<option value="{{$data->id}}">{{$data->product_name}}</option>
@@ -727,7 +727,7 @@
<span>Product Name</span>
</label>
<!--begin::Input-->
<input type="text" class="form-control form-control-solid product_name_5" name="product_name" />
<input type="text" readonly class="form-control form-control-solid product_name_5" id="product_name2" name="product_name" />
</div>
<div class="form-box mb-5">
<label class="fs-6 fw-semibold form-label mt-3">
@@ -1125,6 +1125,37 @@
$('.choose_product').change(function(){
id = $(this).val();
$.ajax({
url:"{{route('userProduct',"+id")}}",
type:'get',
data: {
'id':id,
},
success:function(result)
{
// console.log(result);
if(result.status == 200 && result.category == 'aif')
{
$('#product_name').val(result.data['alternative_investment_fund']['fund_name']);
$('#fund_category').val(result.data['alternative_investment_fund']['fund_category']);
$('#product_category').val(result.data['categorys']['category_name']);
}
if(result.status == 200 && result.category == 'fre')
{
$('#product_name2').val(result.data['fractional_real_estate']['property_name_and_location']);
$('#product_category2').val(result.data['categorys']['category_name']);
}
}
})
})
$('#user-select').on('change', function() {
$('#investor_name').val($(this).find('option:selected').text());
$('#invester_name2').val($(this).find('option:selected').text());
});
// $('#pan').on
function convertToUpperCase(id)
{

View File

@@ -20,11 +20,11 @@
<div class="container row">
<div class="content" data-aos="fade-right">
<h1 class="invest-header si-hd text-center">Buy your Investment's today!</h1>
<ul class="si-hd_p p-0 d-flex justify-content-between">
{{-- <ul class="si-hd_p p-0 d-flex justify-content-between">
<li>Verified Buyers</li>
<li>Expert Verification</li>
<li>Sell From Your Home</li>
</ul>
</ul> --}}
</div>
<div class="col-md-6 bgn-image" data-aos="fade-left">
{{-- <img src="/public/assets/media/FrontendImages/r-invest.png"> --}}
@@ -101,11 +101,11 @@
</div>
<div class="form-group col-md-6">
<label>City</label>
<input type="text" onkeydown="return /^[a-zA-Z\s]+$/i.test(event.key)" name="city">
<input type="text" onkeydown="return /^[a-zA-Z\s]+$/i.test(event.key)" name="city" value="{{$dataOfBuyerForm->city}}">
</div>
<div class="form-group col-md-6">
<label>Country</label>
<input type="text" onkeydown="return /^[a-zA-Z\s]+$/i.test(event.key)" name="country">
<input type="text" onkeydown="return /^[a-zA-Z\s]+$/i.test(event.key)" name="country" value="{{$dataOfBuyerForm->country}}">
</div>
<div class="form-group col-md-6">
<label>Contact Number</label>

View File

@@ -5,11 +5,11 @@
<div class="container row">
<div class="content" data-aos="fade-right">
<h1 class="invest-header si-hd text-center">Sell your investment's today!</h1>
<ul class="si-hd_p p-0 d-flex justify-content-between">
{{-- <ul class="si-hd_p p-0 d-flex justify-content-between">
<li>Verified Buyers</li>
<li>Expert Verification</li>
<li>Sell From Your Home</li>
</ul>
</ul> --}}
</div>
<div class="col-md-6 bgn-image" data-aos="fade-left">
{{-- <img src="/public/assets/media/FrontendImages/r-invest.png"> --}}

View File

@@ -601,6 +601,7 @@ Route::middleware([BackendAccess::class])->group(function () {
Route::controller(ManageUserProductController::class)->group(function () {
Route::get("manage-user-product", 'index')->name('manage-user-product');
Route::get("store-user-product", 'storeUserProduct')->name('store-user-product');
Route::get('userProduct/{id}', 'userProduct')->name('userProduct');
Route::get("import-monthly-updates", 'importMonthlyUpdateBlade')->name('import-monthly-updates');
Route::get("monthly-updates/{id}", 'monthlyUpdates')->name('monthly-updates');
Route::post("store-monthly-updates-for-ifa", 'storeMonthlyUpdatesForIFA')->name('store-monthly-updates-for-ifa');