@extends('layouts.app') @section('title', 'Job Orders') @section('content')

Job Orders

@if($isOffice) Field work raised against a connection. A job is not closed until the office verifies it. @else Your jobs, plus anything nobody has claimed yet. @endif

@if($isOffice) @endif
@if(session('success'))
{{ session('success') }}
@endif @if(session('error'))
{{ session('error') }}
@endif {{-- Awaiting verification is deliberately first and amber: a completed job looks finished on a list but is the one thing the office still has to act on. --}}
Clear
@forelse($orders as $order) @empty @endforelse
Order Type Client Scheduled Assigned to Status Action
{{ $order->order_number }} @if($order->priority !== 'normal') {{ ucfirst($order->priority) }} @endif
Raised {{ optional($order->requested_at ?? $order->created_at)->format('M d, Y') }}
{{ $order->typeLabel() }} @if($order->requiresFinalReading())
needs final reading @endif
@if($order->client) {{ $order->client->name }}
{{ $order->client->account_number }} @if($order->client->status === 'disconnected') Disconnected @endif @else — @endif
{{ $order->scheduled_date ? $order->scheduled_date->format('M d, Y') : '—' }} @if($order->assignee) {{ $order->assignee->name }} @else Unassigned @endif @include('work-orders.partials.status-badge', ['order' => $order]) Open
No job orders match this filter.
@if($orders->hasPages()) @endif
@endsection