@extends('admin.layouts.app') @section('title') {{ __('customer_list') }} @endsection @php use Carbon\Carbon; @endphp @section('content')
{{-- @if (array_intersect($roleEnvNames, $adminRoleNames)) --}} @if (userCan('followup.view')) Pending FollowUp @endif @if (userCan('admin.assign')) @if (request('assign_to')) Non-followed customers @else @if (in_array($leadManagerEnvRole, $adminRoleNames)) Non-followed customers @else Non-followed customers @endif @endif @else @if (in_array($leadManagerEnvRole, $adminRoleNames)) Non-followed customers @else Non-followed customers @endif @endif Open Leads @if (userCan('followup.view')) Lead Application Offer Fee Payment Dropped Visa @endif {{-- @endif --}}

{{ __('customer_list') }} ({{ @$totalCandidatesCount }})

{{-- button --}}
{{-- --}} {{-- --}}
{{-- --}}
@if (userCan('candidate.create')) {{ __('create') }} @endif @if (request('trashed') === 'true') @if (userCan('candidate.restore')) @endif Back @else @if (userCan('candidate.restore'))  Trashed @endif @if (userCan('candidate.delete')) @endif @endif Assign From:
Sort By:
{{--
--}}
{{-- Table --}}
@if (userCan('candidate.delete')) @if ($candidates->count() > 0) @endif @endif @if (userCan('candidate.update')) {{-- --}} @endif @if (userCan('candidate.update')) {{-- --}} @endif {{-- --}} @if (userCan('admin.assign') || userCan('admin.assign_list')) @endif @if (userCan('candidate.update') || userCan('candidate.delete')) @endif @if (request('trashed') !== 'true') @if (userCan('candidate.delete')) @if ($candidates->count() > 0) @endif @endif @if (userCan('candidate.delete')) @else @endif {{-- --}} {{-- --}} @if (userCan('admin.assign') || userCan('admin.assign_list')) @endif @if (userCan('candidate.assignedRm')) @else @endif @if (request('name') || request('student_category') || request('intake') ||request('id') || request('email') || request('source') || request('phone') || request('daterange') || request('country') || request('preferred_country') || request('daterange_activity') || request('stages') || request('followUp') || request('assign_to') || request('assigned_rm') ) @else @endif @endif @if ($candidates->count() > 0) @foreach ($candidates as $candidate) @if (userCan('candidate.delete')) @if ($candidate->count() > 0) @endif @endif {{-- --}} {{-- --}} @if(!empty(@$candidate->destination[0]->intake)) @else @endif @if (userCan('candidate.update')) {{-- --}} @endif @if (userCan('candidate.update')) {{-- --}} @endif @if (userCan('admin.assign')) @elseif(userCan('admin.assign_list')) @endif @if (userCan('candidate.assignedRm')) @else @endif {{-- --}} @if (request('trashed') === 'true') @else @if (userCan('candidate.update') || userCan('candidate.delete')) @endif @endif {{-- @if (userCan('candidate.update') || userCan('candidate.delete')) @endif --}} @endforeach @else @endif
ID {{ __('student') }} Preferred Country {{ __('phone') }} {{ __('Source') }} {{ __('Stage') }} {{ __('intake') }} {{ __('category') }}{{ __('account') }} {{ __('status') }}{{ __('email_verification') }}{{ __('joined_date') }}{{ __('create') }} {{ __('date') }} {{ __('last') }} {{ __('activity') }}Assign ToAssign RM Follow up{{ __('action') }}
{{-- --}} {{-- --}} {{-- --}} {{-- --}} @error('start_date') {{ $message }} @enderror @error('start_date') {{ $message }} @enderror -- @if (request('name') || request('student_category') || request('intake') || request('id') || request('email') || request('source') || request('phone') || request('daterange') || request('daterange_activity') || request('stages') || request('followUp') || request('country') || request('preferred_country') || request('assigned_rm')) @endif
user_id }} class="sub_chk" id="checkbox{{ $candidate->user_id }}">
{{ $candidate->user_id }} {{-- image --}}

