@extends('layouts.app') @section('title', 'Work orders') @section('content')

Field work orders

{{ $workOrders->total() }} job(s) in this view.

Dispatch board + New work order
@include('components.kpi', ['label' => 'Open', 'value' => $counts['open'], 'variant' => 'warn', 'href' => route('work-orders.index', ['status' => 'open'])]) @include('components.kpi', ['label' => 'Assigned', 'value' => $counts['assigned'], 'variant' => 'info', 'href' => route('work-orders.index', ['status' => 'assigned'])]) @include('components.kpi', ['label' => 'In progress', 'value' => $counts['in_progress'], 'href' => route('work-orders.index', ['status' => 'in_progress'])]) @include('components.kpi', ['label' => 'Completed today', 'value' => $counts['completed_today'], 'variant' => 'good', 'href' => '#']) @include('components.kpi', ['label' => 'Cancelled', 'value' => $counts['cancelled'], 'variant' => 'bad', 'href' => route('work-orders.index', ['status' => 'cancelled'])]) @include('components.kpi', ['label' => 'Material cost', 'value' => money($counts['material_cost']), 'href' => '#'])
@forelse ($workOrders as $wo) @empty @endforelse
JobCustomerTypePriorityTechnician ScheduledStatusMaterials
{{ $wo->work_order_number }}
{{ $wo->description }}
@if ($wo->customer) {{ $wo->customer->display_name }} @else No customer @endif
{{ $wo->site_address }}
{{ title_case_words($wo->type) }} {{ $wo->priority }} {{ $wo->technician?->name ?: 'Unassigned' }} @if ($wo->technician)
{{ $wo->technician->jobs_today_count }} job(s) today
@endif
{{ $wo->scheduled_start?->format('d M H:i') ?? '—' }} {{ title_case_words($wo->status) }} {{ money($wo->material_cost) }} Open
@include('components.empty-state', ['icon' => '🔧', 'title' => 'No work orders found', 'message' => 'Create a job to dispatch a technician.', 'action' => '+ New work order'])
@if ($workOrders->hasPages())
{{ $workOrders->links('partials.pagination') }}
@endif
@endsection