@extends('selfcheck.layouts.app') @section('title', 'Laporan — Catatan Eksekusi') @section('page-title', 'Laporan — Catatan Eksekusi') @section('content') @php $statusLabels = [ 'belum' => ['Belum', 'bg-slate-100 text-slate-500'], 'proses' => ['Proses', 'bg-amber-50 text-amber-600'], 'ok' => ['OK', 'bg-emerald-50 text-emerald-600'], 'kendala' => ['Kendala', 'bg-rose-50 text-rose-600'], ]; // Helper sort-by kolom: klik header → toggle arah asc/desc (filter tetap terbawa). $sKey = request('sort') ?: 'time'; $sDir = request('dir') === 'asc' ? 'asc' : 'desc'; $sUrl = fn (string $key) => request()->fullUrlWithQuery(['sort' => $key, 'dir' => ($sKey === $key && $sDir === 'asc') ? 'desc' : 'asc']); $sMark = function (string $key) use ($sKey, $sDir) { if ($sKey !== $key) { return '↕'; } return $sDir === 'asc' ? '↑' : '↓'; }; @endphp
| No | Waktu {!! $sMark('time') !!} | Proyek {!! $sMark('project') !!} | Trainset {!! $sMark('trainset') !!} | Komponen {!! $sMark('component') !!} | Car {!! $sMark('car') !!} | Team / Batch {!! $sMark('team') !!} | Status {!! $sMark('status') !!} | Catatan {!! $sMark('note') !!} | Aksi |
|---|---|---|---|---|---|---|---|---|---|
| {{ $loop->iteration }} | {{ $item['time'] }} | {{ $item['project'] ?: '—' }} | {{ $item['trainset'] ?: '—' }} | {{ $item['component_code'] }} {{ $item['component'] ?: '—' }} | {{ $item['car'] ?: '—' }} | {{ $item['team'] ?: '—' }}{{ $item['batch'] ?: '—' }} | @php [$label, $cls] = $statusLabels[$item['status']] ?? [ucfirst((string) $item['status']), 'bg-slate-100 text-slate-500']; @endphp {{ $label }} |
@if ($item['note'])
Eksekutor: {{ $item['note'] }} @endif @if ($item['qc_note'])QC: {{ $item['qc_note'] }} @endif {{ $item['executed_by'] ? 'oleh '.$item['executed_by'] : '' }} |
Lihat |