diff --git a/app/Http/Controllers/Admin/OverviewController.php b/app/Http/Controllers/Admin/OverviewController.php index 344f5b9..59bb618 100644 --- a/app/Http/Controllers/Admin/OverviewController.php +++ b/app/Http/Controllers/Admin/OverviewController.php @@ -267,7 +267,7 @@ class OverviewController extends Controller public function listingTransfer() { - $check = checkSidebarAccess('investment-listing-transfer'); + $check = checkSidebarAccess('investment-`listing-transfer`'); if (!$check) { abort(404); } @@ -368,22 +368,38 @@ class OverviewController extends Controller if (!$check) { abort(404); } - $aifBuyerForm = MarketplaceAlternativeInvestmentFundSeller::with('seller', 'company')->join('marketplace_buyer_forms', 'marketplace_aif_sellers.id', 'marketplace_buyer_forms.associated_id') - ->latest('marketplace_aif_sellers.created_at')->get(); - $freBuyerForm = MarketplaceFractionalRealEstateSeller::with('seller', 'company')->join('marketplace_buyer_forms', 'marketplace_fre_sellers.id', 'marketplace_buyer_forms.associated_id')->latest('marketplace_fre_sellers.created_at')->get(); - $opBuyerForm = MarketplaceOtherProductsSeller::with('seller', 'company')->join('marketplace_buyer_forms', 'marketplace_op_sellers.id', 'marketplace_buyer_forms.associated_id')->latest('marketplace_op_sellers.created_at')->get(); - $completedData = collect(); - $aifBuyerForm->each(function($value) use($completedData){ - $completedData[] = $value; - }); - $freBuyerForm->each(function($value) use($completedData){ - $completedData[] = $value; - }); - // $latestArray = array_merge($aifBuyerForm->toArray(),$freBuyerForm->toArray()); - $newData = $completedData->sortBy('created_at'); + // $aifBuyerForm = MarketplaceAlternativeInvestmentFundSeller::with('seller', 'company', 'buyer')->join('marketplace_buyer_forms', 'marketplace_aif_sellers.id', 'marketplace_buyer_forms.associated_id') + // ->latest('marketplace_aif_sellers.created_at')->get(); + // $freBuyerForm = MarketplaceFractionalRealEstateSeller::with('seller', 'company', 'buyer')->join('marketplace_buyer_forms', 'marketplace_fre_sellers.id', 'marketplace_buyer_forms.associated_id')->latest('marketplace_fre_sellers.created_at')->get(); + // $opBuyerForm = MarketplaceOtherProductsSeller::with('seller', 'company')->join('marketplace_buyer_forms', 'marketplace_op_sellers.id', 'marketplace_buyer_forms.associated_id')->latest('marketplace_op_sellers.created_at')->get(); + + + $marketPlaceBuyerFrom = MarketplaceBuyerForm::where('status','Sold')->get(); + $newData = collect(); + foreach($marketPlaceBuyerFrom as $item){ + if($item->table == 'marketplace_fre_sellers'){ + $item['data'] = MarketplaceFractionalRealEstateSeller::with('seller', 'company',)->where('id',$item->associated_id)->first(); + $newData->push($item); + } + else if($item->table == 'marketplace_aif_sellers') + { + $item['data'] = MarketplaceAlternativeInvestmentFundSeller::with('seller', 'company',)->where('id',$item->associated_id)->first(); + $newData->push($item); + } + } + // dd($newData); + // $completedData = collect(); + // $aifBuyerForm->each(function($value) use($completedData){ + // $completedData[] = $value; + // }); + // $freBuyerForm->each(function($value) use($completedData){ + // $completedData[] = $value; + // }); + // $newData = $completedData->sortBy('buyer.updated_at'); $companies = Company::active()->pluck('company_name', 'id'); - return view('Admin.Pages.pre_owned_investment.transactions', compact('aifBuyerForm', 'freBuyerForm', 'opBuyerForm', 'companies','newData')); + // return view('Admin.Pages.pre_owned_investment.transactions', compact('aifBuyerForm', 'freBuyerForm', 'opBuyerForm', 'companies','newData')); + return view('Admin.Pages.pre_owned_investment.transactions', compact('companies','newData')); } // public function manage_seller_profile() @@ -438,7 +454,7 @@ class OverviewController extends Controller public function updateCompleteTransaction(Request $request) { - + // dd($request->all()); $completedTransactionUpdated = MarketplaceBuyerForm::where('id', $request->buyer_id)->update([ 'complete_units_sold' => $request->final_units_sold, 'complete_sale_value' => $request->final_sale_value, diff --git a/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php b/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php index 7a7166a..59af686 100644 --- a/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php +++ b/app/Http/Controllers/Frontend/AlternativeInvestmentFundController.php @@ -156,7 +156,8 @@ class AlternativeInvestmentFundController extends Controller public function ventureCapitalFundProduct($slug) { - $ventureCapitalFund = $this->ventureCapitalData($slug)->getData(); + $ventureCapitalFund = $this->ventureCapitalData($slug)->getData()->data; + // dd($ventureCapitalFund); $otherVCP = AlternativeInvestmentFund::query() ->join('products', 'alternative_investment_funds.products_id', 'products.id') ->where(['status' => true, 'categories_id' => 28]) diff --git a/app/Http/Controllers/Frontend/HandpickedInvestmentController.php b/app/Http/Controllers/Frontend/HandpickedInvestmentController.php index 65bb160..e6e4474 100644 --- a/app/Http/Controllers/Frontend/HandpickedInvestmentController.php +++ b/app/Http/Controllers/Frontend/HandpickedInvestmentController.php @@ -73,7 +73,11 @@ class HandpickedInvestmentController extends Controller ]; $products = Product::query() - ->select(DB::raw('products.id, products.categories_id as category_id, coalesce(fre.property_name_and_location,aif.fund_name,re.property_name,funds.fund_name) as product_name'), DB::raw('coalesce(companies.company_logo) as company_logo'), DB::raw('coalesce(fre.slug,aif.slug,re.slug, funds.slug) as slug'), DB::raw('coalesce(fre.geographic_focus,aif.geographic_focus,re.geographic_focus, funds.geographic_focus) as geographic_focus'), DB::raw('coalesce(aif.minimum_capital_commitment,fre.minimum_investment,funds.minimum_investment,re.total_price) as minimum_investment'), DB::raw('coalesce(aif.description,fre.property_description,re.remarks,funds.fund_description) as description'), DB::raw('coalesce(categories.category_name) as category_name')) + ->select(DB::raw('products.id, products.categories_id as category_id, coalesce(fre.property_name_and_location,aif.fund_name,re.property_name,funds.fund_name) as product_name'), DB::raw('coalesce(companies.company_logo) as company_logo'), DB::raw('coalesce(fre.slug,aif.slug,re.slug, funds.slug) as slug'), DB::raw('coalesce(fre.geographic_focus,aif.geographic_focus,re.geographic_focus, funds.geographic_focus) as geographic_focus'), DB::raw('coalesce(aif.minimum_capital_commitment,fre.minimum_investment,funds.minimum_investment,re.total_price) as minimum_investment'), + // DB::raw('coalesce(aif.description,fre.property_description,re.remarks,funds.fund_description) as description'), + DB::raw('coalesce(fre.property_description,products.description) as description'), + // 'products.description', + DB::raw('coalesce(categories.category_name) as category_name')) ->leftJoin('fractional_real_estates as fre', 'products.id', 'fre.products_id') ->leftJoin('alternative_investment_funds as aif', 'products.id', 'aif.products_id') ->leftJoin('companies', 'fre.companies_id', 'companies.id') diff --git a/app/Imports/FractionalRealEstateImport.php b/app/Imports/FractionalRealEstateImport.php index 96e1325..38ccf07 100644 --- a/app/Imports/FractionalRealEstateImport.php +++ b/app/Imports/FractionalRealEstateImport.php @@ -93,9 +93,9 @@ class FractionalRealEstateImport implements ToCollection, WithHeadingRow 'tables_id' => Table::FractionalRealEstateTable, 'categories_id' => $this->category_id, 'total_views' => 0, - 'status' => 1, + // 'status' => 1, 'created_by' => auth()->user()->id, - 'description'=> $row['description'] ?? null, + 'description'=> $row['property_description'] ?? null, ]); $count = FractionalRealEstate::where('property_name_and_location',$row['property_name_and_location'])->count(); FractionalRealEstate::create([ diff --git a/app/Models/MarketplaceAlternativeInvestmentFundSeller.php b/app/Models/MarketplaceAlternativeInvestmentFundSeller.php index a9b8e1c..7cd6a0d 100644 --- a/app/Models/MarketplaceAlternativeInvestmentFundSeller.php +++ b/app/Models/MarketplaceAlternativeInvestmentFundSeller.php @@ -21,6 +21,11 @@ class MarketplaceAlternativeInvestmentFundSeller extends Model return $this->belongsTo(MarketplaceSellerForm::class, 'seller_forms_id'); } + public function buyer() + { + return $this->belongsTo(MarketplaceBuyerForm::class, 'seller_forms_id'); + } + public function Sluggable(): array { return [ diff --git a/app/Models/MarketplaceBuyerForm.php b/app/Models/MarketplaceBuyerForm.php index a9430c4..fb3eced 100644 --- a/app/Models/MarketplaceBuyerForm.php +++ b/app/Models/MarketplaceBuyerForm.php @@ -89,4 +89,11 @@ class MarketplaceBuyerForm extends Model public function company(){ return $this->belongsTo(Company::class,'platform'); } + + public function freSellerData(){ + return $this->hasOne(MarketplaceFractionalRealEstateSeller::class,'id','associated_id'); + } + public function aifSellerData(){ + return $this->hasOne(MarketplaceAlternativeInvestmentFundSeller::class,'id','associated_id'); + } } diff --git a/app/Models/MarketplaceFractionalRealEstateSeller.php b/app/Models/MarketplaceFractionalRealEstateSeller.php index 029ba39..4415b3f 100644 --- a/app/Models/MarketplaceFractionalRealEstateSeller.php +++ b/app/Models/MarketplaceFractionalRealEstateSeller.php @@ -19,6 +19,10 @@ class MarketplaceFractionalRealEstateSeller extends Model public function seller(){ return $this->belongsTo(MarketplaceSellerForm::class,'seller_forms_id'); } + + public function buyer(){ + return $this->belongsTo(MarketplaceBuyerForm::class,'seller_forms_id'); + } public function company(){ return $this->belongsTo(Company::class,'fractional_real_estate_platform'); diff --git a/app/Models/Product.php b/app/Models/Product.php index 8fcaadd..e94772d 100644 --- a/app/Models/Product.php +++ b/app/Models/Product.php @@ -18,7 +18,7 @@ class Product extends Model protected $hidden = ['tables_id', 'total_views', 'created_by', 'modified_by', 'updated_at', 'deleted_at']; - protected $fillable = ['tables_id', 'categories_id', 'total_views', 'status', 'top_pick', 'created_by', 'modified_by', 'presentation', 'fact_sheet', 'type', 'profit_sharing', 'upfront_rate', 'trail_rate', 'gst', 'tds', 'end_of_trail', 'channel_partner_aggrement']; + protected $fillable = ['tables_id', 'description', 'categories_id', 'total_views', 'status', 'top_pick', 'created_by', 'modified_by', 'presentation', 'fact_sheet', 'type', 'profit_sharing', 'upfront_rate', 'trail_rate', 'gst', 'tds', 'end_of_trail', 'channel_partner_aggrement']; // public function companies(){ // return $this->belongsTo(Company::class,'id','companies_id'); @@ -405,7 +405,8 @@ class Product extends Model $products = $query->select(\DB::raw('products.id,coalesce(fre.property_name_and_location,aif.fund_name,bd.issuer,fd.fund_name,exchange.name,re.property_name) as product_name'), 'products.categories_id as categories_id', 'categories.category_name', 'top_pick', 'fre.property_image', 'company_logo', 'file_name', \DB::raw('coalesce(fre.geographic_focus,aif.geographic_focus,bd.geographic_focus,fd.geographic_focus,exchange.geographic_focus,re.geographic_focus) as geographic_focus'), \DB::raw('coalesce(fre.minimum_investment,aif.minimum_capital_commitment,bd.minimum_investment,fd.minimum_investment,re.total_price) as minimum_investment'), \DB::raw('coalesce(fre.slug,aif.slug,bd.slug,fd.slug,re.slug,exchange.slug) as slug'), // \DB::raw('coalesce(fre.property_description,aif.description,bd.about_issuer,fd.fund_description,exchange.about,re.remarks) as description') - 'products.description' + \DB::raw('coalesce(products.description) as description') + // 'products.description' ) ->leftJoin('fractional_real_estates as fre', 'products.id', 'fre.products_id') ->leftJoin('alternative_investment_funds as aif', 'products.id', 'aif.products_id') diff --git a/public/assets/css/FrontendCss/style.css b/public/assets/css/FrontendCss/style.css index 19844f5..0c325cb 100644 --- a/public/assets/css/FrontendCss/style.css +++ b/public/assets/css/FrontendCss/style.css @@ -4613,6 +4613,9 @@ button.swal2-confirm.btn.btn-primary.popup-button { #exampleModalCenter .modal-content a.yellow-btn { height: 42px; } +#exampleModalCenter button.btn.btn-secondary { + background-color: #1b243d; +} /*======responsive=====*/ @@ -4682,6 +4685,9 @@ button.swal2-confirm.btn.btn-primary.popup-button { .investor-profile .invest-view-form .form-sec { width: 500px; } + .menubar .dropdown-menu{ + left: -90px !important; + } } @media (max-width: 1024px) { .notification-drop .item-noti .notification { @@ -4960,6 +4966,20 @@ button.swal2-confirm.btn.btn-primary.popup-button { height: auto; padding: 3rem 0; } + .menubar .dropdown-menu { + left: -10px !important; + } + .notification-drop .item-noti img { + filter: inherit; + height: 29px; + width: 28px; + } + .header-menu .page li .item-noti a { + padding-top: 0; + } + .notification-drop .item-noti .notification { + left: 0; + } } @media (max-width: 768px) { diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 969d18d..41c4f7d 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -1283,3 +1283,13 @@ nav { height: 66%; overflow: scroll; } +#manage_commission_view .modal-dialog .btn.btn-active-color-primary:hover:not(.btn-active) { + background-color: inherit !important; +} +#update_user_role_form button { + background-color: #c18948; + border: none; + color: #fff; + padding: 8px 20px; + border-radius: 5px; +} diff --git a/resources/views/Admin/Pages/manage_chat/manage_chat.blade.php b/resources/views/Admin/Pages/manage_chat/manage_chat.blade.php index 615d3bb..18848ee 100644 --- a/resources/views/Admin/Pages/manage_chat/manage_chat.blade.php +++ b/resources/views/Admin/Pages/manage_chat/manage_chat.blade.php @@ -2,7 +2,7 @@ @section('style') @endsection diff --git a/resources/views/Admin/Pages/pre_owned_investment/interested-buyers.blade.php b/resources/views/Admin/Pages/pre_owned_investment/interested-buyers.blade.php index 5532d63..6818168 100644 --- a/resources/views/Admin/Pages/pre_owned_investment/interested-buyers.blade.php +++ b/resources/views/Admin/Pages/pre_owned_investment/interested-buyers.blade.php @@ -62,7 +62,7 @@ -
| Contact Number | No. Of Units Wish To Buy | Offer Price Per Unit | -Total Purchase Value | +Total Purchase Value | Current Status | -Action | +Action | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
- {{$iteration}}
+ {{$loop->iteration}}
|
{{$data->name}} | -{{$data->seller->name}} | -{{$data->name_of_the_aif_fund ?? $data->property_name ?? $data->security_name}} | - @php($offerPricePerUnit = IND_money_format($data->offer_price_per_unit)) - @php($totalPurchaseValue = IND_money_format($data->total_purchase_value)) - {{--{{$offerPricePerUnit}} | -{{$totalPurchaseValue}} | -{{$data->created_at->format('d/m/y')}} | --}} -{{$data->complete_units_sold}} | +{{$data->data->seller->name}} | +{{$data->data->name_of_the_aif_fund ?? $data->data->property_name}} | + @php($offerPricePerUnit = IND_money_format($data->getAttributes()['offer_price_per_unit'])) + @php($totalPurchaseValue = IND_money_format($data->getAttributes()['total_purchase_value'])) +{{$data->table == 'marketplace_fre_sellers' ? 'Fractional Real Estate' : 'Alternative Investment Fund'}} | +{{$data->no_of_units_you_wish_to_buy}} | {{$data->complete_sale_value}} | {{$data->commission_earned}} | {{$data->date_of_sale}} | {{companyName($data->platform)}} | {{$data->final_purchase_value}} |
-
+
-
+
diff --git a/resources/views/Admin/Pages/pre_owned_investment/pre_owned_investmentV2.blade.php b/resources/views/Admin/Pages/pre_owned_investment/pre_owned_investmentV2.blade.php
index c60789a..b67ac90 100644
--- a/resources/views/Admin/Pages/pre_owned_investment/pre_owned_investmentV2.blade.php
+++ b/resources/views/Admin/Pages/pre_owned_investment/pre_owned_investmentV2.blade.php
@@ -45,7 +45,7 @@
-
+ |