@php use App\Enums\Leads\FlagType; use App\Enums\Leads\SourceType; use App\Enums\Leads\TypeOfContact; @endphp @push('style') @endpush
Comment Updated Successfully!
Overview
@if ($lead->instagram_psid) Instagram @endif @if ($lead->facebook_psid) Messanger @endif WhatsApp Phone {{-- Schedule a call --}}
Current workflow {{-- Current state --}} {{ str($lead->workflow?->name)->replace('_', ' ')->ucfirst() }}
@can('crm_leads-update-workflow')
Transitions {{--
--}}
@foreach ($workflows->whereNull('action_type') as $workflow)
@csrf @method('PUT')
@endforeach @foreach ($workflows->whereNotNull('action_type') as $workflow) @endforeach
@endcan
@if ($lead->facebook_psid) @endif @if ($errors->any())
    @foreach ($errors->all() as $error)
  • {{ $error }}
  • @endforeach
@endif
@can('crm_leads_personal_info-view')
@csrf @method('PUT') {{-- Personal Information --}}
Personal Information
First name*
Last name*
Email*
{{-- Phone* --}} Phone*
Address*
Nationality @foreach ($nationalities as $nationality) @endforeach
Gender*
Country* @foreach ($countriesSelect as $id => $name) @endforeach
Source* {{-- --}} @foreach (SourceType::cases() as $source) @endforeach
Referral ID* @foreach ($students as $student) @endforeach
Type of contact* @foreach (TypeOfContact::cases() as $type) @endforeach
Track type* @foreach ($trackTypesSelect as $id => $name) @endforeach
Program* @foreach ($programs as $program) @endforeach
Type of Lead* {{-- @foreach ($programs as $program) @endforeach --}}
{{-- Professional Details --}}
Professional Details
{{-- Industry --}} Industry @foreach (App\Enums\IndustryEnum::cases() as $industry) @endforeach
Position
Ad code*
Assigned to @foreach ($usersSelect as $id => $fullName) @endforeach
{{--
Account to @foreach ($getAllAccounts as $account) @endforeach
--}} {{--
Student to @foreach ($getAllStudents as $student) @endforeach
--}}
{{--
Lead plan type @foreach ($getPricingPlanType as $plan_type) @endforeach
--}}
{{-- Lead Management --}}
Lead Management
{{--
Creator @foreach ($usersSelect as $id => $fullName) @endforeach
--}} {{--
Program type @foreach ($programTypesSelect as $id => $name) @endforeach
--}} {{--
Last follow up
Next follow up
--}}
Flag* @foreach (FlagType::cases() as $flag) @endforeach
{{--
WorkFlow @foreach ($workflows as $workflow) @endforeach
--}}
Notes {{ old('notes', $lead->notes) }}
Submit
@endcan
Comments
@php $oldComments = old( 'comments', is_array($lead->comments) ? $lead->comments : [$lead->comments], ); @endphp @foreach ($oldComments as $index => $comment)
@endforeach

Add more comments

@error('comments.*')
{{ $message }}
@enderror
update
{{-- parent --}} @if ($lead->parent_id && !$lead->student_id)
@if ($lead->pricingplantype->name == 'Family') Family @endif @if ($lead->pricingplantype->name == 'B2B') Company @endif
{{-- --}} {{-- --}} @php $addStudentUrl = env('ADD_NEW_STUDENT_URL') . '?parent_id=' . $lead->parent_id . '&plan_type_id=' . $lead->plan_type_id; @endphp
@forelse ($lead->parent->student as $student) @empty @endforelse
First Name last Name Email Mobile
{{ $student->first_name }} {{ $student->last_name }} {{ $student->email }} {{ $student->mobile }}
No student exist
@endif @if ($getCurrentLeadUserReferraledsUsers->count())
@foreach ($getCurrentLeadUserReferraledsUsers as $getCurrentLeadUserReferraledsUser) @endforeach
Full Name Phone Number Email
{{ $getCurrentLeadUserReferraledsUser->lead->first_name }} {{ $getCurrentLeadUserReferraledsUser->lead->phone }} {{ $getCurrentLeadUserReferraledsUser->referred->email }}
{{--
@if (!$lead->students->bookingRequests()->count())

No other records found for this lead.

@else @foreach ($lead->students->bookingRequests as $booking) @endforeach
Date Type Notes
{{ \Carbon\Carbon::parse($booking->date)->format('d M Y H:i') }} {{ ucfirst($booking->type) }} {{ $booking->notes ?: ' ' }}
@endif
--}}
@endif @if (!is_null($lead->student_id) || !is_null($lead->parent_id)) @can('crm_lead_invoice-view')
Invoice
@can('crm_lead_invoice-create') @endcan
@if (!$lead->students?->finanaceStudentInvoices->count())

No invoice found for this lead.

