@php $actualCoaches = $sgrTrainOperation->coachInspections()->orderBy('position')->get(); $coachNumbers = old('coaches', $actualCoaches->pluck('coach_number')->all()); $isEditable = $sgrTrainOperation->status !== 'Submitted' && ! $sgrTrainOperation->is_composition_confirmed; @endphp
← Back to train operations

SGR coach cleaning · Step 2 of 3

Confirm actual coaches

These are the coaches physically present for this operation.

Train

{{ $sgrTrainOperation->train_number }}

@if(! $isEditable)
This operation’s composition is already confirmed. Open the coach workspace.
@else

Known coaches

Suggestions only. The list below is the actual composition saved for this operation.

@forelse($masterCoaches ?? [] as $masterCoach) @empty

There are no registered coach suggestions. Add the coaches present below.

@endforelse

Actual operation data

Coaches in this operation

{{ $actualCoaches->count() }} selected
@csrf
@foreach($coachNumbers as $coachNumber)
{{ str_pad((string) $loop->iteration, 2, '0', STR_PAD_LEFT) }}
@endforeach
@foreach($masterCoaches ?? [] as $masterCoach) @endforeach @error('coaches')

{{ $message }}

@enderror @error('coaches.*')

{{ $message }}

@enderror @foreach($errors->get('coaches.*') as $coachErrorMessages) @foreach($coachErrorMessages as $coachErrorMessage)

{{ $coachErrorMessage }}

@endforeach @endforeach
Cancel

Step 3 · Start inspection

Review the actual composition

{{ $actualCoaches->count() }} coaches selected. These coaches will be used for this SGR operation.

@csrf
@endif
@if($isEditable) @endif