@extends('backend.partials.master') @section('title') {{ ___('label.transport_bookings') }} @endsection @section('maincontent') {{-- Request-to-book, like the mobile app: the agency prices it on confirmation, then it can be paid. --}}
{{ ___('label.request_transport') }}
@csrf
@error('type') {{ $message }} @enderror
@error('route') {{ $message }} @enderror
@error('travel_date') {{ $message }} @enderror
@forelse($trips as $t) @php $c = match($t->status) { 'Paid', 'Completed' => 'success', 'Confirmed' => 'info', 'Cancelled' => 'danger', default => 'warning', }; $payable = ! in_array($t->status, ['Paid', 'Completed', 'Cancelled'], true) && (float) $t->fare > 0; @endphp {{ $t->booking_no }} {{ admin_label($t->type) }} {{ $t->route }} {{ $t->travel_date?->translatedFormat('d M Y') }} {{ $t->vehicle ?? '—' }} {{ $t->driver->name ?? ___('label.not_assigned_yet') }} {{-- A pending request has no fare yet — the agency prices it on confirmation. --}} {{ (float) $t->fare > 0 ? currency_symbol() . number_format($t->fare, 2) : ___('label.to_be_quoted') }} {{ admin_label($t->status) }} @if($t->payment_claimed_at)
{{ ___('label.payment_claimed_awaiting') }} @endif @if($payable) @else — @endif @empty {{ ___('label.no_transport_bookings_yet') }} @endforelse
@foreach($trips as $t) @if(! in_array($t->status, ['Paid', 'Completed', 'Cancelled'], true) && (float) $t->fare > 0) @endif @endforeach
@endsection