@extends('layouts.main-layout')
@section('title')
All Reservations
@endsection
@section('content')
{{--
--}}
{{-- @comp
onent('admin.includes.per-page')
@endcomponent --}}
{{--# | --}}
Booking No |
Guest Name |
Booking Date
|
Room No |
CheckIn |
CheckOut |
Status |
Total Price |
View |
@foreach($bookings as $booking)
@php
$bookingDetail = $booking->bookingDetails->first();
if ($bookingDetail) {
$room = $rooms->where('RoomId', $bookingDetail->RoomId)
->where('RoomTypeId', $bookingDetail->RoomTypeId)
->first();
} else {
$room = null;
}
@endphp
{{--{{$i + $bookings->firstItem()}} | --}}
{{$booking->BookingId}} |
{{$booking->BookerFirstName}} {{$booking->BookerLastName}} |
{{(new Carbon\Carbon($booking->BookingDate))->format('d-m-Y')}} |
@if($room)
{{$room->RoomName}} |
@else
- |
@endif
{{(new Carbon\Carbon($booking->BeginDate))->format('d-m-Y')}} |
{{(new Carbon\Carbon($booking->EndDate))->format('d-m-Y')}} |
@if($booking->BookingStatusId == 2)
@elseif( $booking->BookingStatusId == 3 )
No Show
@else
@endif
|
{{round($booking->TotalPrice,2)}} |
@if(count($booking->folios) && $booking->_InitialBookingStatus != 'cancelled' && count($booking->bookingDetails))
@php
$booking->setAttribute('_RoomName', ($room ? $room->RoomName : ''));
@endphp
@if($room)
@component('admin.reservations.includes.booking-details',[
'roomId' => $room->RoomId,
'roomTypeId' => $room->RoomTypeId,
'booking' => $booking,
'cellWidth' => 0,
'displayDate' => null,
'folioChargeTypes' => $folioChargeTypes,
'folioPaymentTypes' => $folioPaymentTypes,
'folioCardTypes' => $folioCardTypes,
'isCalendar' => false,
])
@endcomponent
@endif
|
@else
- |
@endif
@endforeach
{{-- {{$bookings->appends(request()->query())->links('vendor.pagination.default')}} --}}
{{$bookings->links()}}
@component('admin.includes.loader')
@endcomponent
@endsection
@section('js')
@endsection