Merge branch 'main' of https://github.com/Ritikeshyadav/my-freeu into megha
This commit is contained in:
@@ -29,6 +29,8 @@ use Cviebrock\EloquentSluggable\Services\SlugService;
|
||||
use Illuminate\Support\Facades\Session;
|
||||
use DB;
|
||||
|
||||
use Illuminate\Support\Facades\Log;
|
||||
|
||||
class DashboardController extends Controller
|
||||
{
|
||||
public function index()
|
||||
@@ -47,7 +49,7 @@ class DashboardController extends Controller
|
||||
$aifSoldInvestmentWatchlist = $this->aifSoldInvestmentWatchlist()['data'];
|
||||
$freSoldInvestmentWatchlist = $this->freSoldInvestmentWatchlist()['data'];
|
||||
$opSoldInvestmentWatchlist = $this->opSoldInvestmentWatchlist()['data'];
|
||||
|
||||
|
||||
// bought
|
||||
$aifInvestmentListed = $this->aifInvestmentListed()['data'];
|
||||
$freInvestmentListed = $this->freInvestmentListed()['data'];
|
||||
@@ -65,30 +67,32 @@ class DashboardController extends Controller
|
||||
|
||||
public function getMarketplaceAIFSellerData($api = null)
|
||||
{
|
||||
$id = auth()->guard('users')->user()->id ?? request()->user()->id;
|
||||
// $market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_aif_sellers'])->get();
|
||||
// foreach ($market_place_data as $row) {
|
||||
// $row['marketplace_aif_sellers_data'] = MarketplaceAlternativeInvestmentFundSeller::where('id', $row->associated_id)->first();
|
||||
// }
|
||||
// return $market_place_data;
|
||||
// $sellerData = MarketplaceSellerForm::has('aif')->with('aif')->where('users_id',$id)->get();
|
||||
$sellerData = MarketplaceSellerForm::with('aif')->where('users_id',$id)->get();
|
||||
// dd($sellerData);
|
||||
// return $sellerData[0]->aif['name_of_the_aif_fund'];
|
||||
// return $api;
|
||||
if($api == null)
|
||||
{
|
||||
$data['data'] = $sellerData;
|
||||
return $data;
|
||||
try {
|
||||
$id = auth()->guard('users')->user()->id ?? request()->user()->id;
|
||||
// $market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_aif_sellers'])->get();
|
||||
// foreach ($market_place_data as $row) {
|
||||
// $row['marketplace_aif_sellers_data'] = MarketplaceAlternativeInvestmentFundSeller::where('id', $row->associated_id)->first();
|
||||
// }
|
||||
// return $market_place_data;
|
||||
// $sellerData = MarketplaceSellerForm::has('aif')->with('aif')->where('users_id',$id)->get();
|
||||
$sellerData = MarketplaceSellerForm::with('aif')->where('users_id', $id)->get();
|
||||
// dd($sellerData);
|
||||
// return $sellerData[0]->aif['name_of_the_aif_fund'];
|
||||
// return $api;
|
||||
if ($api == null) {
|
||||
$data['data'] = $sellerData;
|
||||
return $data;
|
||||
}
|
||||
if (count($sellerData->toArray())) {
|
||||
$market_place_data = $sellerData[0]->aif->toArray();
|
||||
// dd($market_place_data);
|
||||
return $market_place_data;
|
||||
}
|
||||
return $sellerData;
|
||||
} catch (\Exception $e) {
|
||||
Log::error("Something went wrong while fetching aif sold investment - " . $e->getMessage() . " on " . $e->getLine());
|
||||
// Log::error("Something went wrong while investment-". $e->getMessage() ." " .$e->getLine());
|
||||
}
|
||||
if(count($sellerData->toArray()))
|
||||
{
|
||||
$market_place_data = $sellerData[0]->aif->toArray();
|
||||
// dd($market_place_data);
|
||||
return $market_place_data;
|
||||
}
|
||||
return $sellerData;
|
||||
|
||||
}
|
||||
|
||||
public function aifSoldInvestment()
|
||||
@@ -129,38 +133,39 @@ class DashboardController extends Controller
|
||||
|
||||
public function getMarketplaceFRESellerData($api = null)
|
||||
{
|
||||
$id = auth()->guard('users')->user()->id ?? request()->user()->id;
|
||||
// $market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_fre_sellers'])->get();
|
||||
// foreach ($market_place_data as $row) {
|
||||
// $row['marketplace_fre_sellers_data'] = MarketplaceFractionalRealEstateSeller::where('id', $row->associated_id)->first();
|
||||
// }
|
||||
// return $market_place_data;
|
||||
$sellerData = MarketplaceSellerForm::with('fre')->where('users_id',$id)->get();
|
||||
// dd($sellerData);
|
||||
$sellerData->each(function($value){
|
||||
$value->fre->each(function($fre){
|
||||
// dd($fre);
|
||||
if($fre)
|
||||
{
|
||||
$fre['company_name'] = Company::where('id',$fre->fractional_real_estate_platform)->value('company_name');
|
||||
}
|
||||
|
||||
try {
|
||||
$id = auth()->guard('users')->user()->id ?? request()->user()->id;
|
||||
// $market_place_data = MarketplaceBuyerForm::where(['users_id' => $id, 'status' => 'Sold', 'table' => 'marketplace_fre_sellers'])->get();
|
||||
// foreach ($market_place_data as $row) {
|
||||
// $row['marketplace_fre_sellers_data'] = MarketplaceFractionalRealEstateSeller::where('id', $row->associated_id)->first();
|
||||
// }
|
||||
// return $market_place_data;
|
||||
$sellerData = MarketplaceSellerForm::with('fre')->where('users_id', $id)->get();
|
||||
// dd($sellerData);
|
||||
$sellerData->each(function ($value) {
|
||||
$value->fre->each(function ($fre) {
|
||||
// dd($fre);
|
||||
if ($fre) {
|
||||
$fre['company_name'] = Company::where('id', $fre->fractional_real_estate_platform)->value('company_name');
|
||||
}
|
||||
});
|
||||
// dd($value->fre[0]->fractional_real_estate_platform);
|
||||
});
|
||||
// dd($value->fre[0]->fractional_real_estate_platform);
|
||||
});
|
||||
// dd($sellerData->toArray());
|
||||
if($api == null)
|
||||
{
|
||||
$data['data'] = $sellerData;
|
||||
return $data;
|
||||
// dd($sellerData->toArray());
|
||||
if ($api == null) {
|
||||
$data['data'] = $sellerData;
|
||||
return $data;
|
||||
}
|
||||
if (count($sellerData->toArray())) {
|
||||
$market_place_data = $sellerData[0]->fre->toArray();
|
||||
return $market_place_data;
|
||||
}
|
||||
return $sellerData;
|
||||
// if($sellerData->toArray()->count())
|
||||
} catch (\Exception $e) {
|
||||
// Log::error('')
|
||||
Log::error("Something went wrong while fetching fre sold investment -" . $e->getMessage() . " " . $e->getLine());
|
||||
}
|
||||
if(count($sellerData->toArray()))
|
||||
{
|
||||
$market_place_data = $sellerData[0]->fre->toArray();
|
||||
return $market_place_data;
|
||||
}
|
||||
return $sellerData;
|
||||
// if($sellerData->toArray()->count())
|
||||
}
|
||||
|
||||
public function getMarketplaceOPSellerData()
|
||||
@@ -187,14 +192,19 @@ class DashboardController extends Controller
|
||||
|
||||
public function viewInvestmentDetails()
|
||||
{
|
||||
$currentInvestmentProduct = $this->view_investors_details('Holding');
|
||||
$reedemedInvestmentProduct = $this->view_investors_details('Reedemed');
|
||||
$totalInvestmentTillDate = '₹ ' . $this->IND_money_format($currentInvestmentProduct['totalInvestmentInInt'] + $reedemedInvestmentProduct['totalInvestmentInInt']);
|
||||
return [
|
||||
'currentInvestmentProduct' => $currentInvestmentProduct,
|
||||
'reedemedInvestmentProduct' => $reedemedInvestmentProduct,
|
||||
'totalInvestmentTillDate' => $totalInvestmentTillDate,
|
||||
];
|
||||
try {
|
||||
|
||||
$currentInvestmentProduct = $this->view_investors_details('Holding');
|
||||
$reedemedInvestmentProduct = $this->view_investors_details('Reedemed');
|
||||
$totalInvestmentTillDate = '₹ ' . $this->IND_money_format($currentInvestmentProduct['totalInvestmentInInt'] + $reedemedInvestmentProduct['totalInvestmentInInt']);
|
||||
return [
|
||||
'currentInvestmentProduct' => $currentInvestmentProduct,
|
||||
'reedemedInvestmentProduct' => $reedemedInvestmentProduct,
|
||||
'totalInvestmentTillDate' => $totalInvestmentTillDate,
|
||||
];
|
||||
} catch (\Exception $e) {
|
||||
Log::error("Something went wrong while investment-" . $e->getMessage() . " " . $e->getLine());
|
||||
}
|
||||
}
|
||||
|
||||
public function investmentSummary()
|
||||
@@ -275,6 +285,7 @@ class DashboardController extends Controller
|
||||
|
||||
public function view_investors_details($holdingStatus)
|
||||
{
|
||||
|
||||
$id = auth()->guard('users')->user()->id ?? request()->user()->id;
|
||||
$user = MonthlyUpdateMaster::where(['users_id' => $id, 'holding_status' => $holdingStatus, 'status' => true])
|
||||
->whereIn('categories', ['Alternative Investment Fund', 'Fractional Real Estate'])
|
||||
@@ -368,13 +379,13 @@ class DashboardController extends Controller
|
||||
}
|
||||
$dataArr = [
|
||||
'id' => $singleMUM->id,
|
||||
'company_logo' => Company::where('id',$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::where('id',$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;
|
||||
@@ -386,22 +397,19 @@ class DashboardController extends Controller
|
||||
{
|
||||
$id = $request->id;
|
||||
// dd($id);
|
||||
if($id)
|
||||
{
|
||||
$product_id = MonthlyUpdateMaster::where('id',$id)->value('products_id');
|
||||
if ($id) {
|
||||
$product_id = MonthlyUpdateMaster::where('id', $id)->value('products_id');
|
||||
// dd(FractionalRealEstate::where('products_id',$product_id)->exists());
|
||||
if(AlternativeInvestmentFund::where('products_id',$product_id)->exists())
|
||||
{
|
||||
$data = Product::with('alternativeInvestmentFund','categorys')->where('id',$product_id)->first();
|
||||
return response()->json(['status'=>200,'data'=>$data]);
|
||||
if (AlternativeInvestmentFund::where('products_id', $product_id)->exists()) {
|
||||
$data = Product::with('alternativeInvestmentFund', 'categorys')->where('id', $product_id)->first();
|
||||
return response()->json(['status' => 200, 'data' => $data]);
|
||||
}
|
||||
if(FractionalRealEstate::where('products_id',$product_id)->exists())
|
||||
{
|
||||
$data = Product::with('fractional_real_estate','categorys')->where('id',$product_id)->first();
|
||||
return response()->json(['status'=>200,'data'=>$data]);
|
||||
if (FractionalRealEstate::where('products_id', $product_id)->exists()) {
|
||||
$data = Product::with('fractional_real_estate', 'categorys')->where('id', $product_id)->first();
|
||||
return response()->json(['status' => 200, 'data' => $data]);
|
||||
}
|
||||
}
|
||||
return response()->json(['status'=>404,'message'=>'id is null']);
|
||||
return response()->json(['status' => 404, 'message' => 'id is null']);
|
||||
}
|
||||
|
||||
function totalInvestmentAmount_api($singleMUM, $amount)
|
||||
@@ -414,7 +422,7 @@ class DashboardController extends Controller
|
||||
}
|
||||
$dataArr = [
|
||||
// 'id' => $singleMUM->id,
|
||||
'company_logo' => Company::where('id',$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,
|
||||
@@ -444,8 +452,8 @@ class DashboardController extends Controller
|
||||
$monthlyUpdateMaster = MonthlyUpdateMaster::where('custom_id', $customId)->firstOrFail();
|
||||
// dd($monthlyUpdateMaster);
|
||||
$data['basic-details'] = $monthlyUpdateMaster;
|
||||
$data['company_name'] = Company::where('id',$monthlyUpdateMaster->investment_platform)->value('company_name');
|
||||
$data['company_logo'] = Company::where('id',$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();
|
||||
@@ -466,7 +474,15 @@ class DashboardController extends Controller
|
||||
|
||||
public function getStatementReportAPI($file_name)
|
||||
{
|
||||
return \Storage::download('files/monthly-update/' . $file_name);
|
||||
// dd($file_name);
|
||||
$file = 'files/monthly-update/'.$file_name;
|
||||
if(\Storage::exists($file))
|
||||
{
|
||||
return \Storage::download($file);
|
||||
}
|
||||
// return \Storage::download('files/monthly-update/' . $file_name);
|
||||
return 'File not found';
|
||||
// return \Storage::download('files/monthly-update/' . $file_name);
|
||||
}
|
||||
|
||||
public function viewDetailMarketPlace(Request $request, $custom_id = null)
|
||||
@@ -475,7 +491,7 @@ class DashboardController extends Controller
|
||||
if ($activeSeller) {
|
||||
abort(404);
|
||||
}
|
||||
$products_id = null ;
|
||||
$products_id = null;
|
||||
if ($custom_id) {
|
||||
$id = \Crypt::decrypt($custom_id);
|
||||
$data = MonthlyUpdateMaster::with('investor')->where('custom_id', '=', $id)->first();
|
||||
@@ -492,13 +508,13 @@ class DashboardController extends Controller
|
||||
$data = '';
|
||||
}
|
||||
|
||||
$userKyc = UserKyc::where('users_id',auth()->guard('users')->user()->id)->exists();
|
||||
$userKyc = UserKyc::where('users_id', auth()->guard('users')->user()->id)->exists();
|
||||
$userData = array();
|
||||
// $user;
|
||||
$user = ModelsUser::where('id',auth()->guard('users')->user()->id)->first();
|
||||
$user = ModelsUser::where('id', auth()->guard('users')->user()->id)->first();
|
||||
$marketPlaceSellerForm = MarketplaceSellerForm::where('users_id', auth()->guard('users')->user()->id)->first();
|
||||
// if ($userKyc) {
|
||||
// dd($marketPlaceSellerForm);
|
||||
// dd($marketPlaceSellerForm);
|
||||
// }
|
||||
$userData = (object)[
|
||||
'encrypted_custom_id' => $custom_id,
|
||||
@@ -554,7 +570,7 @@ class DashboardController extends Controller
|
||||
'contact_number' => $request->contact_number,
|
||||
'email' => $request->email,
|
||||
];
|
||||
session::put('sellerFormData', $data);
|
||||
session::put('sellerFormData', $data);
|
||||
if (session::has('sellerFormData')) {
|
||||
return response()->json(['status' => 200, 'message' => 'Seller Form Reviewed & Submitted!']);
|
||||
}
|
||||
@@ -575,7 +591,7 @@ class DashboardController extends Controller
|
||||
}
|
||||
|
||||
|
||||
$aifProduct = (object)[
|
||||
$aifProduct = (object)[
|
||||
// 'encrypted_custom_id' => $custom_id,
|
||||
'name_of_the_aif_fund' => $monthlyUpdateMaster->product_name ?? null,
|
||||
'fund_category' => $monthlyUpdateMaster->fund_category ?? null,
|
||||
@@ -673,8 +689,8 @@ class DashboardController extends Controller
|
||||
}
|
||||
// dd(session::get('sellerFormData'));
|
||||
$sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([
|
||||
'users_id' => auth()->guard('users')->user()->id
|
||||
],session::get('sellerFormData'));
|
||||
'users_id' => auth()->guard('users')->user()->id
|
||||
], session::get('sellerFormData'));
|
||||
// dd($sellerFormUpdateCreate);
|
||||
$aifSellerForm = MarketplaceAlternativeInvestmentFundSeller::create([
|
||||
'seller_forms_id' => MarketplaceSellerForm::where('users_id', auth()->guard('users')->user()->id)->value('id'),
|
||||
@@ -735,7 +751,7 @@ class DashboardController extends Controller
|
||||
}
|
||||
$sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([
|
||||
'users_id' => auth()->guard('users')->user()->id
|
||||
],session::get('sellerFormData'));
|
||||
], session::get('sellerFormData'));
|
||||
|
||||
$freSellerForm = MarketplaceFractionalRealEstateSeller::create([
|
||||
'seller_forms_id' => MarketplaceSellerForm::where('users_id', auth()->guard('users')->user()->id)->value('id'),
|
||||
@@ -829,56 +845,66 @@ class DashboardController extends Controller
|
||||
|
||||
public function aifInvestmentWatchlist()
|
||||
{
|
||||
$data['data'] = MarketplaceBuyerForm::query()
|
||||
->join('marketplace_aif_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_aif_sellers.id')
|
||||
->alernativeInvestmentFund()
|
||||
->where('listing_status', '!=', 'Hide')
|
||||
->notSold()
|
||||
// ->select('name_of_the_aif_fund', 'fund_category', 'fund_strategy', 'type_of_fund', 'total_capital_commitment', 'uncalled_capital_commitment')
|
||||
->select(
|
||||
'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers
|
||||
'marketplace_aif_sellers.name_of_the_aif_fund',
|
||||
'marketplace_aif_sellers.slug',
|
||||
'marketplace_aif_sellers.fund_category',
|
||||
'marketplace_aif_sellers.fund_strategy',
|
||||
'marketplace_aif_sellers.type_of_fund',
|
||||
'marketplace_aif_sellers.total_capital_commitment',
|
||||
'marketplace_aif_sellers.uncalled_capital_commitment'
|
||||
)
|
||||
->get();
|
||||
// $data['data'] = MarketplaceBuyerForm::has('aifSellerData')->with('aifSellerData')->alernativeInvestmentFund()->notSold()->get();
|
||||
try {
|
||||
$data['data'] = MarketplaceBuyerForm::query()
|
||||
->join('marketplace_aif_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_aif_sellers.id')
|
||||
->alernativeInvestmentFund()
|
||||
->where('listing_status', '!=', 'Hide')
|
||||
->notSold()
|
||||
// ->select('name_of_the_aif_fund', 'fund_category', 'fund_strategy', 'type_of_fund', 'total_capital_commitment', 'uncalled_capital_commitment')
|
||||
->select(
|
||||
'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers
|
||||
'marketplace_aif_sellers.name_of_the_aif_fund',
|
||||
'marketplace_aif_sellers.slug',
|
||||
'marketplace_aif_sellers.fund_category',
|
||||
'marketplace_aif_sellers.fund_strategy',
|
||||
'marketplace_aif_sellers.type_of_fund',
|
||||
'marketplace_aif_sellers.total_capital_commitment',
|
||||
'marketplace_aif_sellers.uncalled_capital_commitment'
|
||||
)
|
||||
->get();
|
||||
// $data['data'] = MarketplaceBuyerForm::has('aifSellerData')->with('aifSellerData')->alernativeInvestmentFund()->notSold()->get();
|
||||
// dd($data['data']->toArray());
|
||||
return $data;
|
||||
Log::info("Data Fetch Sucesfully");
|
||||
|
||||
return $data;
|
||||
} catch (\Exception $e) {
|
||||
Log::error("Something went wrong while fetching fre watchlist-" . $e->getMessage() . " " . $e->getLine());
|
||||
}
|
||||
}
|
||||
|
||||
public function freInvestmentWatchlist()
|
||||
{
|
||||
$data['data'] = MarketplaceBuyerForm::query()
|
||||
// ->leftJoin('compaines', 'marketplace_fre_sellers.fractional_real_estate_platform', 'compaines.id')
|
||||
->join('marketplace_fre_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_fre_sellers.id')
|
||||
// ->with('compaines')
|
||||
->fractionalRealEstate()
|
||||
->where('listing_status', '!=', 'Hide')
|
||||
->notSold()
|
||||
// ->select('property_name', 'property_address', 'property_grade', 'asset_type', 'fractional_real_estate_platform', 'expected_selling_price')
|
||||
->select(
|
||||
'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers
|
||||
'marketplace_fre_sellers.property_name',
|
||||
'marketplace_fre_sellers.slug',
|
||||
'marketplace_fre_sellers.property_address',
|
||||
'marketplace_fre_sellers.property_grade',
|
||||
'marketplace_fre_sellers.asset_type',
|
||||
'marketplace_fre_sellers.fractional_real_estate_platform',
|
||||
'marketplace_fre_sellers.expected_selling_price'
|
||||
)
|
||||
->get();
|
||||
$data['data']->each(function($value){
|
||||
if($value->fractional_real_estate_platform != null)
|
||||
{
|
||||
$value->company_name = Company::where('id',$value->fractional_real_estate_platform)->value('company_name');
|
||||
}
|
||||
});
|
||||
return $data;
|
||||
try {
|
||||
|
||||
$data['data'] = MarketplaceBuyerForm::query()
|
||||
// ->leftJoin('compaines', 'marketplace_fre_sellers.fractional_real_estate_platform', 'compaines.id')
|
||||
->join('marketplace_fre_sellers', 'marketplace_buyer_forms.associated_id', 'marketplace_fre_sellers.id')
|
||||
// ->with('compaines')
|
||||
->fractionalRealEstate()
|
||||
->where('listing_status', '!=', 'Hide')
|
||||
->notSold()
|
||||
// ->select('property_name', 'property_address', 'property_grade', 'asset_type', 'fractional_real_estate_platform', 'expected_selling_price')
|
||||
->select(
|
||||
'marketplace_buyer_forms.*', // Select all columns from marketplace_aif_sellers
|
||||
'marketplace_fre_sellers.property_name',
|
||||
'marketplace_fre_sellers.slug',
|
||||
'marketplace_fre_sellers.property_address',
|
||||
'marketplace_fre_sellers.property_grade',
|
||||
'marketplace_fre_sellers.asset_type',
|
||||
'marketplace_fre_sellers.fractional_real_estate_platform',
|
||||
'marketplace_fre_sellers.expected_selling_price'
|
||||
)
|
||||
->get();
|
||||
$data['data']->each(function ($value) {
|
||||
if ($value->fractional_real_estate_platform != null) {
|
||||
$value->company_name = Company::where('id', $value->fractional_real_estate_platform)->value('company_name');
|
||||
}
|
||||
});
|
||||
return $data;
|
||||
} catch (\Exception $e) {
|
||||
Log::error("Something went wrong while fetching fre watchlist-" . $e->getMessage() . " " . $e->getLine());
|
||||
}
|
||||
}
|
||||
|
||||
public function opInvestmentWatchlist()
|
||||
@@ -902,7 +928,7 @@ class DashboardController extends Controller
|
||||
// ->where('marketplace_aif_sellers.listing_status', 'Hide')
|
||||
->select('name_of_the_aif_fund', 'fund_category', 'fund_strategy', 'type_of_fund', 'total_capital_commitment', 'uncalled_capital_commitment')
|
||||
->get();
|
||||
// dd($data);
|
||||
// dd($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -916,10 +942,9 @@ class DashboardController extends Controller
|
||||
// ->where('marketplace_fre_sellers.listing_status', 'Hide')
|
||||
->select('property_name', 'property_address', 'property_grade', 'asset_type', 'fractional_real_estate_platform', 'expected_selling_price')
|
||||
->get();
|
||||
$data['data']->each(function($value){
|
||||
if($value->fractional_real_estate_platform != null)
|
||||
{
|
||||
$value->company_name = Company::where('id',$value->fractional_real_estate_platform)->value('company_name');
|
||||
$data['data']->each(function ($value) {
|
||||
if ($value->fractional_real_estate_platform != null) {
|
||||
$value->company_name = Company::where('id', $value->fractional_real_estate_platform)->value('company_name');
|
||||
}
|
||||
});
|
||||
return $data;
|
||||
@@ -934,7 +959,7 @@ class DashboardController extends Controller
|
||||
->where('listing_status', '!=', 'Hide')
|
||||
->select('product_category', 'security_name', 'instrument_type', 'instrument_issuer', 'credit_rating', 'expected_sale_price_per_unit')
|
||||
->get();
|
||||
// dd($data);
|
||||
// dd($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -947,13 +972,13 @@ class DashboardController extends Controller
|
||||
// ->where('marketplace_aif_sellers.status', 'Approved')
|
||||
->select('name_of_the_aif_fund', 'fund_category', 'fund_strategy', 'type_of_fund', 'total_capital_commitment', 'uncalled_capital_commitment')
|
||||
->get();
|
||||
// dd($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function freInvestmentListed()
|
||||
{
|
||||
$data['data'] = MarketplaceSellerForm::query()
|
||||
// dd($data);
|
||||
return $data;
|
||||
}
|
||||
|
||||
public function freInvestmentListed()
|
||||
{
|
||||
$data['data'] = MarketplaceSellerForm::query()
|
||||
->where('marketplace_seller_forms.users_id', auth()->guard('users')->user()->id)
|
||||
->join('marketplace_fre_sellers', 'marketplace_seller_forms.id', 'marketplace_fre_sellers.seller_forms_id')
|
||||
->where('marketplace_fre_sellers.listing_status', '!=', 'Hide')
|
||||
@@ -1057,8 +1082,8 @@ class DashboardController extends Controller
|
||||
// ];
|
||||
// session::put('sellerFormData', $data);
|
||||
// if (session::has('sellerFormData')) {
|
||||
return response()->json(['status' => 200, 'message' => 'Seller Form Reviewed & Submitted!']);
|
||||
// return response()->json(['status' => 200, 'message' => 'Thank you for submitting the seller form. Our team will promptly review your submission and keep you informed regarding the status of your product listing.']);
|
||||
return response()->json(['status' => 200, 'message' => 'Seller Form Reviewed & Submitted!']);
|
||||
// return response()->json(['status' => 200, 'message' => 'Thank you for submitting the seller form. Our team will promptly review your submission and keep you informed regarding the status of your product listing.']);
|
||||
// }
|
||||
// return response()->json(['status' => 400, 'message' => 'Seller Form Could Not Be Reviewed & Submitted!']);
|
||||
}
|
||||
@@ -1080,9 +1105,9 @@ class DashboardController extends Controller
|
||||
// 'tenure_from_final_close' => 'required',
|
||||
'current_or_latest_nav' => 'required',
|
||||
'no_of_units_held' => 'required',
|
||||
'no_of_units_you_wish_to_sell' => 'required',
|
||||
// 'no_of_units_you_wish_to_sell' => 'required',
|
||||
'expected_sale_per_unit' => 'required',
|
||||
'latest_valuation_date'=>'required',
|
||||
'latest_valuation_date' => 'required',
|
||||
'name' => 'required',
|
||||
'city' => 'required',
|
||||
'country' => 'required',
|
||||
@@ -1105,13 +1130,13 @@ class DashboardController extends Controller
|
||||
// }
|
||||
$sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([
|
||||
'users_id' => $request->user()->id
|
||||
],[
|
||||
'name'=>$request->name,
|
||||
'city'=>$request->city,
|
||||
'country'=>$request->country,
|
||||
'postal_code'=>$request->postal_code,
|
||||
'contact_number'=>$request->contact_number,
|
||||
'email'=>$request->email,
|
||||
], [
|
||||
'name' => $request->name,
|
||||
'city' => $request->city,
|
||||
'country' => $request->country,
|
||||
'postal_code' => $request->postal_code,
|
||||
'contact_number' => $request->contact_number,
|
||||
'email' => $request->email,
|
||||
]);
|
||||
|
||||
$aifSellerForm = MarketplaceAlternativeInvestmentFundSeller::create([
|
||||
@@ -1131,8 +1156,8 @@ class DashboardController extends Controller
|
||||
'tenure_from_final_close' => $request->tenure_from_final_close ?? null,
|
||||
'current_or_latest_nav' => $request->current_or_latest_nav,
|
||||
'no_of_units_held' => $request->no_of_units_held,
|
||||
'no_of_units_you_wish_to_sell' => $request->no_of_units_you_wish_to_sell,
|
||||
'og_no_of_units_wish_to_sell' => $request->no_of_units_you_wish_to_sell,
|
||||
'no_of_units_you_wish_to_sell' => $request->no_of_units_you_wish_to_sell ?? 0,
|
||||
'og_no_of_units_wish_to_sell' => $request->no_of_units_you_wish_to_sell ?? 0,
|
||||
'expected_sale_per_unit' => $request->expected_sale_per_unit,
|
||||
'listing_status' => 'Hide',
|
||||
'status' => 'Pending',
|
||||
@@ -1161,7 +1186,7 @@ class DashboardController extends Controller
|
||||
'original_amount_invested' => 'required',
|
||||
'current_market_value_of_the_property' => 'required',
|
||||
'expected_selling_price' => 'required',
|
||||
'latest_valuation_date'=>'required',
|
||||
'latest_valuation_date' => 'required',
|
||||
'name' => 'required',
|
||||
'city' => 'required',
|
||||
'country' => 'required',
|
||||
@@ -1184,13 +1209,13 @@ class DashboardController extends Controller
|
||||
|
||||
$sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([
|
||||
'users_id' => $request->user()->id
|
||||
],[
|
||||
'name'=>$request->name,
|
||||
'city'=>$request->city,
|
||||
'country'=>$request->country,
|
||||
'postal_code'=>$request->postal_code,
|
||||
'contact_number'=>$request->contact_number,
|
||||
'email'=>$request->email,
|
||||
], [
|
||||
'name' => $request->name,
|
||||
'city' => $request->city,
|
||||
'country' => $request->country,
|
||||
'postal_code' => $request->postal_code,
|
||||
'contact_number' => $request->contact_number,
|
||||
'email' => $request->email,
|
||||
]);
|
||||
|
||||
// dd($request->all(),$request->user()->id,request()->user()->id);
|
||||
@@ -1213,7 +1238,7 @@ class DashboardController extends Controller
|
||||
'listing_status' => 'Hide',
|
||||
'status' => 'Pending',
|
||||
'latest_valuation_date' => $request->latest_valuation_date, //latest_valuation_date added by hritik on 09-04-24
|
||||
|
||||
|
||||
]);
|
||||
if ($freSellerForm) {
|
||||
$user = User::find($request->user()->id);
|
||||
|
||||
@@ -19,7 +19,7 @@ class MonthlyUpdateAlternativeInvestmentFund extends Model
|
||||
$arr = [];
|
||||
if($value){
|
||||
foreach(json_decode($value) as $data){
|
||||
$val = imagePath('api/get-statement-report/') . $data;
|
||||
$val = imagePath('storage/app/files/monthly-update/') . $data;
|
||||
// $val = 'api/get-statement-report/' . $data;
|
||||
array_push($arr,$val);
|
||||
}
|
||||
|
||||
@@ -18,7 +18,8 @@ class MonthlyUpdateFractionalRealEstate extends Model
|
||||
if($value){
|
||||
$arr = [];
|
||||
foreach(json_decode($value) as $data){
|
||||
$val = imagePath('api/get-statement-report/') . $data;
|
||||
// $val = imagePath('get-statement-report/') . $data;
|
||||
$val = imagePath('storage/app/files/monthly-update/') . $data;
|
||||
array_push($arr,$val);
|
||||
}
|
||||
return $arr ;
|
||||
|
||||
@@ -57,7 +57,7 @@ class RouteServiceProvider extends ServiceProvider
|
||||
protected function configureRateLimiting()
|
||||
{
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip());
|
||||
return Limit::perMinute(500)->by(optional($request->user())->id ?: $request->ip());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
@@ -3,6 +3,7 @@
|
||||
use Monolog\Handler\NullHandler;
|
||||
use Monolog\Handler\StreamHandler;
|
||||
use Monolog\Handler\SyslogUdpHandler;
|
||||
use Monolog\Processor\PsrLogMessageProcessor;
|
||||
|
||||
return [
|
||||
|
||||
@@ -19,6 +20,22 @@ return [
|
||||
|
||||
'default' => env('LOG_CHANNEL', 'stack'),
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Deprecations Log Channel
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This option controls the log channel that should be used to log warnings
|
||||
| regarding deprecated PHP and library features. This allows you to get
|
||||
| your application ready for upcoming major versions of dependencies.
|
||||
|
|
||||
*/
|
||||
|
||||
'deprecations' => [
|
||||
'channel' => env('LOG_DEPRECATIONS_CHANNEL', 'null'),
|
||||
'trace' => false,
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| Log Channels
|
||||
@@ -37,7 +54,7 @@ return [
|
||||
'channels' => [
|
||||
'stack' => [
|
||||
'driver' => 'stack',
|
||||
'channels' => ['single'],
|
||||
'channels' => ['single', 'daily'],
|
||||
'ignore_exceptions' => false,
|
||||
],
|
||||
|
||||
@@ -45,13 +62,15 @@ return [
|
||||
'driver' => 'single',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'daily' => [
|
||||
'driver' => 'daily',
|
||||
'path' => storage_path('logs/laravel.log'),
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'days' => 14,
|
||||
'days' => 30,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'slack' => [
|
||||
@@ -60,35 +79,43 @@ return [
|
||||
'username' => 'Laravel Log',
|
||||
'emoji' => ':boom:',
|
||||
'level' => env('LOG_LEVEL', 'critical'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'papertrail' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => SyslogUdpHandler::class,
|
||||
'handler' => env('LOG_PAPERTRAIL_HANDLER', SyslogUdpHandler::class),
|
||||
'handler_with' => [
|
||||
'host' => env('PAPERTRAIL_URL'),
|
||||
'port' => env('PAPERTRAIL_PORT'),
|
||||
'connectionString' => 'tls://' . env('PAPERTRAIL_URL') . ':' . env('PAPERTRAIL_PORT'),
|
||||
],
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'stderr' => [
|
||||
'driver' => 'monolog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'handler' => StreamHandler::class,
|
||||
'formatter' => env('LOG_STDERR_FORMATTER'),
|
||||
'with' => [
|
||||
'stream' => 'php://stderr',
|
||||
],
|
||||
'processors' => [PsrLogMessageProcessor::class],
|
||||
],
|
||||
|
||||
'syslog' => [
|
||||
'driver' => 'syslog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'facility' => LOG_USER,
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'errorlog' => [
|
||||
'driver' => 'errorlog',
|
||||
'level' => env('LOG_LEVEL', 'debug'),
|
||||
'replace_placeholders' => true,
|
||||
],
|
||||
|
||||
'null' => [
|
||||
@@ -102,3 +129,4 @@ return [
|
||||
],
|
||||
|
||||
];
|
||||
|
||||
|
||||
@@ -6559,3 +6559,9 @@ button#modal_close span {
|
||||
.admin-profile .dropdown .dropdown-menu {
|
||||
max-height: 500px !important;
|
||||
}
|
||||
.Secondary .table p {
|
||||
text-align: center !important;
|
||||
font-size: 14px;
|
||||
font-style: normal;
|
||||
margin-top: 15px;
|
||||
}
|
||||
@@ -54,7 +54,7 @@
|
||||
</div>
|
||||
<div class="col-md-6 my-3">
|
||||
<div class="veiw_detials_area">
|
||||
<label> <b class='fw-bold'>Fractional Real estate Platform</b>: {{$data->company->company_name}}</label>
|
||||
<label> <b class='fw-bold'>Fractional Real estate Platform</b>: {{$data->company->company_name ?? null}}</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6 my-3">
|
||||
|
||||
@@ -1149,12 +1149,12 @@
|
||||
$('#manage_sub_admin').click(function() {
|
||||
if ($('#manage_sub_admin').prop('checked') == true) {
|
||||
checkCheckbox('#sub_admin');
|
||||
checkCheckbox('#user_list');
|
||||
checkCheckbox('#update_user_password');
|
||||
// checkCheckbox('#user_list');
|
||||
// checkCheckbox('#update_user_password');
|
||||
} else {
|
||||
unCheckCheckbox('#sub_admin');
|
||||
unCheckCheckbox('#user_list');
|
||||
unCheckCheckbox('#update_user_password');
|
||||
// unCheckCheckbox('#user_list');
|
||||
// unCheckCheckbox('#update_user_password');
|
||||
}
|
||||
checkSubAdmin();
|
||||
});
|
||||
@@ -1184,8 +1184,10 @@
|
||||
'#manage_blogs').prop('checked') == false || $('#manage_faq').prop('checked') == false ||
|
||||
$('#manage_testimonial').prop('checked') == false || $('#privacy_policy').prop('checked') == false || $(
|
||||
'#terms_and_conditions').prop('checked') == false || $('#manage_sub_admin').prop('checked') == false ||
|
||||
$('#sub_admin').prop('checked') == false || $('#user_list').prop('checked') == false ||
|
||||
$('#update_user_password').prop('checked') == false || $('#manage_lead').prop('checked') == false || $(
|
||||
$('#sub_admin').prop('checked') == false ||
|
||||
// $('#user_list').prop('checked') == false ||
|
||||
// $('#update_user_password').prop('checked') == false ||
|
||||
$('#manage_lead').prop('checked') == false || $(
|
||||
'#contact_us_form').prop('checked') == false) {
|
||||
unCheckCheckbox('#admin_user');
|
||||
checkCheckbox('#sub_admin_user');
|
||||
@@ -1310,8 +1312,10 @@
|
||||
|
||||
// manage sub admin
|
||||
function checkManageSubAdminCheckBox() {
|
||||
if ($('#sub_admin').prop('checked') == true || $('#user_list').prop('checked') == true || $(
|
||||
'#update_user_password').prop('checked') == true) {
|
||||
if ($('#sub_admin').prop('checked') == true
|
||||
// || $('#user_list').prop('checked') == true
|
||||
// || $('#update_user_password').prop('checked') == true
|
||||
) {
|
||||
if ($('#manage_sub_admin').prop('checked') == false) {
|
||||
checkCheckbox('#manage_sub_admin');
|
||||
}
|
||||
|
||||
@@ -1170,12 +1170,12 @@
|
||||
$('#manage_sub_admin').click(function() {
|
||||
if ($('#manage_sub_admin').prop('checked') == true) {
|
||||
checkCheckbox('#sub_admin');
|
||||
checkCheckbox('#user_list');
|
||||
checkCheckbox('#update_user_password');
|
||||
// checkCheckbox('#user_list');
|
||||
// checkCheckbox('#update_user_password');
|
||||
} else {
|
||||
unCheckCheckbox('#sub_admin');
|
||||
unCheckCheckbox('#user_list');
|
||||
unCheckCheckbox('#update_user_password');
|
||||
// unCheckCheckbox('#user_list');
|
||||
// unCheckCheckbox('#update_user_password');
|
||||
}
|
||||
checkSubAdmin();
|
||||
});
|
||||
@@ -1205,8 +1205,10 @@
|
||||
'#manage_blogs').prop('checked') == false || $('#manage_faq').prop('checked') == false ||
|
||||
$('#manage_testimonial').prop('checked') == false || $('#privacy_policy').prop('checked') == false || $(
|
||||
'#terms_and_conditions').prop('checked') == false || $('#manage_sub_admin').prop('checked') == false ||
|
||||
$('#sub_admin').prop('checked') == false || $('#user_list').prop('checked') == false ||
|
||||
$('#update_user_password').prop('checked') == false || $('#manage_lead').prop('checked') == false || $(
|
||||
$('#sub_admin').prop('checked') == false ||
|
||||
// $('#user_list').prop('checked') == false ||
|
||||
// $('#update_user_password').prop('checked') == false ||
|
||||
$('#manage_lead').prop('checked') == false || $(
|
||||
'#contact_us_form').prop('checked') == false) {
|
||||
unCheckCheckbox('#admin_user');
|
||||
checkCheckbox('#sub_admin_user');
|
||||
@@ -1331,8 +1333,10 @@
|
||||
|
||||
// manage sub admin
|
||||
function checkManageSubAdminCheckBox() {
|
||||
if ($('#sub_admin').prop('checked') == true || $('#user_list').prop('checked') == true || $(
|
||||
'#update_user_password').prop('checked') == true) {
|
||||
if ($('#sub_admin').prop('checked') == true
|
||||
// || $('#user_list').prop('checked') == true || $(
|
||||
// '#update_user_password').prop('checked') == true
|
||||
) {
|
||||
if ($('#manage_sub_admin').prop('checked') == false) {
|
||||
checkCheckbox('#manage_sub_admin');
|
||||
}
|
||||
|
||||
@@ -166,8 +166,8 @@
|
||||
<tr>
|
||||
<td>Statement/Reports</td>
|
||||
@if($data['data']['statement_reports'])
|
||||
@foreach($data['data']['statement_reports'] as $data)
|
||||
<td><a href="{{$data}}">Statement/Reports {{$loop->iteration}}</a></td>
|
||||
@foreach(json_decode($data['data']->getRawOriginal()['statement_reports']) as $data)
|
||||
<td><a href="{{imagePath()."get-statement-report/".$data}}">Statement/Reports {{$loop->iteration}}</a></td>
|
||||
@endforeach
|
||||
@else
|
||||
<td>N/A</td>
|
||||
|
||||
@@ -140,9 +140,10 @@
|
||||
|
||||
<tr>
|
||||
<td>Statement/Reports</td>
|
||||
{{-- @dd(json_decode($data['data']->getRawOriginal()['statement_reports'])) --}}
|
||||
@if($data['data']['statement_reports'])
|
||||
@foreach($data['data']['statement_reports'] as $data)
|
||||
<td><a href="{{$data}}">Statement/Reports {{$loop->iteration}}</a></td>
|
||||
@foreach(json_decode($data['data']->getRawOriginal()['statement_reports']) as $data)
|
||||
<td><a href="{{imagePath().'get-statement-report/'.$data}}">Statement/Reports {{$loop->iteration}}</a></td>
|
||||
@endforeach
|
||||
@else
|
||||
<td>N/A</td>
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
if (value == 'Category III') {
|
||||
$('#type_of_fund').html('');
|
||||
$('#type_of_fund').html(
|
||||
"<select name='type_of_fund' id='type_of_fund'><option value=''>Select Type Of Fund</option><option value='Long Only Quity Funds'>Long Only Quity Funds</option><option value='Hedge Fund'>Hedge Fund</option><option value='PIPE Fund'>PIPE Fund</option><option value='Others'>Others</option></select>"
|
||||
"<select name='type_of_fund' id='type_of_fund'><option value=''>Select Type Of Fund</option><option value='Long Only Equity Funds'>Long Only Equity Funds</option><option value='Hedge Fund'>Hedge Fund</option><option value='PIPE Fund'>PIPE Fund</option><option value='Others'>Others</option></select>"
|
||||
);
|
||||
}
|
||||
})
|
||||
|
||||
@@ -462,6 +462,9 @@ Route::get('new-mail-template',function(){
|
||||
return view('Admin.email.new-mail-template');
|
||||
});
|
||||
|
||||
|
||||
Route::get("get-statement-report/{file_name}", [FrontendDashboardController::class, 'getStatementReportAPI'])->name('get-statement-report-api');
|
||||
|
||||
//User Routes
|
||||
Route::middleware([FrontendAccess::class])->group(function () {
|
||||
Route::get("market-list/{custom_id?}", [FrontendDashboardController::class, 'viewDetailMarketPlace'])->name('market-list');
|
||||
|
||||
Reference in New Issue
Block a user