@extends('layouts.app') @section('title', 'Field board') @section('content')

Field board — {{ today()->format('l j F Y') }}

Technician load and today's scheduled jobs.

Work orders + New work order
@include('components.kpi', ['label' => 'Jobs today', 'value' => number_format($jobs->count()), 'variant' => 'info']) @include('components.kpi', ['label' => 'Technicians on roster', 'value' => number_format($technicians->count()), 'variant' => 'info']) @include('components.kpi', ['label' => 'Open jobs (all time)', 'value' => number_format($technicians->sum('open_jobs')), 'variant' => 'warn']) @include('components.kpi', ['label' => 'Completed today', 'value' => number_format($jobs->where('status', 'completed')->count()), 'variant' => 'good'])
{{-- Technician load --}}

Technician load

@forelse ($technicians as $tech) @php $capacity = (int) ($tech->max_jobs_per_day ?: 4); $load = (int) $tech->open_jobs; $saturated = $load >= $capacity; @endphp @empty @endforelse
TechnicianContactSkillsService areas Open jobsCapacityRatingStatus
{{ $tech->name }} @if ($tech->vehicle_plate)
{{ $tech->vehicle_plate }}
@endif
{{ $tech->phone }} @if ($tech->email)
{{ $tech->email }}
@endif
@foreach ((array) ($tech->skills ?? []) as $skill) {{ title_case_words(str_replace('_', ' ', $skill)) }} @endforeach {{ implode(', ', (array) ($tech->service_areas ?? [])) ?: '—' }} {{ $load }} {{ $capacity }} {{ $tech->rating ? number_format((float) $tech->rating, 1).' ★' : '—' }} {{ title_case_words($tech->status) }}
@include('components.empty-state', [ 'title' => 'No technicians on the roster', 'message' => 'Add technicians under Inventory before dispatching work.', ])
{{-- Today's jobs, grouped by technician --}}

Today's schedule

{{ $jobs->count() }} job(s) scheduled for today
@if ($jobs->isEmpty()) @include('components.empty-state', [ 'title' => 'Nothing scheduled today', 'message' => 'No work order has a start time falling on today.', ]) @else @foreach ($jobs->groupBy(fn ($j) => $j->technician?->name ?? 'Unassigned') as $techName => $techJobs)

{{ $techName }} ({{ $techJobs->count() }})

@foreach ($techJobs as $job) @endforeach
TimeReferenceCustomerType AddressPriorityStatus
{{ $job->scheduled_start?->format('H:i') }} @if ($job->scheduled_end) – {{ $job->scheduled_end->format('H:i') }} @endif {{ $job->work_order_number }} {{ optional($job->customer)->display_name ?? '—' }} {{ title_case_words($job->type) }} {{ Str::limit($job->address, 48) }} {{ title_case_words($job->priority) }} {{ title_case_words($job->status) }} Open
@endforeach @endif
@endsection