@extends('layouts.main') @section('title', 'Booking Detail') @section('content')
@php $startDateTime = \Carbon\Carbon::parse($booking->start_date . ' ' . $booking->start_time); $endDateTime = \Carbon\Carbon::parse($booking->end_date . ' ' . $booking->end_time); @endphp

Booking Details

# Booking Id
{{ $booking->booking_id }}
Date
{{ $startDateTime->format('d M Y, h:i A') }} - {{ $endDateTime->format('d M Y, h:i A') }}
Studio Details
Studio
@foreach($booking->studios as $studio) {{ $studio->name }} @endforeach
Type of Studio
@foreach($booking->studios as $studio) {{ $studio->studioType }} @endforeach
@if($booking->rentals->count() > 0)
Equipment Details
Equipment
@foreach($booking->rentals as $rental) @if(!is_null($rental->checkin_id)) {{ $rental->name }} @else {{ $rental->name }} @endif @endforeach
Serial Number
@foreach($booking->rentals as $rental) {{ $rental->serial_number }} @endforeach
@endif @if($booking->resources->count() > 0)
Resource Details
Resource
@foreach($booking->resources as $resource) {{ ucfirst($resource->fname) }} {{ ucfirst($resource->lname) }} @endforeach
Role
@foreach($booking->resources as $resource) {{ $resource->name }} @endforeach
@endif
Client Details
Name
{{ucfirst($booking->booking_by->fname)}} {{ucfirst($booking->booking_by->lname)}}
Phone
{{$booking->booking_by->mobile_number}}
Email
{{$booking->booking_by->email}}
Notes
Notes

@if($booking->notes && is_iterable($booking->notes) && count($booking->notes))
    @foreach($booking->notes as $note)
  • {!! $note->notes !!} {{ \Carbon\Carbon::parse($note->created_at)->format('d M Y, h:i A') }} @if($booking->status == 0 && $note->createdby == auth()->id())
    @endif
  • @endforeach
@else No notes available. @endif @if($booking->status == 0) @endif
Booking Cost
{{$booking->total_points}} pts
@if($booking->status == 2) Cancelled @elseif($booking->status == 1) Completed @elseif($endDateTime > \Carbon\Carbon::now()) @else Booking is not marked as complete @endif
@foreach($old_bookings as $book)

Notes: @if($book->notes && count($book->notes))
    @foreach($book->notes as $note)
  • {!! $note->notes !!} {{ \Carbon\Carbon::parse($note->created_at)->format('d M Y, h:i A') }} @if($book->status == 0 && $note->createdby == auth()->id())
    @endif
  • @endforeach
@else No notes available. @endif
@if($book->status == 0) @endif
@endforeach
@endsection @section('footer_scripts') @endsection