SGR coach cleaning

Train operations

{{ $branch->name }} {{ $dailyControl->date->format('d M Y') }} {{ $dailyControl->shift }} shift

Supervisor {{ $dailyControl->supervisor?->name ?? auth()->user()->name }}

Step 1 · Identify train

Start an operation

@csrf
@foreach($masterTrains ?? [] as $masterTrain) @endforeach

Choose a known train or enter its number. An unregistered train is recorded for this operation only; it will not create master data.

@error('train_number')

{{ $message }}

@enderror

Next: verify the coaches physically present before inspection.

Today

Train operations

{{ count($trainOperations) }} {{ count($trainOperations) === 1 ? 'train' : 'trains' }}
@forelse($trainOperations as $train) @php $removedCount = $train->coachInspections->where('availability_status', 'Removed')->count(); $activeTrainCoaches = $train->coachInspections->where('availability_status', '!=', 'Removed'); $passedCount = $activeTrainCoaches->where('inspection_status', 'Passed')->count(); $failedCount = $activeTrainCoaches->where('inspection_status', 'Failed')->count(); $pendingCount = $activeTrainCoaches->where('inspection_status', 'Pending')->count(); $inspectedCount = $passedCount + $failedCount; @endphp

{{ $train->train_number }}

{{ $train->status === 'Submitted' ? 'Submitted · locked' : 'Draft · editing allowed' }}

{{ $train->coachInspections->count() }} actual coaches · {{ $inspectedCount }} inspected · {{ $pendingCount }} pending

@foreach([ ['label' => 'Coaches', 'value' => $train->coachInspections->count(), 'tone' => 'text-slate-950'], ['label' => 'Inspected', 'value' => $inspectedCount, 'tone' => 'text-slate-950'], ['label' => 'Passed', 'value' => $passedCount, 'tone' => 'text-emerald-800'], ['label' => 'Failed', 'value' => $failedCount, 'tone' => 'text-red-800'], ['label' => 'Pending', 'value' => $pendingCount, 'tone' => 'text-slate-600'], ['label' => 'Unavailable', 'value' => $removedCount, 'tone' => 'text-slate-500'], ] as $metric)
{{ $metric['label'] }} {{ $metric['value'] }}
@endforeach
@empty

No train operation started

Enter the train number to begin this shift’s SGR coach cleaning.

@endforelse