{{-- Heading --}}

@if($type == 'deadline') Task Deadline @elseif($type == 'reminder') Task Deadline Reminder @else Task {{$type}} @endif

@if($type != 'reminder' || ($type == 'reminder' && $hasDeadlines)) @endif
@if (isset($all_deadlines) && count($all_deadlines) > 0)
@foreach ($all_deadlines as $index => $task_act) @endforeach
Time Actions
On {{ is_array($task_act) ? ($task_act['is_date'] ? \Carbon\Carbon::parse($task_act['date'])->format("(D M Y)") : $task_act['on_value'] . ' ' . $task_act['on_state']) : ($task_act->is_date == 1 ? optional($task_act->date)->format("(D M Y)") : optional($task_act)->on_value . ' '. optional($task_act)->on_state) }} @if(is_array($task_act)) @if(isset($task_act['then_actions']) && count($task_act['then_actions']) > 0) @foreach($task_act['then_actions'] as $then_action) {{ ucfirst(str_replace('_', ' ', $then_action['action'])) }} @if($then_action['action'] == 'move_user' && isset($then_action['users'])) - {{ count($then_action['users']) }} user(s) @elseif($then_action['action'] == 'move_profile' && isset($then_action['profiles'])) - {{ count($then_action['profiles']) }} profile(s) @elseif($then_action['action'] == 'mail_custom' && isset($then_action['custom_data']['emails'])) - {{ count($then_action['custom_data']['emails']) }} email(s) @endif @if(!$loop->last), @endif @endforeach @else No actions set @endif @else {{$task_act->action_labels()}} @endif
@else

No {{$type}}s set

@endif
@if ($window_open)
@if($is_editing) Edit task {{ $type }} @else Set task {{ $type }} @endif
{{-- Deadline Type Selection - Only show for non-reminder types --}} @if($type != 'reminder')
@endif {{-- Specific Date Section --}} @if($deadline_type == 'specific_date' && $type != 'reminder')
You can select today's date or any future date
@endif {{-- From Event Section --}} @if($deadline_type == 'from' || $type == 'reminder')
{{-- From Options --}} @if (isset($from_option) && $from_option != '')

@if ($from_option == 'before_deadline') @elseif ($from_option == 'incident_date')
@elseif ($from_option == 'reported_date') @elseif ($from_option == 'task_started')
@elseif ($from_option == 'task_complete')
@elseif ($from_option == 'stage_started')
@elseif ($from_option == 'stage_complete')
@endif
@endif @endif {{-- Additional Action --}}

Additional Action

{{-- Debug info --}}
{{-- Actions --}} @if (isset($then_option) && $then_option != '') @if ($then_option == 'move_user' || $then_option == 'mail_user')
@if(isset($case_related_users)) Found {{ $case_related_users->count() }} case-related users @else Showing all head office users ({{ $headOffice->users->count() }} total) @endif
@endif @if ($then_option == 'move_profile' || $then_option == 'mail_profile')
@if(isset($case_related_profiles)) Found {{ $case_related_profiles->count() }} case-related profiles @endif
@endif @if ($then_option == 'mail_custom')
@endif @endif @if (isset($all_then_actions) && count($all_then_actions) > 0)
Then actions
@foreach ($all_then_actions as $act )
@if(is_array($act)) {{ ucfirst(str_replace('_', ' ', $act['action'])) }} @if($act['action'] == 'move_task_to_another_user_random' && isset($act['random_selected_user'])) - {{ $act['random_selected_user'] }} @elseif($act['action'] == 'move_user' && isset($act['users'])) - {{ count($act['users']) }} user(s) @elseif($act['action'] == 'move_profile' && isset($act['users'])) - {{ count($act['users']) }} user(s) @elseif($act['action'] == 'mail_profile' && isset($act['users'])) - {{ count($act['users']) }} user(s) @elseif($act['action'] == 'mail_custom' && isset($act['custom_data']['emails'])) - {{ count($act['custom_data']['emails']) }} email(s) @endif @else {{$act->action_label()}} @endif
@endforeach
@endif
@if($type == 'reminder') @if($is_editing) @else @endif @else @if($is_editing) @else @endif @endif
@if($is_creating_task)
@endif
@endif
@push('scripts') @endpush