@extends('admin.layouts.leadManagement') @section('title') Lead Management @endsection @section('content') @php use Carbon\Carbon; $selectedMonths = is_array(request('intake_month')) ? request('intake_month') : explode(',', request('intake_month')); $selectedYears = is_array(request('intake_years')) ? request('intake_years') : explode(',', request('intake_years')); $selectedSources = is_array(request('source_value')) ? request('source_value') : explode(',', request('source_value')); $requestValues = request('values'); // Define an empty array to store the sub-stages $subStagesArray = []; if ($requestValues == 'inquiry') { $subStagesArray = ['Inquiry', 'Counselling', 'Documents Received', 'Document pending', 'University to be suggested', 'Universities suggested']; } elseif ($requestValues == 'application') { $subStagesArray = ['Application ready to submit', 'Application submitted', 'Application Rejected', 'Application resubmitted', 'Admission Letter Pending']; } elseif ($requestValues == 'offer') { $subStagesArray = ['Offer Issued','Offer Accepted','Offer Rejected']; } elseif ($requestValues == 'dropped') { $subStagesArray = ['Student backed out / Dropped']; } elseif ($requestValues == 'feePayment') { $subStagesArray = ['Initial Fee / Tuition Fee Deposit']; } elseif ($requestValues == 'visa') { $subStagesArray = ['Visa Rejected', 'Visa Accepted', 'Visa In Process']; } elseif ($requestValues == 'defered') { $subStagesArray = ['Student Defered']; } elseif ($requestValues == 'workVisa') { $subStagesArray = ['Work Visa']; } elseif ($requestValues == 'testPreparation') { $subStagesArray = ['Test Preparation']; } // Define an array to store the sub-stages names $getSubStagesArray = []; if (!empty($subStagesArray)) { $stagesArray = get_stages_array(); foreach ($subStagesArray as $subStage) { foreach ($stagesArray as $stage) { if ($stage['name'] == $subStage) { $getSubStagesArray[]['name'] = $stage['name']; } } } } else { $getSubStagesArray = get_stages_array(); } @endphp

Lead Management({{ @$totalCandidatesCount }})

Active: --
Active Leads.
Ignore Leads: --
Leads that are not connected from past 7 days.
Not Followed: --
New assigned leads on which you have not marked any follow-up yet.

@if(userCan('followup.view'))

{{-- timeline --}} @if (userCan('candidate.create')) {{-- Create lead --}} Create lead @endif

@endif
{{--
Stages      

Inquiry 0

Application 0

Offer 0

Visa 0

Fee Payment 0

Deferred 0

Dropped 0

Work Visa 0

--}}
@php $tabs = [ 'Inquiry' => 'inquiry', 'Application' => 'application', 'Offer' => 'offer', 'Visa' => 'visa', 'Fee Payment' => 'feePayment', 'Deferred' => 'defered', 'Dropped' => 'dropped', // 'Work Visa' => 'workVisa', ]; @endphp @foreach ($tabs as $label => $value)

{{ $label }} 0

@endforeach

Work Visa {{-- 0 --}}

Test Preparation {{-- 0 --}}

@if(count(request()->all()) > 0) Clear All @endif {{-- --}}
@if(!empty(request('daterange')) && !empty(request('daterangeCreated'))) @elseif (!empty(request('daterange'))) @elseif (!empty(request('daterangeCreated'))) @elseif (checkleadManagerEnvRole()) @else @endif {{-- --}} @if ($candidates->count() > 0) @foreach ($candidates as $candidate) orders_status_paid) && @$candidate->orders_status_paid->count() > 0) class="paid-row" @endif> @if(!empty(request('daterange')) && !empty(request('daterangeCreated'))) @elseif (!empty(request('daterange'))) @elseif (!empty(request('daterangeCreated'))) @elseif (checkleadManagerEnvRole()) @else @endif @if(@$candidate->student_category == 'Gold') @elseif(@$candidate->student_category == 'Silver') @elseif(@$candidate->student_category == 'Bronze') @else @endif {{-- @if(@$candidate->user->lead_type == 'Hot') @elseif(@$candidate->user->lead_type == 'Cold') @elseif(@$candidate->user->lead_type == 'Warm') @else @endif --}} @if(!empty(@$candidate->destination[0]->intake_months)) @php $intake_months = explode(",", @$candidate->destination[0]->intake_months); @endphp @else @endif @if(!empty(@$candidate->destination[0]->intake_years)) @php $intake_years = explode(",", @$candidate->destination[0]->intake_years); @endphp @else @endif @if(userCan('admin.assign')) {{-- --}} @else @endif @if(userCan('candidate.assignedRm')) {{-- --}} @else @endif @endforeach @else @endif
ID NameAssign Date Cr. DateAssign DateCr. DateAssign DateCr. DateMobile Number Cat. Type edit Preferred CountryIntakeIntake Month Intake Year TAT Sub Stages Assign To @if(userCan('admin.assign'))edit@endif Assign Rm @if(userCan('candidate.assignedRm'))edit@endif Last Comment/Next Followup

