@php // Literal class strings per step state (kept whole so Tailwind detects them). $circle = [ 'done' => 'bg-emerald-500 text-white', 'current' => 'bg-indigo-600 text-white', 'hold' => 'bg-amber-500 text-white', 'upcoming' => 'border border-slate-200 bg-white text-slate-300', ]; $statusText = [ 'done' => ['t' => __('Completed'), 'c' => 'text-emerald-600'], 'current' => ['t' => __('In progress'), 'c' => 'text-indigo-600'], 'hold' => ['t' => __('On hold'), 'c' => 'text-amber-600'], 'upcoming' => ['t' => __('Pending'), 'c' => 'text-slate-400'], ]; @endphp

{{ __('Production Progress') }}

{{-- Seven stages. A phone reads them as a vertical timeline, which is the only shape that fits without either crushing the labels or hiding half of them behind a sideways scroll nobody notices. From lg the same seven stages lay out as the horizontal rail. --}}
    @foreach ($steps as $step) @php $key = $step['on_hold'] ? 'hold' : $step['state']; $st = $statusText[$key]; @endphp
  1. @unless ($loop->last) @endunless

    {{ $step['label'] }}

    {{ $st['t'] }} @if ($step['date']) ยท {{ $step['date']->format('d M Y') }} @endif

    {{-- The quality stage carries its check tally instead of a date: this is the existing gate made visible, not a new one. --}} @if (! empty($step['note']))

    {{ $step['note'] }}

    @endif
  2. @endforeach