@extends('admin.layouts.app') @section('title', 'Reservation Details') @section('page_title', 'Reservation Details') @section('content') @php $bookingTypeLabel = $bookingTypes[ $reservation->booking_type ] ?? \Illuminate\Support\Str::headline( $reservation->booking_type ); $statusLabel = $statuses[ $reservation->status ] ?? \Illuminate\Support\Str::headline( $reservation->status ); $statusClass = match ($reservation->status) { \App\Models\Reservation::STATUS_PENDING => 'status-pending', \App\Models\Reservation::STATUS_CONTACTED => 'status-contacted', \App\Models\Reservation::STATUS_CONFIRMED => 'status-confirmed', \App\Models\Reservation::STATUS_COMPLETED => 'status-completed', \App\Models\Reservation::STATUS_CANCELLED => 'status-cancelled', default => 'status-unknown', }; $estimatedAmount = ! is_null( $reservation->estimated_amount ) ? (float) $reservation->estimated_amount : null; $advanceAmount = ! is_null( $reservation->advance_amount ) ? (float) $reservation->advance_amount : null; $remainingAmount = ! is_null($estimatedAmount) ? $estimatedAmount - ($advanceAmount ?? 0) : null; @endphp

{{ $reservation->booking_number }}

Review the complete reservation information and update its processing details.

{{ $bookingTypeLabel }} {{ $statusLabel }}
@if ($errors->any())
Please correct the following information:
@endif
{{-- Reservation overview --}}

Reservation Overview

General booking and submission information.
Booking Number
{{ $reservation->booking_number }}
Booking Type
{{ $bookingTypeLabel }}
Source
{{ $reservation->source ? \Illuminate\Support\Str::headline( $reservation->source ) : 'Not specified' }}
Current Status
{{ $statusLabel }}
Submitted At
{{ $reservation->created_at ? $reservation->created_at ->format('d M Y, h:i A') : 'Not available' }}
Last Updated
{{ $reservation->updated_at ? $reservation->updated_at ->format('d M Y, h:i A') : 'Not available' }}
@if ($reservation->confirmed_at)
Confirmed At
{{ $reservation->confirmed_at ->format('d M Y, h:i A') }}
@endif @if ($reservation->cancelled_at)
Cancelled At
{{ $reservation->cancelled_at ->format('d M Y, h:i A') }}
@endif
{{-- Guest information --}}

Guest Information

Contact information submitted by the guest.
Guest Name
{{ $reservation->guest_name }}
Email Address
@if ($reservation->email) {{ $reservation->email }} @else Not provided @endif
Company Name
{{ $reservation->company_name ?: 'Not provided' }}
{{-- Room reservation details --}} @if ( $reservation->booking_type === \App\Models\Reservation::TYPE_ROOM )

Room Reservation Details

Requested room, dates and guest occupancy.
Room Type
{{ $reservation->roomType?->name ?? 'Deleted or unavailable room type' }}
Check-in Date
{{ $reservation->check_in ? $reservation->check_in ->format('d M Y') : 'Not specified' }}
Check-out Date
{{ $reservation->check_out ? $reservation->check_out ->format('d M Y') : 'Not specified' }}
Number of Rooms
{{ $reservation->number_of_rooms ?? 'Not specified' }}
Adults
{{ $reservation->adults ?? 'Not specified' }}
Children
{{ $reservation->children ?? 0 }}
@if ( $reservation->check_in && $reservation->check_out )
Number of Nights
{{ $reservation->check_in ->diffInDays( $reservation->check_out ) }}
@endif
@endif {{-- Venue and event details --}} @if ( $reservation->booking_type === \App\Models\Reservation::TYPE_VENUE_EVENT )

Venue & Event Details

Event service, schedule and expected attendance.
Requested Service
{{ $reservation->venue?->name ?? $reservation->service_name ?? 'Not specified' }}
Event Type
{{ $reservation->eventType?->name ?? ( $reservation->event_type ? \Illuminate\Support\Str::headline( $reservation->event_type ) : 'Not specified' ) }}
Event Date
{{ $reservation->event_date ? $reservation->event_date ->format('d M Y') : 'Not specified' }}
Expected Guests
{{ $reservation->expected_guests ?? 'Not specified' }}
@endif {{-- Package reservation details --}} @if ( $reservation->booking_type === \App\Models\Reservation::TYPE_PACKAGE )

Day Package Details

Requested package date and guest information.
Package Name
{{ $reservation->service_name ?: 'Not specified' }}
Reservation Date
{{ $reservation->event_date ? $reservation->event_date ->format('d M Y') : 'Not specified' }}
Expected Guests
{{ $reservation->expected_guests ?? 'Not specified' }}
@endif {{-- Special request --}}

Guest Message / Special Request

Additional information submitted with the reservation.
@if ($reservation->special_request)
{!! nl2br( e($reservation->special_request) ) !!}
@else
No special request was provided.
@endif
{{-- Admin update form --}}

Admin Processing

Update status, amount and internal note.
@csrf @method('PATCH')
@error('status')
{{ $message }}
@enderror
@error('estimated_amount')
{{ $message }}
@enderror
@error('advance_amount')
{{ $message }}
@enderror
Estimated ৳{{ number_format( $estimatedAmount ?? 0, 2 ) }}
Advance ৳{{ number_format( $advanceAmount ?? 0, 2 ) }}
Estimated Remaining ৳{{ number_format( $remainingAmount ?? 0, 2 ) }}
This note is only for Admin use and will not be shown to the guest.
@error('admin_note')
{{ $message }}
@enderror
Cancel

Status Guide

Pending

New request awaiting review.

Contacted

The guest has been contacted.

Confirmed

The reservation has been confirmed.

Completed

The reservation service is complete.

Cancelled

The reservation has been cancelled.

@endsection @push('styles') @endpush @push('scripts') @endpush