{{ $candidate->user_id }}

{!! sourceToIcon(@$candidate->user->source) !!}

@if(!$candidate->interested_webinar->isEmpty() && $candidate->interested_webinar->first()->webinar && $candidate->interested_webinar->first()->webinar->dateTime)

W

Webinar Date :{{ dateMonthFormat(@$candidate->interested_webinar[0]->webinar->dateTime) }}

Webinar Title : {{ @$candidate->interested_webinar[0]->webinar->webinar_name }}

@endif @if(!empty(@$candidate->user->assign_from))

{{ ucwords(substr(adminIdToNameGet(@$candidate->user->assign_from), 0, 1)) }}

Title :Assigned from {{ ucwords(adminIdToNameGet(@$candidate->user->assign_from)) }} @if(!empty(@$candidate->user->assign_date)) on ({{ dateMonthFormat(@$candidate->user->assign_date) }}) @endif

{{-- {{ ucwords(substr(adminIdToNameGet(@$candidate->user->assign_from), 0, 2)) }} --}} @endif
@if(!empty(@$candidate->profile_complete)) {{ @$candidate->profile_complete }}% @else 0% @endif

{{ @$candidate->user->name }} {{ @$candidate->user->middle_name }} {{ @$candidate->user->last_name }}

@php $jsonServiceString = str_replace(['"', '[', ']'], '', @$candidate->user->service_id); $service_ids = explode(",", $jsonServiceString); @endphp @if(!empty(@$service_ids) && !empty(@$service_ids[0]))
Services: @forelse ($services as $service) @if (in_array($service['id'], $service_ids) && $service['name'] != "Overseas Education") {{ $loop->iteration }} {{ $service['name'] }}@if (!$loop->last),@endif @endif @empty @endforelse
@endif
@if(!empty(@$candidate->orders_status_paid) && @$candidate->orders_status_paid->count() > 0)
{{--

Payment Detail

--}} @foreach ($candidate->orders_status_paid as $key => $order) {{-- {{ dd($order) }} --}} @if($key > 0)
@endif

Order Id :{{ $order->id }}

Amount :{{ $order->amount }}

@endforeach
@endif
{{-- @if(@$candidate->user->services->name && @$candidate->user->services->name != "Overseas Education") {{ @$candidate->user->services->name }} @endif --}} {{-- Oversees Edu Work Visa --}}
@if (!empty($candidate->user->assign_date))

{{ date('d M y', strtotime($candidate->user->assign_date)) }} {{ date('h:i A', strtotime($candidate->user->assign_date)) }}

@else -- @endif
@if (!empty($candidate->user->created_at))

{{ date('d M y', strtotime($candidate->user->created_at)) }} {{ date('h:i A', strtotime($candidate->user->created_at)) }}

@else -- @endif
@if (!empty($candidate->user->assign_date))

{{ date('d M y', strtotime($candidate->user->assign_date)) }} {{ date('h:i A', strtotime($candidate->user->assign_date)) }}

@else -- @endif
@if (!empty($candidate->user->created_at))

{{ date('d M y', strtotime($candidate->user->created_at)) }} {{ date('h:i A', strtotime($candidate->user->created_at)) }}

@else -- @endif
@if (!empty($candidate->user->assign_date))

{{ date('d M y', strtotime($candidate->user->assign_date)) }} {{ date('h:i A', strtotime($candidate->user->assign_date)) }}

@else -- @endif
@if (!empty($candidate->user->created_at))

{{ date('d M y', strtotime($candidate->user->created_at)) }} {{ date('h:i A', strtotime($candidate->user->created_at)) }}

