{{-- Copyright (c) 2024 Duncan McQuat All rights reserved. --}} @extends('admin.layout', ['title' => 'Bookings']) @include('admin.navbar') @section('css') @vite(['resources/css/adminBooking.css']) @endsection @section('content')
Loading
Available | Booked | Your Booking
@if (session('error'))
{{ session('error') }}
@endif @if ($errors->any())
@endif
@php // Initialize the default query parameters $defaultParams = ['week' => 0, 'group' => 'all']; // You can adjust the default values as needed // Function to generate a query string from an array of parameters function buildQueryString($params) { $query = http_build_query($params); return $query ? '?' . $query : ''; } use Illuminate\Support\Carbon; // Get the current query parameters $currentParams = request()->query(); $params = array_merge($defaultParams, $currentParams); $linkUrlBack = buildQueryString(['week' => ($params['week'] - 1), 'group' => $params['group']]); $linkUrlForward = buildQueryString(['week' => ($params['week'] + 1), 'group' => $params['group']]); @endphp @for ($i = 0; $i <= 5; $i++) @for ($j = 0; $j <= 4; $j++) @endfor @endfor
Back {{date("M d Y" , strtotime($dateRange[0]))}} - {{date("M d Y" , strtotime($dateRange[4]))}} Forward
Time Items Monday
{{ Carbon::parse($dateRange[0])->toFormattedDateString() }}
Tuesday
{{ Carbon::parse($dateRange[1])->toFormattedDateString() }}
Wednesday
{{ Carbon::parse($dateRange[2])->toFormattedDateString() }}
Thursday
{{ Carbon::parse($dateRange[3])->toFormattedDateString() }}
Friday
{{ Carbon::parse($dateRange[4])->toFormattedDateString() }}
{{$periods[$i]}}
    @foreach ($itemNames as $name)
  • {{$name}}
  • @endforeach
    @foreach ($tableData[$i][$j] as $item) @if ($item[0])
  • ✓ (Per {{$item[5]}})
  • @elseif ($item[2])
  • Your Booking (Per {{$item[5]}})
  • @else
  • {{ $item[3] }} (Per {{$item[5]}})
  • @endif @endforeach
@endsection @section('js') @vite(['resources/js/admin/table.ts']) @endsection