@extends('layouts.admin.app') @section('title', 'Danh sách booking theo chuyến') @section('content') @php $bookingStatusLabels = [ 'draft' => 'Nháp', 'reserved' => 'Đã giữ chỗ', 'awaiting_payment' => 'Chờ thanh toán', 'paid' => 'Đã thanh toán', 'cancelled' => 'Đã hủy', 'expired' => 'Hết hạn', ]; $paymentStatusLabels = [ 'pending' => 'Chờ xử lý', 'success' => 'Thành công', 'failed' => 'Thất bại', ]; $journeyTypeLabels = [ 'one_way' => 'Một chiều', 'round_trip' => 'Hai chiều', ]; $journeyDirectionLabels = [ 'outbound' => 'Chiều đi', 'return' => 'Chiều về', ]; @endphp
Tuyến: {{ $trip->route?->code }} - {{ $trip->route?->fromStation?->name }} - {{ $trip->route?->toStation?->name }}
Xe: {{ $trip->vehicle?->name }}
Giờ chạy: {{ $trip->depart_at?->format('d/m/Y H:i') }} - {{ $trip->arrive_at?->format('H:i') }}
{{-- [TEMPORARILY HIDDEN: Giá vé]Giá vé: {{ number_format($trip->price) }}đ
[END HIDDEN] --}}| Mã booking | Khách hàng | Số ghế | Loại hành trình | Trạng thái | Điểm đi | Điểm đến | Điểm đón | Điểm trả | {{-- [TEMPORARILY HIDDEN: Cột Tổng tiền] --}} {{--Tổng tiền | --}} {{-- [END HIDDEN] --}}Tác vụ |
|---|---|---|---|---|---|---|---|---|---|---|
| {{ $item->code }} | {{ $item->customer_name }} {{ $item->customer_phone }} |
{{ $item->items->pluck('seat_code_snapshot')->implode(', ') }} |
{{ $journeyTypeLabels[$item->journey_type] ?? 'Một chiều' }}
@if (!empty($item->journey_direction))
{{ $journeyDirectionLabels[$item->journey_direction] ?? $item->journey_direction }} @endif @if (!empty($item->booking_group_code)) {{ $item->booking_group_code }} @endif |
{{ $bookingStatusLabels[$item->booking_status] ?? $item->booking_status }} / {{ $paymentStatusLabels[$item->payment_status] ?? $item->payment_status }} | {{ $item->trip?->route?->fromStation?->name ?: '-' }} | {{ $item->trip?->route?->toStation?->name ?: '-' }} | {{ $item->pickupStation?->name ?: ($item->pickup_address ?: '-') }} | {{ $item->dropoffStation?->name ?: ($item->dropoff_address ?: '-') }} | {{-- [TEMPORARILY HIDDEN: Hiển thị tổng tiền]{{ number_format($item->total_amount) }}đ | [END HIDDEN] --}}Xem chi tiết @if (!($item->booking_status === 'paid' || $item->payment_status === 'success')) @endif |
| Chuyến này chưa có booking. | ||||||||||