@else -- @endif
@if(!empty($candidate->user->country_code)) + {{ @$candidate->user->country_code }} @endif {{ @$candidate->user->phone }} goldsilverbronze--HotColdWarm--
@php $jsonString = str_replace(['"', '[', ']'], '', @$candidate->destination[0]->preferred_country); $preferred_country_ids = explode(",", $jsonString); $preferredCountryNames = []; foreach ($preferred_country_ids as $preferred_country_id) { $preferredCountryName = countriesIdToNameGet($preferred_country_id); // Replace with your actual function call $preferredCountryNames[] = $preferredCountryName; } @endphp @if($preferredCountryNames) {{ @$preferredCountryNames[0] }} @else -NA- @endif @if($intake_months) {{ @$intake_months[0] == "" ? @$intake_months[1] : @$intake_months[0] }}@if(count($intake_months) > 1)... @endif @else -- @endif -- @if($intake_years) {{ @$intake_years[0] == "" ? @$intake_years[1] : @$intake_years[0] }}@if(count($intake_years) > 1)... @endif @else -- @endif ---- {{ @$candidate->user->stages }} @php $document_names_array = array( 'Class 10 Marksheet', 'Class 12 Marksheet', 'Bachelors Degree', 'Masters Degree', 'Diploma', 'Resume', ); $additional_document_names_array = array( 'LOR 1', 'LOR 2', 'SOP' ); $found_value = []; $document_name_toggle_string = "-NA-"; $additional_found_value = []; $additional_document_name_toggle_string = "-NA-"; if (!empty(@$candidate->documents)) { foreach (@$candidate->documents as $key => $value) { if ($value->document_subcategory_id == 37) { $found_value[] = 'Class 10 Marksheet'; } elseif ($value->document_subcategory_id == 12) { $found_value[] = 'Class 12 Marksheet'; } elseif ($value->document_subcategory_id == 10) { $found_value[] = 'Bachelors Degree'; } elseif ($value->document_subcategory_id == 11) { $found_value[] = 'Masters Degree'; } elseif ($value->document_subcategory_id == 38) { $found_value[] = 'Diploma'; } elseif ($value->document_subcategory_id == 1) { $found_value[] = 'Resume'; } elseif ($value->document_subcategory_id == 2) { $additional_found_value[] = 'LOR 1'; } elseif ($value->document_subcategory_id == 3) { $additional_found_value[] = 'LOR 2'; } elseif ($value->document_subcategory_id == 5) { $additional_found_value[] = 'SOP'; } } // Keep only unique values $found_value = array_unique($found_value); $additional_found_value = array_unique($additional_found_value); $unique_value = array_diff($document_names_array, $found_value); $document_name_toggle_string = implode(', ', $unique_value); $additional_unique_value = array_diff($additional_document_names_array, $additional_found_value); $additional_document_name_toggle_string = implode(', ', $additional_unique_value); } @endphp @if(@$candidate->user->stages == 'Additional Documents required') @elseif(@$candidate->user->stages == 'Document pending') @endif
@if(!empty($candidate->user->assign_to)) {{ ucwords(adminIdToNameGet($candidate->user->assign_to)) }} @else NA @endif
@if(!empty($candidate->user->assigned_rm)) {{ ucwords(adminIdToNameGet($candidate->user->assigned_rm)) }} @else NA @endif @if(!$candidate->followup->isEmpty())
calender
{{ dateMonthFormat(@$candidate->followup[0]->created_at) }} {{@$candidate->followup[0]->comment}}
@foreach (@$candidate->followup as $key => $value) @if ($key >= 5) @break @endif

Date :{{ dateMonthTimeFormat(@$value->created_at) }}

@if(!empty(@$value->datetime))

Next Date :{{ dateMonthTimeFormat(@$value->datetime) }}

@endif

Comment :{{@$value->comment}}


@endforeach
@else addFollow Up @endif
View Case {{-- add --}} add
dots-icon

editEdit {{-- whatsappWhatsApp addAdd --}} @if (userCan('candidate.sendWhatsApp')) whatsappWhatsApp {{-- whatsapp --}} @endif @if (userCan('candidate.sendEmail')) emailCall Back Email emailWelcome Email @endif @if (userCan('candidate.passwordUpdate')) email {{__('password')}} {{__('email')}} @endif {{-- @if (userCan('candidate.sendEmail')) --}} addFollow Up {{-- @endif --}} @if (userCan('candidate.delete')) deleteDelete {{--

@method('DELETE') @csrf
--}} @endif

{{ __('no_data_found') }}
{{--
  • edit
  • Cat. : gold
  • Type : Hot
  • Student ID : 20001
  • Cr. Date :

    23 Sep, 23 02:29 PM

  • Student Name : Ashish lamba W
  • Mobile Number : +91 1234567895
  • Preferred Country : USA
  • Intake : Nov-2023
  • TAT : 20
  • Sub Stages : Inquiry
  • Last Comment/Next Followup :

    calender28 Sep, 23 Call Busy

  • edit
  • Cat. : silver
  • Type : Cold
  • Student ID : 20002
  • Cr. Date :

    23 Sep, 23 02:29 PM

  • Student Name : Ashok Kumar Meghwal
  • Mobile Number : +91 2154368547
  • Preferred Country : Australia
  • Intake : Jan-2024
  • TAT : 20
  • Sub Stages : University to be Suggested
  • Last Comment/Next Followup :

    calender28 Sep, 23 Student is from Haryana

  • edit
  • Cat. : bronze.svg
  • Type : Warm
  • Student ID : 20005
  • Cr. Date :

    23 Sep, 23 02:29 PM

  • Student Name : Nagaarjun Reddy Annapureddy
  • Mobile Number : +91 7485961542
  • Preferred Country : United kingdom
  • Intake : Nov-2023
  • TAT : 20
  • Sub Stages : Counselling
  • Last Comment/Next Followup :

    calender28 Sep, 23 Wants to go UK or Canada

--}} {{-- @if ($candidates->count()) --}}
{{ $candidates->onEachSide(1)->links() }}
{{-- @endif --}}
cross

Timeline

timeline
@endsection @section('style') @endsection @section('script') {{-- ////////////////////////////form Submit by on change//////////////// --}} {{-- --}} {{-- customWhatsApp script --}} {{-- //////////////////customWhatsApp/////////////////// --}} {{-- ////////////////////////////custom Send Email///////////////////////// --}} {{-- /////////////////////////follow-up////////////////////////// --}} @endsection