@php($editing = $contact->exists) Back to list
@csrf @if ($editing) @method('PUT') @endif
@foreach ($sections as $title => $fields)
@foreach ($fields as $col => $def) @include('crm.loan-data.partials.field', ['model' => $contact, 'col' => $col, 'def' => $def]) @endforeach
@endforeach
@if ($editing) @php([$dndLabel, $dndTone] = \App\Services\Crm\ContactFields::dndStatus($contact->DndStatus)) @php([$msgLabel, $msgTone] = \App\Services\Crm\ContactFields::messageStatus($contact->MessageStatusId))
DND
{{ $dndLabel }}@if ($contact->DndCheckDate){{ $contact->DndCheckDate }}@endif
Last SMS
@if ($msgTone){{ $msgLabel }}@else — @endif
Zoho id
{{ $contact->zoho_id ?: '—' }}
Created
{{ $contact->created_date ?: '—' }}
@endif
Cancel
@if ($editing)
@foreach (['open' => 'Open activities ('.$open->count().')', 'closed' => 'Closed ('.$closed->count().')', 'doctor' => 'Doctor tasks ('.$doctorTasks->count().')'] as $k => $label) @endforeach
@foreach (['open' => $open, 'closed' => $closed, 'doctor' => $doctorTasks] as $k => $list)
@forelse ($list as $a) @php($tone = match (strtolower((string) $a->status)) { 'completed' => 'badge-green', 'in progress' => 'badge-amber', 'not started' => 'badge-blue', default => 'badge-gray' })
@if ($k !== 'doctor' && Route::has('activities.show')) {{ $a->subject ?: 'Task #'.$a->id }} @else {{ $a->subject ?: 'Task #'.$a->id }} @endif {{ $a->status ?: '—' }}
{{ $a->user_name ?: '—' }} @if ($a->task_for){{ $a->task_for }}@endif @if ($a->due_date)Due {{ date('d-m-Y', strtotime($a->due_date)) }}@endif @if (! empty($a->field_manager))FM {{ $a->field_manager }}@endif @if (! empty($a->inq_status)){{ $a->inq_status }}@endif
@if ($a->final_remark_ins_loan)
{{ $a->final_remark_ins_loan }}
@endif
@empty

Nothing here.

@endforelse
@endforeach
@endif