diff --git a/app/Imports/StockFundsRealEstateExchangeImport.php b/app/Imports/StockFundsRealEstateExchangeImport.php index 52d50f3..3449b90 100644 --- a/app/Imports/StockFundsRealEstateExchangeImport.php +++ b/app/Imports/StockFundsRealEstateExchangeImport.php @@ -52,7 +52,7 @@ class StockFundsRealEstateExchangeImport implements ToCollection, WithHeadingRow // { // $name = 'no'; // } - // dd($rows, $name); + // dd($rows); foreach ($rows as $row) { $product = Product::create([ 'tables_id' => Table::StockFundsRealEstateExchangeTable, @@ -62,7 +62,8 @@ class StockFundsRealEstateExchangeImport implements ToCollection, WithHeadingRow 'created_by' => auth()->user()->id, 'description'=> $row['description'] ?? null ]); - $count = StockFundsRealEstateExchange::where('name',$row['stock_name'])->count(); + // $count = StockFundsRealEstateExchange::where('name',$row['stock_name'])->count(); + $count = StockFundsRealEstateExchange::where('name',$row['name'])->count(); // $count = StockFundsRealEstateExchange::where(function($query) use($row){ // $query->orWhere('stock_name'); // $query->orWhere('etf_name'); @@ -74,7 +75,8 @@ class StockFundsRealEstateExchangeImport implements ToCollection, WithHeadingRow 'products_id' => $product->id, // 'slug' => $count < 2 ? Str::slug($row['stock_name'] ?? $row['etf_name'] ?? $row['reit_name']) : Str::slug($row['stock_name'].'-'.$count+1 ?? $row['etf_name'].'-'.$count+1 ?? $row['reit_name'].'-'.$count+1), // 'name' => $row['stock_name'] ?? $row['etf_name'] ?? $row['reit_name'], - 'slug' => $count < 2 ? Str::slug($row['stock_name'] ?? $row['etf_name'] ?? $row['reit_name']) : Str::slug($row['stock_name'].'-'.$count+1 ?? $row['etf_name'].'-'.$count+1 ?? $row['reit_name'].'-'.$count+1), + // 'slug' => $count < 2 ? Str::slug($row['stock_name'] ?? $row['etf_name'] ?? $row['reit_name']) : Str::slug($row['stock_name'].'-'.$count+1 ?? $row['etf_name'].'-'.$count+1 ?? $row['reit_name'].'-'.$count+1), + 'slug' => $count < 2 ? Str::slug($row['name']) : Str::slug($row['name'].'-'.$count+1), 'name' => $row['name'] ?? null, // 'type' => $this->fundType, 'ticker' => $row['ticker'], diff --git a/app/Services/Frontend/GlobalRealEstateService.php b/app/Services/Frontend/GlobalRealEstateService.php index ddeba91..c6bb1d8 100644 --- a/app/Services/Frontend/GlobalRealEstateService.php +++ b/app/Services/Frontend/GlobalRealEstateService.php @@ -33,12 +33,12 @@ class GlobalRealEstateService{ public function fullyFundedGCRE() { - return $this->returnResponse(Product::has('realEstate')->with('realEstate','categorys')->globalCommercialRealEstate()->open()->active()->get()); + return $this->returnResponse(Product::has('realEstate')->with('realEstate','categorys')->globalCommercialRealEstate()->fullyFunded()->active()->get()); } public function resaleGCRE() { - return $this->returnResponse(Product::has('realEstate')->with('realEstate','categorys')->globalCommercialRealEstate()->open()->active()->get()); + return $this->returnResponse(Product::has('realEstate')->with('realEstate','categorys')->globalCommercialRealEstate()->resale()->active()->get()); } public function openGRRE() @@ -48,12 +48,12 @@ class GlobalRealEstateService{ public function fullyFundedGRRE() { - return $this->returnResponse(Product::has('realEstate')->with('realEstate','categorys')->globalResidentialRealEstate()->open()->active()->get()); + return $this->returnResponse(Product::has('realEstate')->with('realEstate','categorys')->globalResidentialRealEstate()->fullyFunded()->active()->get()); } public function resaleGRRE() { - return $this->returnResponse(Product::has('realEstate')->with('realEstate','categorys')->globalResidentialRealEstate()->open()->active()->get()); + return $this->returnResponse(Product::has('realEstate')->with('realEstate','categorys')->globalResidentialRealEstate()->resale()->active()->get()); } public function globalCommercialRealEstateLearnMore(){ diff --git a/app/helper.php b/app/helper.php index 9db5ea3..0923007 100644 --- a/app/helper.php +++ b/app/helper.php @@ -394,6 +394,11 @@ function getCategoryIcons($categoryId) "public/assets/media/FrontendImages/resi-real-state.svg" => Category::GlobalResidentialRealEstateID, "public/assets/media/FrontendImages/comm-real-state.svg" => Category::GlobalCommercialRealEstateID, ]; + + if ($categoryId === Category::PrivateEquityFundId) { + return "public/assets/media/FrontendImages/equity-funds.svg"; + } $condition = array_search($categoryId, $category_icons); + // return $condition; return $condition == true ? $condition : 'public/assets/media/FrontendImages/bay-arrow.svg'; } diff --git a/public/excel-template/RealEstateInvestmentTrustsTemplate.xlsx b/public/excel-template/RealEstateInvestmentTrustsTemplate.xlsx index 2c4a5da..b5cf12e 100644 Binary files a/public/excel-template/RealEstateInvestmentTrustsTemplate.xlsx and b/public/excel-template/RealEstateInvestmentTrustsTemplate.xlsx differ diff --git a/resources/views/Admin/Pages/manage_freeu_investment/manage_freeu_investment.blade.php b/resources/views/Admin/Pages/manage_freeu_investment/manage_freeu_investment.blade.php index de12906..a9073e5 100644 --- a/resources/views/Admin/Pages/manage_freeu_investment/manage_freeu_investment.blade.php +++ b/resources/views/Admin/Pages/manage_freeu_investment/manage_freeu_investment.blade.php @@ -111,13 +111,13 @@