@extends('admin::layouts.layout') @section('content')

Work Orders

All field tasks and service assignments managed by Urban Metric

Total

{{ $total ?? 0 }}

Active

{{ $active ?? 0 }}

Overdue

{{ $overdue ?? 0 }}

Completed

{{ $completed ?? 0 }}

@forelse($workOrders ?? [] as $wo) @empty @endforelse
ID Work Order Assigned To Priority Status Due
{{ $wo->work_order_reference }}

{{ $wo->title }}

{{ optional($wo->client)->name ?? 'N/A' }} · {{ ucfirst($wo->category) }}
@if($wo->provider) {{ $wo->provider->name }} @else Unassigned @endif @php $priorityClass = [ 'low' => 'text-success', 'medium' => 'text-primary', 'high' => 'text-warning', 'urgent' => 'text-danger', ][$wo->priority] ?? 'text-secondary'; @endphp {{ ucfirst($wo->priority) }} @php $statusClass = [ 'assigned' => 'new-badge', 'in_progress' => 'new-badge02', 'submitted' => 'new-badge03', 'approved' => 'new-badge01', 'revision_requested' => 'new-badge04', 'completed' => 'new-badge01', 'cancelled' => 'new-badge06', ][$wo->status] ?? 'new-badge06'; $statusLabel = ucfirst(str_replace('_', ' ', $wo->status)); @endphp {{ $statusLabel }} @if($wo->due_date) @if($wo->due_date->isPast() && !in_array($wo->status, ['completed', 'cancelled'])) {{ $wo->due_date->format('Y-m-d') }} @else {{ $wo->due_date->format('Y-m-d') }} @endif @else — @endif
No work orders found.
@endsection @push('scripts') @endpush @push('styles') @endpush