@extends('layouts.dashboard') @section('content') @php use App\Models\Reservation; /** * Admin → Reservations → one booking. The operator's read-only view of a single reservation: * who it is for, when and where, the table and occasion, the guest's requests and the internal * staff note, plus the booking's status history. Built from the shared dashboard components * (.qm-od-topbar / .qm-card / .qm-ops-head / .qm-tbl-id / .qm-table / row g-3) — the same * language as the restaurant detail page, no new styles. Management (edit / status changes) * stays in the vendor panel; the only write offered here is the admin cancel already on the list. * * @var array $reservation the booking row (+ rest_*, cuisine_*, label_*, table_label, customer_*) * @var array $history status-history rows, newest first, each with its actor */ $r = $reservation; $status = (string) $r['status']; $srcKey = (string) ($r['source'] ?? 'staff'); $isCancellable = in_array($status, ['pending', 'confirmed', 'seated', 'waitlisted'], true); @endphp @php /* .qm-d2: the dashboard density standard (app.css §35) */ @endphp
@php $resFlag = function_exists('cuisine_flag') ? cuisine_flag((string) ($r['cuisine_slug'] ?? '')) : null;
@endphp
@if ($resFlag){!! restaurant_logo_html(['logo' => $r['rest_logo'] ?? '', 'name' => $r['rest_name'] ?? '', 'cuisine_slug' => $r['cuisine_slug'] ?? ''], 'sm', 'qm-brandmark--round') !!} {{ trim((string) ($r['rest_name'] ?? '') . ' · ' . (string) ($r['cuisine_name'] ?? ''), ' ·') }}
| {{ t_raw('admin.reservationdetail.col_change') }} | {{ t_raw('admin.restaurantdetail.col_by') }} | {{ t_raw('common.description') }} | {{ t_raw('common.when') }} |
|---|---|---|---|
| @if (!empty($h['from_status']) && !empty($h['to_status']) && (string) $h['from_status'] !== (string) $h['to_status']) {{ Reservation::statusLabel((string) $h['from_status']) }} {{ Reservation::statusLabel((string) $h['to_status']) }} @else {{ activity_label((string) $h['action']) }} @endif |
@if (!empty($h['actor_name']))
{!! brandmark_html($h['actor_avatar'] ?? null, (string) $h['actor_name'], 'sm', 'qm-brandmark--round') !!}
@else{{ t_raw('admin.reservationdetail.by_system') }}@endif
{{ $h['actor_name'] }}
|
{!! or_dash(history_detail($h['detail'] ?? null) ?: null) !!} |
{{ time_ago($h['created_at']) }} |