@php use App\Models\ServiceRequest; use App\Models\WorkOrder; use App\Support\Fmt; $barColor = ['danger' => '#A8432A', 'warning' => '#C08A1E', 'success' => '#2F7A3F', 'gray' => '#a8a29e'][$color] ?? '#a8a29e'; $steps = ['draft', 'approved', 'assigned', 'in_progress', 'completed', 'verified', 'closed']; $current = match ($wo->status) { 'awaiting_approval' => 'draft', 'on_hold' => 'in_progress', 'reopened' => 'assigned', default => $wo->status }; $idx = array_search($current, $steps, true); @endphp
{{ ServiceRequest::PRIORITIES[$wo->priority] ?? $wo->priority }} {{ WorkOrder::STATUSES[$wo->status] }} @if ($wo->is_safety)Keselamatan@endif @if ($wo->isCritical())Pekerjaan kritis · verifikator berbeda@endif @if ($wo->reopen_count)Dibuka ulang {{ $wo->reopen_count }}×@endif @if ($wo->status === 'on_hold')Ditunda: {{ $wo->hold_reason }}@endif @if ($wo->cost_status === 'final')Biaya final@endif
    @foreach ($steps as $i => $s)
  1. {{ WorkOrder::STATUSES[$s] }}
  2. @endforeach
Lokasi
{{ $wo->location?->full_path ?? $wo->asset?->location?->full_path ?? '-' }}
Aset
{{ $wo->asset ? $wo->asset->asset_code.' · '.$wo->asset->name : '-' }}
Laporan diterima
{{ Fmt::dt($wo->received_at) }}
Batas respons
{{ Fmt::dt($wo->response_due_at) }}
Target pemulihan
{{ $wo->due_at ? Fmt::dt($wo->due_at) : 'segera (darurat)' }} · kalender {{ $wo->sla_calendar === 'business' ? 'jam kerja' : '24 jam' }}
Waktu hold
{{ Fmt::minutes($wo->hold_minutes) }} @if($wo->sla_cycle > 1)· siklus SLA {{ $wo->sla_cycle }}@endif
@if ($wo->started_at)
Mulai dikerjakan
{{ Fmt::dt($wo->started_at) }}
@endif @if ($wo->restored_at)
Layanan pulih
{{ Fmt::dt($wo->restored_at) }}
@endif
@if ($pct !== null && $wo->isOpen())
SLA pemulihan terpakai{{ Fmt::pct($pct, 0) }}
@endif @if ($wo->description)

{{ $wo->description }}

@endif