fixing issue of market dashboard
This commit is contained in:
@@ -34,21 +34,26 @@ class DashboardController extends Controller
|
||||
$user = $this->getUser()->data;
|
||||
$currentInvestmentProduct = $this->view_investors_details('Holding');
|
||||
$reedemedInvestmentProduct = $this->view_investors_details('Reedemed');
|
||||
// watchlist
|
||||
|
||||
// investment on watchlist
|
||||
$aifInvestmentWatchlist = $this->aifInvestmentWatchlist()['data'];
|
||||
$freInvestmentWatchlist = $this->freInvestmentWatchlist()['data'];
|
||||
$opInvestmentWatchlist = $this->opInvestmentWatchlist()['data'];
|
||||
// sold
|
||||
// dd($freInvestmentWatchlist);
|
||||
// investment on bought
|
||||
$aifSoldInvestmentWatchlist = $this->aifSoldInvestmentWatchlist()['data'];
|
||||
$freSoldInvestmentWatchlist = $this->freSoldInvestmentWatchlist()['data'];
|
||||
$opSoldInvestmentWatchlist = $this->opSoldInvestmentWatchlist()['data'];
|
||||
|
||||
// bought
|
||||
$aifInvestmentListed = $this->aifInvestmentListed()['data'];
|
||||
$freInvestmentListed = $this->freInvestmentListed()['data'];
|
||||
$opInvestmentListed = $this->opInvestmentListed()['data'];
|
||||
//
|
||||
|
||||
// investment on sale
|
||||
$marketPlaceAIFSellerData = $this->getMarketplaceAIFSellerData(1);
|
||||
$marketPlaceFRESellerData = $this->getMarketplaceFRESellerData(1);
|
||||
|
||||
// dd($marketPlaceFRESellerData);
|
||||
$marketPlaceOPSellerData = $this->getMarketplaceOPSellerData();
|
||||
$totalInvestmentTillDate = '₹ ' . $this->IND_money_format($currentInvestmentProduct['totalInvestmentInInt'] + $reedemedInvestmentProduct['totalInvestmentInInt']);
|
||||
@@ -128,7 +133,19 @@ class DashboardController extends Controller
|
||||
// }
|
||||
// return $market_place_data;
|
||||
$sellerData = MarketplaceSellerForm::with('fre')->where('users_id',$id)->get();
|
||||
// dd(count($sellerData->toArray()));
|
||||
// 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($sellerData->toArray());
|
||||
if($api == null)
|
||||
{
|
||||
$data['data'] = $sellerData;
|
||||
@@ -777,11 +794,19 @@ class DashboardController extends Controller
|
||||
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')
|
||||
->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');
|
||||
}
|
||||
});
|
||||
return $data;
|
||||
}
|
||||
|
||||
@@ -820,6 +845,12 @@ 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');
|
||||
}
|
||||
});
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user