@extends('layouts.app') @section('content')
Checklist Item Details

Item Information
@if($checklistItem->start_time) @endif @if($checklistItem->complete_time) @endif
Task Title: {{ $checklistItem->task_title }}
Checklist: {{ $checklistItem->checklist->mosque->name }} - {{ \Carbon\Carbon::parse($checklistItem->checklist->date)->format('d M Y') }}
Status: @php $statusColors = [ 'NOT_STARTED' => 'secondary', 'IN_PROGRESS' => 'warning', 'COMPLETED' => 'success', 'PENDING_PROOF' => 'primary' ]; @endphp {{ $statuses[$checklistItem->status] ?? $checklistItem->status }}
Proof Required: @if($checklistItem->proof_required) Yes @else No @endif
Start Time: {{ $checklistItem->start_time->format('d M Y, h:i A') }}
Complete Time: {{ $checklistItem->complete_time->format('d M Y, h:i A') }}
Created At: {{ $checklistItem->created_at->format('d M Y, h:i A') }}
Last Updated: {{ $checklistItem->updated_at->format('d M Y, h:i A') }}
@canany(['update checklist items', 'delete checklist items'])
Actions
@can('update checklist items') Edit Item @endcan @can('delete checklist items')
@csrf @method('DELETE')
@endcan
@endcanany
Proof Media
@if($checklistItem->proofs->count() > 0) {{ $checklistItem->proofs->count() }} files @endif
@if($checklistItem->proofs->count() > 0)
@foreach($checklistItem->proofs as $proof)
@if(in_array(pathinfo($proof->file_path, PATHINFO_EXTENSION), ['jpg', 'jpeg', 'png', 'gif'])) Proof @else

{{ pathinfo($proof->file_path, PATHINFO_EXTENSION) }}

@endif {{ $proof->created_at->format('d M Y') }}
@endforeach
@else

@if($checklistItem->proof_required) No proof uploaded yet. @else Proof not required for this item. @endif

@endif
Checklist Details
Mosque: {{ $checklistItem->checklist->mosque->name }}
Cleaner: @if($checklistItem->checklist->cleaner) {{ $checklistItem->checklist->cleaner->name }} @else Not Assigned @endif
Checklist Status: @php $checklistStatusColors = [ 'NOT_STARTED' => 'secondary', 'IN_PROGRESS' => 'warning', 'SUBMITTED' => 'info', 'PENDING_VERIFICATION' => 'primary', 'VERIFIED' => 'success', 'REWORK_REQUIRED' => 'danger' ]; @endphp {{ ucfirst(strtolower(str_replace('_', ' ', $checklistItem->checklist->status))) }}
@endsection