@php $stageMeta = [ 'pre_production' => ['chip' => 'bg-brand-50 text-brand-700', 'icon' => 'flag', 'bar' => 'bg-brand-500', 'ring' => '#6366f1'], 'production' => ['chip' => 'bg-sky-50 text-sky-700', 'icon' => 'cog-6-tooth', 'bar' => 'bg-sky-500', 'ring' => '#0ea5e9'], 'pre_delivery' => ['chip' => 'bg-emerald-50 text-emerald-700','icon' => 'shield-check','bar' => 'bg-emerald-500', 'ring' => '#10b981'], ]; $filterMeta = [ 'all' => ['label' => __('All checks'), 'icon' => 'queue-list'], 'outstanding' => ['label' => __('Still to do'), 'icon' => 'clock'], 'required' => ['label' => __('Required'), 'icon' => 'shield-check'], 'mine' => ['label' => __('For me'), 'icon' => 'user'], ]; // Ring geometry for the completion donut. $ringRadius = 34; $ringCircumference = 2 * M_PI * $ringRadius; $ringDash = $ringCircumference * min(100, max(0, $summary['pct'])) / 100; $allClear = $summary['required'] > 0 && $summary['outstandingRequired'] === 0; // Slate while untouched, navy while in flight, emerald once the required set is clear. $ringColor = $summary['done'] === 0 ? '#cbd5e1' : ($allClear ? '#10b981' : '#2a5786'); @endphp
{{ __('Tick each check off as the job moves through production. The ones marked required need doing before the job can be completed or delivered.') }}
{{ __('There are no quality checks on this job yet') }}
{{ __('You can add a one-off check here, or set up a template under Jobs → Quality Checklists so every job of this kind starts with the same list.') }}
@elseif ($allClear)
{{ trans_choice('{1}:done of :total check verified.|[2,*]:done of :total checks verified.', $summary['total'], ['done' => $summary['done'], 'total' => $summary['total']]) }} {{ __('This job is ready for its quality certificate.') }}
@elseif ($summary['required'] === 0)
{{ __('These checks are kept for the record, so none of them will hold the job up.') }}
@else
{{ __('Once these are ticked off, the job is free to move on. An owner can also let it through early if something is urgent, and that decision is kept on record.') }}
@endif{{ $gate['label'] }}
@unless ($gate['ready']){{ trans_choice('{1}:count check to go|[2,*]:count checks to go', $gate['outstanding'], ['count' => $gate['outstanding']]) }}
@endunless{{ $stat['label'] }}
{{ $stat['value'] }}
{{ __('Every tick records who did it and when, so nobody has to remember later.') }}
{{ $item->description }}
@endif {{-- Evidence captured against this check --}} @if ($itemMedia->isNotEmpty())
“{{ $item->note }}”
@endif{{ __('Found in the job’s Quality Control folder in Drive. It counts as evidence on this job, but nobody said which check it proves.') }}
{{ __('Raise issues, observations or sign-off remarks about this job’s quality.') }}
{{ $c->user?->name ?? __('Unknown') }}
{{ $c->created_at?->format('j M Y, H:i') }}
{{ $c->body }}
{{ __('No quality notes yet.') }}
{{ $signItem->label }}
{{ $stageLabels[$signItem->stage] ?? $signItem->stage }} · {{ $respMeta[$signItem->responsible]['label'] ?? ucfirst($signItem->responsible) }} @if ($signItem->requires_approval) · {{ __('needs an approver') }} @endif @if ($signItem->requires_evidence) · {{ __('needs evidence') }} @endif
{{ __('A photo of the approved sample, a clip of the machine running, a voice note on what you found — anything that stands as the record. Each one is saved as you capture it.') }}
@php $signMedia = ($signOffId ? ($mediaByItem[$signOffId] ?? collect()) : collect()) ->sortBy(fn ($m) => $m->is_audio ? 1 : 0) ->values(); @endphp @if ($signMedia->isNotEmpty()){{ __('A one-off check for this job only. To add it to every job of this type, edit the template under Jobs → Checklists.') }}