diff --git a/app/Http/Controllers/Admin/DashboardController.php b/app/Http/Controllers/Admin/DashboardController.php index 24c69d7..6d697e3 100644 --- a/app/Http/Controllers/Admin/DashboardController.php +++ b/app/Http/Controllers/Admin/DashboardController.php @@ -196,6 +196,7 @@ class DashboardController extends Controller $investingUserCount = MonthlyUpdateMaster::distinct('users_id')->count('users_id'); $totalProductCount = Product::count(); $leads = Lead::with('leadSource')->where('lead_owner', auth()->user()->id)->latest()->get(); + // dd($leads); $tasks = LeadTasksMeeting::where('owner', auth()->user()->id)->tasks()->get(); $meetings = LeadTasksMeeting::where('host', (string)auth()->user()->id)->meetings()->get(); // dd($meetings); diff --git a/app/Http/Controllers/Admin/ManageLeadController.php b/app/Http/Controllers/Admin/ManageLeadController.php index bc6169e..c0935f6 100644 --- a/app/Http/Controllers/Admin/ManageLeadController.php +++ b/app/Http/Controllers/Admin/ManageLeadController.php @@ -51,6 +51,14 @@ class ManageLeadController extends Controller ]); } + public function getInvestorDetail(Request $request) + { + $id = $request->id; + return response()->json([ + 'status'=>200, + 'data'=>User::where('id',$id)->select('contact_number','email','name')->first(), + ]); + } public function ongoing_leads() { // return view('Admin.Pages.manage_leads.ongoing_leads'); diff --git a/app/Http/Controllers/Admin/OverviewController.php b/app/Http/Controllers/Admin/OverviewController.php index 1172070..fd1e693 100644 --- a/app/Http/Controllers/Admin/OverviewController.php +++ b/app/Http/Controllers/Admin/OverviewController.php @@ -114,7 +114,7 @@ class OverviewController extends Controller public function interestedBuyers($id, $table) { - $interestedBuyers = MarketplaceBuyerForm::where(['associated_id' => $id, 'table' => $table])->get(); + $interestedBuyers = MarketplaceBuyerForm::where(['associated_id' => $id, 'table' => $table])->orderBy('updated_at','DESC')->get(); if ($table == 'marketplace_fre_sellers') { $data = MarketplaceFractionalRealEstateSeller::with('seller')->where('id', $id)->firstOrFail(); diff --git a/app/Http/Controllers/Frontend/DashboardController.php b/app/Http/Controllers/Frontend/DashboardController.php index 8992f34..4b8e92d 100644 --- a/app/Http/Controllers/Frontend/DashboardController.php +++ b/app/Http/Controllers/Frontend/DashboardController.php @@ -62,7 +62,9 @@ class DashboardController extends Controller // $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::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']; if(count($sellerData->toArray())) { @@ -117,7 +119,7 @@ class DashboardController extends Controller // $row['marketplace_fre_sellers_data'] = MarketplaceFractionalRealEstateSeller::where('id', $row->associated_id)->first(); // } // return $market_place_data; - $sellerData = MarketplaceSellerForm::has('fre')->with('fre')->where('users_id',$id)->get(); + $sellerData = MarketplaceSellerForm::with('fre')->where('users_id',$id)->get(); // dd(count($sellerData->toArray())); if(count($sellerData->toArray())) { diff --git a/app/Http/Requests/StoreMeetingRequest.php b/app/Http/Requests/StoreMeetingRequest.php index 58ee288..cdc1c2c 100644 --- a/app/Http/Requests/StoreMeetingRequest.php +++ b/app/Http/Requests/StoreMeetingRequest.php @@ -45,7 +45,7 @@ class StoreMeetingRequest extends FormRequest return array_merge(parent::validated(), [ 'status' => $this->status ? '1' : '0', 'created_by' => auth()->user()->id, - 'Type' => 'Meeting', + 'type' => 'Meeting', ]); } } diff --git a/app/Models/Lead.php b/app/Models/Lead.php index f95226c..55fdf07 100644 --- a/app/Models/Lead.php +++ b/app/Models/Lead.php @@ -16,7 +16,7 @@ class Lead extends Model // for getting lead source name public function leadSource() { - return $this->belongsTo(User::class, 'lead_source', 'id'); + return $this->belongsTo(User::class,'lead_owner','id'); } public function user() @@ -34,7 +34,7 @@ class Lead extends Model } public function attachment(){ - return $this->hasMany(LeadAttachment::class, 'leads_id'); + return $this->hasMany(LeadAttachment::class, 'leads_id')->latest(); } public function tasks_meetings(){ @@ -46,7 +46,7 @@ class Lead extends Model } public function kyc(){ - return $this->hasMany(UserKyc::class,'users_id'); + return $this->belongsTo(UserKyc::class,'users_id'); } public function owner(){ diff --git a/app/Models/MarketplaceSellerForm.php b/app/Models/MarketplaceSellerForm.php index c6c818c..2446073 100644 --- a/app/Models/MarketplaceSellerForm.php +++ b/app/Models/MarketplaceSellerForm.php @@ -16,8 +16,8 @@ class MarketplaceSellerForm extends Model } public function aif(){ - // return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id')->where('listing_status', '!=','Hide'); - return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id'); + return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id')->where('listing_status', '!=','Hide'); + // return $this->hasMany(MarketplaceAlternativeInvestmentFundSeller::class,'seller_forms_id'); } public function fre(){ diff --git a/app/Services/Admin/LeadService.php b/app/Services/Admin/LeadService.php index 96366fc..eac77cf 100644 --- a/app/Services/Admin/LeadService.php +++ b/app/Services/Admin/LeadService.php @@ -13,6 +13,7 @@ class LeadService{ public function getAllLeads(){ return Lead::with('kyc','user', 'product.category')->latest()->get(); + // dd(Lead::with('kyc','user', 'product.category')->latest()->first()); } public function totalLead(){ @@ -89,6 +90,7 @@ class LeadService{ public function show($id){ return Lead::with('user', 'owner', 'notes.admin', 'attachment.admin', 'tasks_meetings.admin', 'calls.admin', 'product.category')->FindOrFail($id); + // dd(Lead::with('user', 'owner', 'notes.admin', 'attachment.admin', 'tasks_meetings.admin', 'calls.admin', 'product.category')->FindOrFail($id)); } public function edit($id){ diff --git a/public/assets/css/style.css b/public/assets/css/style.css index 1a51489..cd70246 100644 --- a/public/assets/css/style.css +++ b/public/assets/css/style.css @@ -977,7 +977,7 @@ select.listing_status { .app-page .app-sidebar div#kt_app_sidebar_logo { background-color: #1b243d; border-right: 1px solid #ffffff73; - border-style: dashed; + border: none; } .app-sidebar-logo .btn.btn-active-color-primary:hover:not(.btn-active) { color: #1b243d !important; @@ -1051,7 +1051,13 @@ select.listing_status { .menu-title { color: #fff; } -[kt-app-layout=dark-sidebar] .app-sidebar .menu .menu-item .menu-link .menu-icon .svg-icon { +[kt-app-layout="dark-sidebar"] + .app-sidebar + .menu + .menu-item + .menu-link + .menu-icon + .svg-icon { color: #fff; } @@ -1097,8 +1103,6 @@ select.listing_status { display: flex; } - - /* table.dataTable tbody td { text-align: center; } */ @@ -1124,9 +1128,6 @@ span.select2-selection.form-select-view { left: 6px; } - - - ul, ol { list-style-type: none; @@ -1260,3 +1261,7 @@ nav { width: 100%; margin-top: 8px; } +.app-sidebar-logo .app-sidebar-logo-minimize { + position: relative; + right: 16px; +} diff --git a/public/assets/js/FrontendJs/script.js b/public/assets/js/FrontendJs/script.js index 77dddba..ecee1d7 100644 --- a/public/assets/js/FrontendJs/script.js +++ b/public/assets/js/FrontendJs/script.js @@ -35,10 +35,10 @@ window.$('#currently').DataTable({ }); $("#recipes-popbtn-four").on("click", function () { - // var investNowUrl = '{{route("investNow")}}'; + var investNowUrl = "{{route('investNow')}}"; $.ajax({ url : '/jericho_28_march/invest-now', - // url : '{{route("investNow")}}', + // url : "{{route('investNow')}}", // url : investNowUrl, type: 'get', data : { @@ -47,21 +47,26 @@ $("#recipes-popbtn-four").on("click", function () { // data : $(this).data('product-id'), dataType : 'json', success: function (result) { - console.log("result",result); + // console.log("result",result); + + // console.log("result",result.status); // return result.status; // alert('hello'); if(result.status == 201) { $('#login-pop-up').modal('show'); } - if(result.status === 403){ + if(result.status == 403){ $('#blocked-popup').modal('show'); } - if(result.status === 200) { - $('#view_details').modal('hide'); - $('#recipes-pop-four').modal('show'); + if(result.status == 200) { + + // console.log("Hii 2000000") + // $('#view_details').modal('hide'); + // $('#recipes-pop-four').modal('show'); + $('#investmodal-pop').modal('show'); } - if(result.status === 400){ + if(result.status == 400){ toastr.warning(result.message); } if(result.status == 401) diff --git a/resources/views/Admin/Pages/manage_leads/add_lead.blade.php b/resources/views/Admin/Pages/manage_leads/add_lead.blade.php index c2ed495..7a47ca1 100644 --- a/resources/views/Admin/Pages/manage_leads/add_lead.blade.php +++ b/resources/views/Admin/Pages/manage_leads/add_lead.blade.php @@ -68,7 +68,7 @@
- +
@@ -80,7 +80,7 @@
- +
@@ -95,7 +95,7 @@
- +
{{--
@@ -222,6 +222,24 @@ @endsection @section('scripts') + @endsection \ No newline at end of file diff --git a/resources/views/Admin/Pages/manage_leads/manage_leads.blade.php b/resources/views/Admin/Pages/manage_leads/manage_leads.blade.php index ecee0aa..ca8a93c 100644 --- a/resources/views/Admin/Pages/manage_leads/manage_leads.blade.php +++ b/resources/views/Admin/Pages/manage_leads/manage_leads.blade.php @@ -1,322 +1,383 @@ @extends('Admin.layouts.master') @section('title', 'Manage Leads') @section('style') - + .dt-buttons { + display: none; + } + @endsection @section('content') -
-
-
- +
+
+
+ -
-
-

Manage Leads

-
- - - - - - - - - Create Lead - -
- - - - - - - -
-
-
-
+
+
+

Manage Leads

+
+ + + + + + + + + + Create Lead + +
+ + + + + + + +
+
+
+
-
-
- -
-
- - - - - - - - - - - - - - - - - {{-- @dd($leads[0]) --}} - @foreach($leads as $lead) - - - - - - - + @endif + + + + + + @endforeach + +
Sr. No.Investor nameEmailProduct NameProduct CategoryStatusContact NumberLead StatusCreated DateActions
-
- {{$loop->iteration}} -
-
{{$lead->user->name}} - {{$lead->email}}{{$productName[$loop->index]['product_name']}}{{$lead->product == false ? 'No category' : $lead->product->category->category_name}} - @if($lead->kyc->isNotEmpty()) - @foreach($lead->kyc as $kyc) +
+
+ +
+
+ + + + + + + + + + + + + + + + + {{-- @dd($leads[0]) --}} + @foreach ($leads as $lead) + + + + + + + @if ($lead->kyc != null) + + + {{-- @foreach ($lead->kyc as $kyc) {{$kyc->status}} - @endforeach - @else - N/A - @endif - - - - - - - @endforeach - -
Sr. No.Investor nameEmailProduct NameProduct CategoryStatusContact NumberLead StatusCreated DateActions
+
+ {{ $loop->iteration }} +
+
{{ $lead->user->name }} + {{ $lead->email }}{{ $productName[$loop->index]['product_name'] }}{{ $lead->product == false ? 'No category' : $lead->product->category->category_name }} + + {{ $lead->kyc->status }} + {{$lead->mobile}}{{$lead->lead_status}} -
{{$lead->created_at->format('d/m/Y')}}
-
- - - - - - -
+ @endforeach --}} + @else +
+ N/A + {{ $lead->mobile }}{{ $lead->lead_status }} +
+ {{ $lead->created_at->format('d/m/Y') }}
+
+ id) }}' class="action_icon" + title="View lead"> + + + + + +
-
-
-
-
-
-
-
-
+
+
+
+ + + + + @endsection @section('scripts') - -@endsection \ No newline at end of file + }); + $(document).ready(function() { + // var ids = $('.current).attr('#data-dt-idx'); + // alert(ids); + // console.log($('.previous span:first')) + //$('.previous').each(function(){ + //console.log($(this).find('span a:first')); + // console.log($(this).prop('span')); + //}) + + console.log($('.previous > span > a:first').attr('#data-dt-idx')); + + $('#manage-leads_previous').addClass('d-none'); + }); + // $('.paginate_button').on('click',function(){ + // alert('hello'); + // var id = $(this).data('dt-idx'); + // alert(id); + // if(id == 0) + // { + // $('#manage-leads_previous').addClass('d-none'); + // } + // else + // { + // $('#manage-leads_previous').removeClass('d-none'); + // } + // }); + +@endsection diff --git a/resources/views/Admin/Pages/manage_leads/view-lead.blade.php b/resources/views/Admin/Pages/manage_leads/view-lead.blade.php index 7a623a5..2350e9a 100644 --- a/resources/views/Admin/Pages/manage_leads/view-lead.blade.php +++ b/resources/views/Admin/Pages/manage_leads/view-lead.blade.php @@ -494,7 +494,7 @@ Lead Owner Category Title - Name + Full Name Phone Mobile Lead Source @@ -509,7 +509,7 @@ {{$lead->phone ? $lead->phone:'--'}} {{$lead->mobile ? $lead->mobile:'--'}} {{$lead->lead_source ? $lead->lead_source:'--'}} - {{ date('Y-m-d', strtotime($lead->created_at ?? '--')) }} + {{ $lead->modified_by ?? '--' }} @@ -548,7 +548,7 @@ {{$lead->email ? $lead->email:'--'}} {{$lead->website ? $lead->website:'--'}} {{$lead->lead_status ? $lead->lead_status.' Lead':'--'}} - {{$lead->lead_owner ? $lead->lead_owner:'--'}} + {{date('Y-m-d', strtotime($lead->created_at ?? '--'))}} diff --git a/resources/views/Admin/personal-dashboard.blade.php b/resources/views/Admin/personal-dashboard.blade.php index 7ab4fa1..03ed51a 100644 --- a/resources/views/Admin/personal-dashboard.blade.php +++ b/resources/views/Admin/personal-dashboard.blade.php @@ -192,10 +192,11 @@ @foreach($leads as $lead) + {{-- @dd($lead) --}} {{$loop->iteration}} {{$lead->user->name}} - {{$lead->lead_company}} + {{$lead->lead_company ?? 'N/A'}} {{$lead->email}} {{$lead->mobile}} {{$lead->leadSource == null ? 'No Lead Source Assigned' : $lead->leadSource->name}} diff --git a/routes/web.php b/routes/web.php index ea22a6c..997b7bd 100644 --- a/routes/web.php +++ b/routes/web.php @@ -809,6 +809,7 @@ Route::middleware([BackendAccess::class])->group(function () { Route::post("convert-closed", 'convertClosed')->name('convert-closed'); Route::get("sort-notes", 'sortNotes')->name('sort-notes'); Route::get('download-file-data', 'downloadFile')->name('lead-attachment-download'); + Route::get('get-investor-detail', 'getInvestorDetail')->name('get-investor-detail'); }); //Manage Faqs