{{ @$candidate->user->name }} {{ @$candidate->user->middle_name }} {{ @$candidate->user->last_name }} @if(!empty(@$candidate->user->assign_from)) {{ ucwords(substr(adminIdToNameGet(@$candidate->user->assign_from), 0, 2)) }} @endif @if(@$candidate->open_auth_id && Carbon::now()->format('Y-m-d H:i:s') <= $candidate->open_date_time) @endif

{{ @$candidate->user->email }}

{{ $candidate->jobRole->name }}

{{ $candidate->applied_jobs_count }} {{ __('applied_jobs') }} {{-- {{ @$candidate->user->country }} --}} @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(!empty($candidate->user->country_code)) + {{ @$candidate->user->country_code }} @endif {{ @$candidate->user->phone }} {!! sourceToIcon(@$candidate->user->source) !!} {{ @$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 {{ @$candidate->destination[0]->intake }} -- @if(@$candidate->student_category == 'Gold') @elseif(@$candidate->student_category == 'Silver') @elseif(@$candidate->student_category == 'Bronze') @else -- @endif

{{ $candidate->user->status == 1 ? __('activated') : __('deactivated') }}

{{ $candidate->user->email_verified_at ? __('verified') : __('unverified') }}

@if (!empty($candidate->user->created_at)) @if (Carbon::parse($candidate->user->created_at)->isToday()) {{ date('h:i A', strtotime($candidate->user->created_at)) }} @else {{ date('d M', strtotime($candidate->user->created_at)) }} @endif @endif {{-- @if(!empty($candidate->user->created_at)) {{dateMonthTimeFormat($candidate->user->created_at)}} @endif --}} @if(!empty($candidate->user->last_activity_date)) {{ date('d M', strtotime($candidate->user->last_activity_date)) }} @else -- @endif
@if(!empty($candidate->user->assign_to)) {{ ucwords(adminIdToNameGet($candidate->user->assign_to)) }} @else NA @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(!empty($candidate->user->assigned_rm)) {{ ucwords(adminIdToNameGet($candidate->user->assigned_rm)) }} @else NA @endif
@if(@$candidate->user->assign_to) @if(!@$candidate->user->myFollowups->isEmpty()) @if (@$candidate->user->myFollowups->count() > 0) @foreach (@$candidate->user->myFollowups as $key => $followup) @if($key == 4) @break @endif @if($followup->follow_up_status == 'Not Connected') {{ dateMonthTimeFormatOne(@$followup->created_at) }} @else {{ dateMonthTimeFormatOne(@$followup->created_at) }} @endif @endforeach @endif @else Not Followed @endif @else @if(!$candidate->followup->isEmpty()) @if ($candidate->followup->count() > 0) @foreach ($candidate->followup as $key => $followup) @if($key == 4) @break @endif @if($followup->follow_up_status == 'Not Connected') {{ dateMonthTimeFormatOne(@$followup->created_at) }} @else {{ dateMonthTimeFormatOne(@$followup->created_at) }} @endif @endforeach @endif @else Not Followed @endif @endif
{{ Carbon\Carbon::parse($candidate->created_at)->format('d M, Y') }} @if (userCan('candidate.restore')) @endif
@if (userCan('candidate.view')) {{__('view_profile')}} @endif @if (userCan('candidate.update')) @endif @if (userCan('candidate.delete'))
@method('DELETE') @csrf
@endif
{{ __('no_data_found') }}
@if ($candidates->count())
{{ $candidates->onEachSide(1)->links() }}
@endif
{{-- notes model --}} {{-- notes model end --}} {{-- WhatsApp --}} {{-- end WhatsApp --}}
@endsection @section('style') @endsection @section('script') {{-- candidateCount --}} @endsection