@else @foreach ($lead->students?->finanaceStudentInvoices as $invoice) @if ($invoice->payment_type == 'instapay') @else @endif @endforeach
Invoice Number Invoice Type Invoice product Invoice Payment Type Invoice status Invoice payment
{{ $invoice->invoice_number }} {{ $invoice->type }} @if ($invoice->type == 'product') {{ $invoice->productInvoice?->name_en }} @else {{ $invoice->trackInvoice?->name_en ?? 'Track' }} @endif {{ $invoice->payment_type ?? 'online' }} {{ $invoice->payment_status == 'not_paid' ? 'pending' : $invoice->payment_status }} @if (!empty($invoice->invoice_img)) Invoice Image @else
@csrf @method('PUT')
@endif
{{ $invoice->payment_status }} @if ($invoice->transaction?->status == 'pending' || $invoice->transaction?->status == 'created') @if ($invoice->transaction?->is_expired)
@csrf
@elseif(!$invoice->transaction?->is_expired) payment link @endif @endif @if ($invoice->payment_status == 'deposite' || $invoice->payment_status == 'paid_deposite')
@csrf
@endif
@endif
{{--
@if (!$lead->students->bookingRequests()->count())

No other records found for this lead.

@else @foreach ($lead->students->bookingRequests as $booking) @endforeach
Date Type Notes
{{ \Carbon\Carbon::parse($booking->date)->format('d M Y H:i') }} {{ ucfirst($booking->type) }} {{ $booking->notes ?: ' ' }}
@endif
--}}
@endcan @can('crm_lead_test-view')
Test
@can('crm_lead_test-create') @endcan
@if (!$lead->students?->bookingRequests()->where('type', 'test')->count())

No tests found for this lead.

@else @foreach ($lead->students?->bookingRequests()->where('type', 'test')->get() as $booking) @endforeach
Date Notes
{{ \Carbon\Carbon::parse($booking->date)->format('d M Y H:i') }} {{ $booking->notes ?: ' ' }}
@endif
@if (!$getTestStudentCourseData->count())

No tests found for this lead.

@else @foreach ($getTestStudentCourseData as $testCourse) @endforeach
Course Name Start Date End Date status
{{ $testCourse->course_name_en }} {{ $testCourse->start_date }} {{ $testCourse->end_date }} {{ $testCourse->status }}
@endif
@endcan @endif
@if (!is_null($lead->student_id) || !is_null($lead->parent_id)) @can('crm_lead_demo-view')
Demo
{{-- --}} @can('crm_lead_demo-create') @if ($lead->student_id == null) @else @endif @endcan
@if (!$getDemoStudentCourseData->count())

No request found for this lead.

@else @foreach ($getDemoStudentCourseData as $demoCourse) @endforeach
Course Name Start Time End Time Invoice status Invoice
{{ $demoCourse->course_name_en }} {{ $demoCourse->slots()?->first()?->slot_start }} {{ $demoCourse->slots()?->first()?->slot_end }} {{ $demoCourse->invoice?->payment_status }} @if ($demoCourse->invoice) {{ $demoCourse->invoice?->invoice_number }} @else
@endif
@endif {{-- @if (!$lead->students?->bookingRequests()->where('type', 'demo')->count())

No demo found for this lead.

@else @foreach ($lead->students?->bookingRequests()->where('type', 'demo')->get() as $booking) @endforeach
Date Type Notes
{{ \Carbon\Carbon::parse($booking->date)->format('d M Y H:i') }} {{ ucfirst($booking->type) }} {{ $booking->notes ?: ' ' }}
@endif --}}
@if (!$getDemoStudentCourseData->count())

No request found for this lead.

@else @foreach ($getDemoStudentCourseData as $demoCourse) @endforeach
Course Name Start Date End Date status
{{ $demoCourse->course_name_en }} {{ $demoCourse->start_date }} {{ $demoCourse->end_date }} {{ $demoCourse->session }}
@endif
@endcan @endif {{--
Deal
--}} {{--
Reschedule
--}}
{{-- @can('crm_lead_schedule-view') --}} {{-- @endcan --}} {{-- --}} {{-- --}} @if (!is_null($lead->student_id) || !is_null($lead->parent_id)) @can('crm_lead_schedule-view')
Schedule
{{-- --}} @can('crm_lead_schedule-create') @endcan
@if ($products->count() > 0) @foreach ($products as $product) @endforeach
Course Name Start Date End Date Session Invoice
{{ $product->course_name_en }} {{ $product->start_date }} {{ $product->end_date }} {{ $product->session }} {{--
@csrf @if ($lead->parent_id) @else @endif --}} @if ($product->invoice) {{ $product->invoice?->invoice_number }} @else
@endif {{--
--}}
@else @endif
@php $archivedProducts = $archivedProducts ?? collect(); // Define if not passed in @endphp @if ($products->count() > 0) @foreach ($products as $product) @endforeach
Actions
@method('DELETE') @csrf
@else @endif
{{-- @if ($products->count())
{{ $products->links() }}
@endif --}}
@endcan @endif @if ($lead->assigned_to) @can('crm_lead_tasks-view')
Tasks
{{-- --}} @can('crm_lead_tasks-create') @endcan
{{ $tasks->links('pagination::bootstrap-5') }}
@endcan @endif @can('crm_lead_calls-view') @endcan @include('dashboard.leads.modals.demo-modal') @include('dashboard.leads.modals.test-modal') @include('dashboard.leads.modals.student-modal') @if ($lead->assigned_to) @include('dashboard.leads.modals.task-modal') @endif @include('dashboard.leads.modals.invoice-modal') @include('dashboard.leads.modals.select-invoice-modal') @include('dashboard.leads.modals.product-modal')