@php $statusOptions = collect(\App\Enums\TripStatus::cases())->map(fn ($status) => [ 'value' => $status->value, 'label' => $status->label(), ])->values(); $vehicleOptions = $vehicles->map(fn ($v) => ['ulid' => $v->ulid, 'plate' => $v->plate])->values(); $driverOptions = $drivers->map(fn ($d) => ['ulid' => $d->ulid, 'name' => $d->name])->values(); $customerOptions = $customers->map(fn ($c) => ['ulid' => $c->ulid, 'name' => $c->name])->values(); @endphp {{ __('Trips — Spreadsheet View') }}

{{ __('Trips — Spreadsheet View') }}

{{ __('Click a cell to edit. Tab / Shift+Tab moves between cells, Enter moves down. Type in Vehicle, Driver, or Customer to search. Drag or shift-click to select a range to copy; paste tab-delimited data from Excel or Sheets.') }}

{{ __('Form View') }} {{-- Columns visibility dropdown --}}

{{ __('Drag to reorder') }}

{{-- Vanilla HTML5 drag-and-drop — no library. Dropping a dragged field onto another field's row moves it to that position and persists the new order the same way visibility is already persisted. --}}
{{ __('Import CSV') }} {{ __('Export Excel') }}
{{-- Grid-specific filters — Customer/Pickup/Dropoff are additional to what the Form View offers, since the grid is where a user works through many trips at once and needs to narrow them down more ways. --}}
@if (array_filter($filters ?? [])) {{ __('Clear') }} @endif
{{-- Excel-sheet-style customer tabs — one tab per company customer plus "All", filtering the rows already loaded above client-side. Adding a row while a customer tab is active pre-assigns that customer to the new row. --}} @if ($truncated ?? false)
{{ __('Showing the first :max rows for this filter. Narrow the date range to see the rest.', ['max' => 300]) }}
@endif
{{-- Bulk action bar — appears once at least one row is selected --}}
{{-- The grid itself — styled to read as a spreadsheet: flat cells, thin gridlines, a teal ring on the active cell only. The outer card chrome stays on-brand; everything inside the border is spreadsheet-flat, not a stack of form fields. --}}
@if ($rows->isEmpty())

{{ __('No trips found.') }}

@else
@endif {{-- Add Row --}}