@php $handlerType = $workActivity->serviceType ? $workActivity->serviceType->code : null; $hasHandler = false; $handler = null; if ($handlerType) { try { $handler = app(\App\Domains\Modules\Cleaning\Handlers\CleaningServiceHandlerFactory::class)->make($handlerType); $hasHandler = true; } catch (\Throwable $e) { $hasHandler = false; } } @endphp
Back to Operations
{{ $workActivity->serviceType ? $workActivity->serviceType->name : 'Operation' }} | {{ $workActivity->serviceTemplate ? $workActivity->serviceTemplate->name : 'Manual' }} | {{ $workActivity->location ? $workActivity->location->name : 'General' }}

{{ $workActivity->activity_name }}

@if($workActivity->status === 'Pending')
@csrf @method('PATCH')
@elseif($workActivity->status === 'Started') In Progress @elseif($workActivity->status === 'Completed') Completed @else {{ $workActivity->status }} @endif
Assigned Team: @forelse($workActivity->workerAttendances as $wa) {{ $wa->cleaningWorker->first_name }} {{ $wa->cleaningWorker->last_name }} @empty No workers assigned @endforelse
@if(!$hasHandler)

Service Configuration Pending

This service type ({{ $workActivity->serviceType ? $workActivity->serviceType->name : 'Unknown' }}) has not been fully configured for execution yet. Please contact management.

@elseif($workActivity->items->isEmpty())

No Service Items

This operation template has no specific work items to execute.

@else
@csrf @method('PUT')
@foreach($workActivity->items as $index => $item)
{{ $item->label }}
status === 'Submitted' ? 'disabled' : '' }}>
status === 'Submitted' ? 'disabled' : '' }}>
@endforeach
@if($dailyControl->status !== 'Submitted')
Save your progress regularly to avoid data loss.
@endif
@endif
@if($workActivity->status === 'Started' && $dailyControl->status !== 'Submitted')

Finish Operation

Mark the entire operation as complete once all item results are saved.

@csrf @method('PATCH')
@endif