diff --git a/app/Http/Controllers/Admin/DashboardController.php b/app/Http/Controllers/Admin/DashboardController.php index 0cd84ba..87f49c1 100644 --- a/app/Http/Controllers/Admin/DashboardController.php +++ b/app/Http/Controllers/Admin/DashboardController.php @@ -34,8 +34,7 @@ class DashboardController extends Controller public function index(Request $request) { $check = checkSidebarAccess('dashboard'); - if(!$check) - { + if (!$check) { abort(404); } // dd(123); @@ -85,7 +84,7 @@ class DashboardController extends Controller $meetings = LeadTasksMeeting::where('host', auth()->user()->id)->meetings()->get(); $users = User::admins()->get(); // dd($leads); - return view('Admin.general-dashboard', compact('companyCount', 'a', 'leads', 'tasks', 'meetings','users','userCount','investingUserCount','totalProductCount')); + return view('Admin.general-dashboard', compact('companyCount', 'a', 'leads', 'tasks', 'meetings', 'users', 'userCount', 'investingUserCount', 'totalProductCount')); } public function getCommissionData(Request $request) @@ -147,10 +146,10 @@ class DashboardController extends Controller return '₹ ' . $result; } - public function personalDashboard(Request $request){ + public function personalDashboard(Request $request) + { $check = checkSidebarAccess('personal-dashboard'); - if(!$check) - { + if (!$check) { abort(404); } // dd(123); @@ -203,7 +202,7 @@ class DashboardController extends Controller $meetings = LeadTasksMeeting::where('host', (string)auth()->user()->id)->meetings()->get(); // dd($meetings); $users = User::admins()->get(); - return view('Admin.personal-dashboard', compact('companyCount', 'a', 'leads', 'tasks', 'meetings','users','userCount','investingUserCount','totalProductCount')); + return view('Admin.personal-dashboard', compact('companyCount', 'a', 'leads', 'tasks', 'meetings', 'users', 'userCount', 'investingUserCount', 'totalProductCount')); } public function editTask(Request $request) @@ -224,7 +223,7 @@ class DashboardController extends Controller return response()->json(['status' => 400, 'message' => $validationMessage]); } - $leadNotes = LeadTasksMeeting::where('id',$request->task_id)->update([ + $leadNotes = LeadTasksMeeting::where('id', $request->task_id)->update([ 'subject' => $request->subject, 'due_date' => $request->due_date, 'priority' => $request->priority, @@ -241,7 +240,8 @@ class DashboardController extends Controller }; } - public function editMeeting(Request $request){ + public function editMeeting(Request $request) + { $validator = Validator::make($request->post(), [ 'meeting_id' => 'required', 'location' => 'required', @@ -260,7 +260,7 @@ class DashboardController extends Controller return response()->json(['status' => 400, 'message' => $validationMessage]); } - $leadMeeting = LeadTasksMeeting::where('id',$request->meeting_id)->update([ + $leadMeeting = LeadTasksMeeting::where('id', $request->meeting_id)->update([ 'location' => $request->location, 'from' => $request->from, 'to' => $request->to, @@ -277,7 +277,6 @@ class DashboardController extends Controller } else { return response()->json(['status' => 400, 'message' => 'Error Creating Lead Meeting!']); }; - } public function deleteTask(Request $request) @@ -319,7 +318,8 @@ class DashboardController extends Controller } } - public function updateSingleAdminNotification(Request $request){ + public function updateSingleAdminNotification(Request $request) + { $user = User::find(auth()->user()->id); $user->notifications->where('id', $request->not_id)->markAsRead(); return response()->json(['status' => 200, 'message' => 'Notification mark as read']); @@ -336,11 +336,12 @@ class DashboardController extends Controller return $messages; } } - - public function readSpecificNotification(Request $request){ + + public function readSpecificNotification(Request $request) + { // dd($request->all()); $id = $request->id; - if($id){ + if ($id) { $notification = auth()->user()->unreadNotifications->where('id', $id)->markAsRead(); // if(!$notification){ $newUser = ''; @@ -349,37 +350,42 @@ class DashboardController extends Controller $buyerForm = ''; $contactUs = ''; $leadAssigned = ''; - foreach(getAllAdminNotifications() as $data){ - $message = $data->data['message'] ; + foreach (getAllAdminNotifications() as $data) { + $message = $data->data['message']; $created_at = $data->created_at->diffForHumans(); $id = $data->id; - if(array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'New Users') - { - $newUser .=$this->notificationData($message, $created_at, $id); - }else if(array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Submitted KYC'){ - $submittedKyc .=$this->notificationData($message, $created_at, $id); - }else if(array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Seller Form'){ - $sellerForm .=$this->notificationData($message, $created_at, $id); - }else if(array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Buyer Form'){ - $buyerForm .=$this->notificationData($message, $created_at, $id); - }else if(array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Contact Us'){ - $contactUs .=$this->notificationData($message, $created_at, $id); - }else if(array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Leads Assigned'){ - $leadAssigned .=$this->notificationData($message, $created_at, $id); - + $read_at = $data->read_at; + if (array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'New Users') { + $newUser .= $this->notificationData($message, $created_at, $id, $read_at); + } else if (array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Submitted KYC') { + $submittedKyc .= $this->notificationData($message, $created_at, $id, $read_at); + } else if (array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Seller Form') { + $sellerForm .= $this->notificationData($message, $created_at, $id, $read_at); + } else if (array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Buyer Form') { + $buyerForm .= $this->notificationData($message, $created_at, $id, $read_at); + } else if (array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Contact Us') { + $contactUs .= $this->notificationData($message, $created_at, $id, $read_at); + } else if (array_key_exists('notification_type', $data->data) && $data->data['notification_type'] == 'Leads Assigned') { + $leadAssigned .= $this->notificationData($message, $created_at, $id, $read_at); } } - $notificationStatus = array('newUser'=>$newUser,'submittedKyc'=>$submittedKyc,'sellerForm'=>$sellerForm,'buyerForm'=>$buyerForm,'contactUs'=>$contactUs,'leadAssigned'=>$leadAssigned); - return response()->json(['status'=>200,'message'=>"marked as read",'data'=>$notificationStatus]); - // } + $notificationStatus = array('newUser' => $newUser, 'submittedKyc' => $submittedKyc, 'sellerForm' => $sellerForm, 'buyerForm' => $buyerForm, 'contactUs' => $contactUs, 'leadAssigned' => $leadAssigned); + return response()->json(['status' => 200, 'message' => "marked as read", 'data' => $notificationStatus]); + // } } - return response()->json(['status'=>201,'message'=>"something error"]); + return response()->json(['status' => 201, 'message' => "something error"]); } - - public function notificationData($message, $created_at, $id){ - $data = '
+ + public function notificationData($message, $created_at, $id, $read_at) + { + $color = $read_at ? '#808080' : 'black'; + $font_weight = $read_at ? '300' : '600'; + $icon_color_light = $read_at ? 'bg-light-warning' : ''; + $icon_color_dark = $read_at ? '' : 'style="background-color: #c18948;"'; + $data = ' +
- + @@ -389,11 +395,11 @@ class DashboardController extends Controller
-
'.$message.'
+
' . $message . '
- '.$created_at.' -
-
'; + ' . $created_at . ' +
'; + // return $data; } } diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index 17ce537..c89c06b 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -673,7 +673,7 @@ class DashboardController extends Controller // dd(session::get('sellerFormData')); $sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([ 'users_id' => auth()->guard('users')->user()->id - ],[session::get('sellerFormData')]); + ],session::get('sellerFormData')); // dd($sellerFormUpdateCreate); $aifSellerForm = MarketplaceAlternativeInvestmentFundSeller::create([ 'seller_forms_id' => MarketplaceSellerForm::where('users_id', auth()->guard('users')->user()->id)->value('id'), @@ -699,10 +699,10 @@ class DashboardController extends Controller 'listing_status' => 'Hide', 'status' => 'Pending' ]); - session::forget('sellerFormData'); if ($aifSellerForm) { $user = User::find(auth()->guard('users')->user()->id); $userNotify = $this->sendNotificationToUser($user->name, 'Alternative Investment Fund'); + session::forget('sellerFormData'); return response()->json(['status' => 200, 'message' => 'Alternative Investment Fund Form Submitted For Review']); } return response()->json(['status' => 400, 'message' => 'Alternative Investment Fund Form Could Not Be Submitted!']); @@ -736,8 +736,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'), @@ -759,10 +758,10 @@ class DashboardController extends Controller 'listing_status' => 'Hide', 'status' => 'Pending' ]); - session::forget('sellerFormData'); if ($freSellerForm) { $user = User::find(auth()->guard('users')->user()->id); $userNotify = $this->sendNotificationToUser($user->name, 'Fractional Real Estate'); + session::forget('sellerFormData'); return response()->json(['status' => 200, 'message' => 'Fractional Real Estate Form Submitted For Review']); } return response()->json(['status' => 400, 'message' => 'Fractional Real Estate Form Could Not Be Submitted!']); @@ -1075,7 +1074,7 @@ class DashboardController extends Controller } $sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([ 'users_id' => auth()->guard('users')->user()->id - ],[session::get('sellerFormData')]); + ],session::get('sellerFormData')); $aifSellerForm = MarketplaceAlternativeInvestmentFundSeller::create([ 'seller_forms_id' => MarketplaceSellerForm::where('users_id', $request->user()->id)->value('id'), @@ -1100,10 +1099,10 @@ class DashboardController extends Controller 'status' => 'Pending', 'latest_valuation_date' => $request->latest_valuation_date, //latest_valuation_date added by hritik on 09-04-24 ]); - session::forget('sellerFormData'); if ($aifSellerForm) { $user = User::find($request->user()->id); $userNotify = $this->sendNotificationToUser($user->name, 'Alternative Investment Fund'); + session::forget('sellerFormData'); return response()->json(['status' => 200, 'message' => 'Alternative Investment Fund Form Submitted For Review']); } return response()->json(['status' => 400, 'message' => 'Alternative Investment Fund Form Could Not Be Submitted!']); @@ -1137,7 +1136,7 @@ class DashboardController extends Controller } $sellerFormUpdateCreate = MarketplaceSellerForm::updateOrCreate([ 'users_id' => auth()->guard('users')->user()->id - ],[session::get('sellerFormData')]); + ],session::get('sellerFormData')); // dd($request->all(),$request->user()->id,request()->user()->id); $freSellerForm = MarketplaceFractionalRealEstateSeller::create([ @@ -1159,10 +1158,10 @@ class DashboardController extends Controller 'latest_valuation_date' => $request->latest_valuation_date, //latest_valuation_date added by hritik on 09-04-24 ]); - session::forget('sellerFormData'); if ($freSellerForm) { $user = User::find($request->user()->id); $userNotify = $this->sendNotificationToUser($user->name, 'Fractional Real Estate'); + session::forget('sellerFormData'); return response()->json(['status' => 200, 'message' => 'Fractional Real Estate Form Submitted For Review']); } return response()->json(['status' => 400, 'message' => 'Fractional Real Estate Form Could Not Be Submitted!']); diff --git a/app/Http/Controllers/Frontend/MarketPlaceController.php b/app/Http/Controllers/Frontend/MarketPlaceController.php index 431121a..3c5625a 100644 --- a/app/Http/Controllers/Frontend/MarketPlaceController.php +++ b/app/Http/Controllers/Frontend/MarketPlaceController.php @@ -120,7 +120,7 @@ class MarketPlaceController extends Controller // dd($offering); // $status = MarketplaceBuyerForm::where(['associated_id'=>$offering['data']->id,'status'=>'Sold'])->exists() ? 'SOLD':'OPEN'; $status = ''; - $checkBIDExist = MarketplaceBuyerForm::where('associated_id', $offering['data']->id)->first(); + $checkBIDExist = MarketplaceBuyerForm::where('associated_id', $offering['data']->id)->where('status', 'Sold')->first(); // dd($checkBIDExist); if ($checkBIDExist) { $buyerData = MarketplaceBuyerForm::where('associated_id', $offering['data']->id)->where('status', 'Sold')->get(); diff --git a/app/Imports/AlternativeInvestmentFundImport.php b/app/Imports/AlternativeInvestmentFundImport.php index fcd2e76..798b38a 100644 --- a/app/Imports/AlternativeInvestmentFundImport.php +++ b/app/Imports/AlternativeInvestmentFundImport.php @@ -82,8 +82,8 @@ class AlternativeInvestmentFundImport implements ToCollection, WithHeadingRow 'manager' => $row['manager'], 'trustee' => $row['trustee'], 'auditor' => $row['auditor'], - 'valuer_tax_advisor' => $row['valuertax_advisor'] ?? null, - 'credit_rating' => $row['credit_rating_if_any'] ?? null, + 'valuer_tax_advisor' => $row['valuertax_advisor'] ?? $row['valuer_tax_advisor'] ?? null, + 'credit_rating' => $row['credit_rating_if_any'] ?? $row['credit_rating'] ?? null, 'open_date' => getConvertedDate($row['open_date']), 'first_close_date' => getConvertedDate($row['1st_close_date']), 'final_close_date' => getConvertedDate($row['final_close_date']), @@ -104,7 +104,7 @@ class AlternativeInvestmentFundImport implements ToCollection, WithHeadingRow 'isin_code' => $row['isin_code'] ?? null, 'focused_real_estate_sectors' => $row['focused_real_estate_sectors'] ?? null, 'rera_complied_property' => $row['rera_compiled_propertyyesno'] ?? null, - 'return_on_investment' => $row['return_on_investment'] ?? null, + 'return_on_investment' => $row['return_on_investment'] ?? null, 'valuation_per_sector' => $row['valuation_per_sector'] ?? null, 'focused_funds' => $row['focused_funds'] ?? null, 'trading_strategy' => $row['trading_strategy'] ?? null, diff --git a/app/Imports/FundImport.php b/app/Imports/FundImport.php index 2b2f35b..c959c7f 100644 --- a/app/Imports/FundImport.php +++ b/app/Imports/FundImport.php @@ -101,7 +101,7 @@ class FundImport implements ToCollection, WithHeadingRow 'annualized_volatility' => $row['annualized_volatility'], 'max_dropdown' => $row['max_drawdown'], 'isin' => $row['isin'], - 'inception_date' => $row['inception_date'], + 'inception_date' => getConvertedDate($row['inception_date']), 'fund_aum' => $row['fund_aum'], 'expense_ratio' => $row['expense_ratio'], 'nav_per_unit' => $row['nav_per_unit_usd'], @@ -109,7 +109,7 @@ class FundImport implements ToCollection, WithHeadingRow 'ytd' => $row['ytd'], 'year1_return' => $row['1_year_return'], 'year3_return' => $row['3_year_return'], - 'data_as_on' => $row['data_as_on'] ?? null, + // 'data_as_on' => getConvertedDate($row['data_as_on']) ?? null, ]); if ($returns) { foreach ($returns as $key => $value) { diff --git a/app/Imports/RealEstateImport.php b/app/Imports/RealEstateImport.php index 08d568a..42a5f76 100644 --- a/app/Imports/RealEstateImport.php +++ b/app/Imports/RealEstateImport.php @@ -82,8 +82,10 @@ class RealEstateImport implements ToCollection, WithHeadingRow 'built_up_area' => $row['built_up_area'] ?? null, 'carpet_area' => $row['carpet_area'] ?? null, 'construction_status' => $row['construction_status'] ?? null, - 'launch_date' => $row['launch_date'] ?? null, - 'completed_in' => $row['completed_in'] ?? null, + // 'launch_date' => getConvertedDate($row['launch_date']) ?? null, + // 'completed_in' => getConvertedDate($row['completed_in']) ?? null, + 'launch_date' => $row['launch_date'] ? getConvertedDate($row['launch_date']) : null, + 'completed_in' => $row['completed_in'] ? getConvertedDate($row['completed_in']) : null, 'total_units' => $row['total_units'] ?? null, 'unit_type' => $row['unit_type'] ?? null, 'no_of_restrooms' => $row['no_of_restrooms'] ?? null, diff --git a/app/Models/AlternativeInvestmentFund.php b/app/Models/AlternativeInvestmentFund.php index 1992072..b79074e 100644 --- a/app/Models/AlternativeInvestmentFund.php +++ b/app/Models/AlternativeInvestmentFund.php @@ -25,7 +25,8 @@ class AlternativeInvestmentFund extends Model public function getTargetIrrAttribute($value) { // dd($); - return $value == null ? '--' : $value.' %'; + // return $value == null ? '--' : $value.' %'; + return $value; } public function getTenureFromFinalDateAttribute($value) diff --git a/app/helper.php b/app/helper.php index 7f8b71b..1e9d15a 100644 --- a/app/helper.php +++ b/app/helper.php @@ -266,7 +266,8 @@ function getAllAdminNotifications() // $arr = []; // return $arr; $user = User::find(auth()->user()->id); - return $user->unreadNotifications; + // return $user->unreadNotifications; + return $user->notifications; } function getUserProfile() diff --git a/public/assets/css/FrontendCss/style.css b/public/assets/css/FrontendCss/style.css index 3bbf3da..3e746c9 100644 --- a/public/assets/css/FrontendCss/style.css +++ b/public/assets/css/FrontendCss/style.css @@ -4671,7 +4671,9 @@ h3.primary-no-data { .company-img img { width: 150px; } - +span.color-red { + color: red; +} /*======responsive=====*/ @media (max-width: 2560px) { diff --git a/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user.blade.php b/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user.blade.php index e3d4cd8..a543333 100644 --- a/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user.blade.php +++ b/resources/views/Admin/Pages/manage_investors/manage_user_product/manage_user.blade.php @@ -24,7 +24,7 @@
-

Manage User Productss

+

Manage User Products

diff --git a/resources/views/Admin/notifications.blade.php b/resources/views/Admin/notifications.blade.php index 6df734f..708af90 100644 --- a/resources/views/Admin/notifications.blade.php +++ b/resources/views/Admin/notifications.blade.php @@ -1,18 +1,27 @@ -
- \ No newline at end of file + +{{-- --}} diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php index 23eb236..e8cffdb 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/long-only-equity-fund-product.blade.php @@ -295,7 +295,7 @@

Return on investment

- {{ $longOnlyEquityFund->return_on_investment ?? '-' }} + {{ $longOnlyEquityFund->return_on_investment_irr_dpi_rvpi_tvpi ?? '-' }}
@@ -315,6 +315,11 @@

Valuation per sector

{{ $longOnlyEquityFund->valuation_per_sector ?? '-' }}
+ +
+

Valuation per security (NAV)

+ {{ $productData->valuation_per_security_nav ?? '-' }} +
@@ -333,6 +338,10 @@

Trading strategy

{{ $longOnlyEquityFund->trading_strategy ?? '-' }} +
+

Trading Strategy Used

+ {{ $productData->trading_strategy_used ?? '-' }} +
diff --git a/resources/views/Frontend/Pages/alternative-investment-fund/private-investment-public-equity.blade.php b/resources/views/Frontend/Pages/alternative-investment-fund/private-investment-public-equity.blade.php index 852ea05..3927122 100644 --- a/resources/views/Frontend/Pages/alternative-investment-fund/private-investment-public-equity.blade.php +++ b/resources/views/Frontend/Pages/alternative-investment-fund/private-investment-public-equity.blade.php @@ -8,7 +8,7 @@ diff --git a/resources/views/Frontend/Pages/indian-real-estate/residential.blade.php b/resources/views/Frontend/Pages/indian-real-estate/residential.blade.php index ef8c88f..9712b4f 100644 --- a/resources/views/Frontend/Pages/indian-real-estate/residential.blade.php +++ b/resources/views/Frontend/Pages/indian-real-estate/residential.blade.php @@ -157,7 +157,7 @@ -
+
+
{{-- --}} diff --git a/resources/views/Frontend/Pages/marketplace/index.blade.php b/resources/views/Frontend/Pages/marketplace/index.blade.php index 9c54fef..af7be97 100644 --- a/resources/views/Frontend/Pages/marketplace/index.blade.php +++ b/resources/views/Frontend/Pages/marketplace/index.blade.php @@ -75,7 +75,7 @@
-

Want your product to be in spotlight for the aspiring buyers?

+ {{--

Want your product to be in spotlight for the aspiring buyers?

--}}
diff --git a/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php b/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php index d63227f..c96b560 100644 --- a/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php +++ b/resources/views/Frontend/Pages/profile/market-list/alternative-investment-fund.blade.php @@ -1,106 +1,123 @@ @extends('Frontend.layouts.master') @section('content')
- --}}
@csrf
- + + value="{{ $aifProduct->name_of_the_aif_fund }}">
- +
- +
- - - - - - - - - - - - + + + + + + + + + +
- +
- +
- +
- +
- - + +
- +
- +
- +
- +
- +
@@ -108,11 +125,11 @@
- +
- +
@@ -159,7 +176,8 @@ {{-- --}}