{{ isset($new_task) ? 'Edit Task' : 'Create Task' }}

@if (isset($case)) @endif @if (isset($new_task) && $new_task->id) @endif
{{--
--}}
@if(isset($new_task) && $new_task->task_documents->where('is_task_doc',true) && count($new_task->task_documents->where('is_task_doc',true)) > 0) {{-- Hidden inputs for existing documents --}} @foreach($new_task->task_documents->where('is_task_doc',true) as $taskDoc) @if($taskDoc->document) @endif @endforeach @endif {{-- Hidden input for deleted documents --}}
{{--
mandatory ? 'checked' : '' }}> mandatory ? 'checked' : '' }}>
--}}
@if (isset($case)) stage_id)) ? 'checked' : ''}} > @endif
@if (isset($case))
@endif @if ($type != 'case_task' || !isset($case))
stage_id) ? 'checked' : ''}}>
@endif

priority == 'low') || !isset($new_task) ? 'checked' : '' }}> priority == 'medium' ? 'checked' : '' }}> priority == 'high' ? 'checked' : '' }}> priority == 'urgent' ? 'checked' : '' }}>
@if ( isset($case) || !isset($task) || (isset($new_task) && isset($new_task->case_id)) || $new_task->shared_with != 'user')
@endif
approval ? 'checked' : '' }}> approval ? 'checked' : '' }}>
linked_forms()->count() > 0 || $new_task->backend_forms()->count() > 0) ? 'checked' : '' }}> linked_forms()->count() == 0 && $new_task->backend_forms()->count() == 0) ? 'checked' : '' }}>
Selected Forms @php $totalSelected = 0; if (isset($new_task)) { $totalSelected += $new_task->linked_forms()->count(); $totalSelected += $new_task->backend_forms()->count(); } @endphp {{ $totalSelected }}
@if (isset($head_office->be_spoke_forms) && count($head_office->be_spoke_forms) > 0) @foreach ($head_office->be_spoke_forms as $form) @if ($form->is_external_link == 1 && $form->soft_deleted == false) @php $isFormSelected = false; $formType = 'optional'; if (isset($new_task) && $new_task->linked_forms) { foreach ($new_task->linked_forms as $linkedForm) { if ($linkedForm->form_id == $form->id) { $isFormSelected = true; $formType = $linkedForm->is_mandatory ? 'mandatory' : 'optional'; break; } } } @endphp
External
@endif @endforeach @endif @if ((!isset($head_office->be_spoke_forms) || count($head_office->be_spoke_forms) == 0) && (!isset($all_tasks) || count($all_tasks) == 0))

No forms available to select

@endif
@if ($type != 'case_task' && isset($case))
@if (isset($case))
is_form_viewable ? 'checked' : '' }}> is_form_viewable ? 'checked' : '' }}>
@if(isset($task_linked_cases) && $task_linked_cases->count() > 0)
task_linked_cases->count() > 0 ? 'checked' : '' }}> task_linked_cases->count() == 0 ? 'checked' : '' }}>
@foreach ($task_linked_cases as $linked_case) @php $other_case = $linked_case->both_cases->where('id', '!=', $case->id)->first(); @endphp
task_linked_cases->contains('linked_case_id', $linked_case->id))) checked @endif>
@endforeach
@endif @endif
is_responder_details ? 'checked' : '' }}> is_responder_details ? 'checked' : '' }}>
is_date_time ? 'checked' : '' }}> is_date_time ? 'checked' : '' }}>
is_site_details ? 'checked' : '' }}> is_site_details ? 'checked' : '' }}>
@endif