@slot('title') {{ __('sidebar.bookings') }} @endslot @role('tutor') @include('livewire.pages.tutor.manage-sessions.tabs') @endrole
{{ __('calendar.current_'.$showBy) }}

{{ __('general.loading') }}

@if($showBy == 'daily')
@php $startTime = \Carbon\Carbon::createFromTime(0, 0, 0); $endTime = \Carbon\Carbon::createFromTime(23, 59, 0); @endphp @while ($startTime <= $endTime) @if (isset($upcomingBookings[$startTime->format('h:i a')])) @else @endif @php $startTime->addHour(); @endphp @endwhile
{{ __('calendar.time') }} {{ parseToUserTz($currentDate)->format('F j, Y \\G\\M\\T P') }}
{{ $startTime->format('h:i a') }} @foreach ($upcomingBookings[$startTime->format('h:i a')] as $subject => $booking)
@endforeach
@elseif($showBy == 'weekly')
@for ($date = $currentDate->copy()->startOfWeek($startOfWeek); $date->lte($currentDate->copy()->endOfWeek(getEndOfWeek($startOfWeek))); $date->addDay()) @endfor @for ($date = $currentDate->copy()->startOfWeek($startOfWeek); $date->lte($currentDate->copy()->endOfWeek(getEndOfWeek($startOfWeek))); $date->addDay()) @endfor
{{ $date->format('j F') }} {{ $date->format('D') }}
@if (isset($upcomingBookings[$date->toDateString()])) @foreach ($upcomingBookings[$date->toDateString()] as $booking) @endforeach @else {{ __('calendar.no_sessions') }} @endif
@elseif($showBy == 'monthly')
@foreach ($days as $day) @endforeach @php $startOfCalendar = $currentDate->copy()->firstOfMonth()->startOfWeek($startOfWeek); $endOfCalendar = $currentDate->copy()->lastOfMonth()->endOfWeek(getEndOfWeek($startOfWeek)); @endphp @while ($startOfCalendar <= $endOfCalendar) @for ($i = 0; $i < 7; $i++) @php $totalBookings=0; @endphp @php $startOfCalendar->addDay(); @endphp @endfor @endwhile
{{ $day['short_name'] }}
$startOfCalendar->format('m') != $currentDate->format('m')])>
$startOfCalendar->isToday()])>{{ parseToUserTz($startOfCalendar)->format('j') }} @if (isset($upcomingBookings[$startOfCalendar->toDateString()])) @foreach ($upcomingBookings[$startOfCalendar->toDateString()] as $booking) @php $totalBookings += 1; @endphp @endforeach {{ $totalBookings }} {{ __('calendar.sessions') }} @endif
@if (isset($upcomingBookings[$startOfCalendar->toDateString()]))
    @foreach ($upcomingBookings[$startOfCalendar->toDateString()] as $index => $booking) @php $subject = $booking->slot->subjectGroupSubjects->subject->name; $tooltipClass = Arr::random(['warning', 'pending', 'ready', 'success']) @endphp
  • parseToUserTz($booking->slot->start_time)->isFuture(), 'am-blur-tooltip' => auth()->user()->role == 'student' && ($booking->status == 'rescheduled' || $booking->status == 'disputed'), 'am-tooltip', 'am-addreview-tooltip' => parseToUserTz($booking->slot->start_time)->isPast() ])>
    {{ $subject }} @if(parseToUserTz($booking->slot->start_time)->isFuture()) {{ parseToUserTz($booking->slot->start_time)->format('h:i a') }} - {{ parseToUserTz($booking->slot->end_time)->format('h:i a') }} @elseif($booking->rating_exists) {{ __('calendar.review_submitted') }} @elseif($booking->status == 'completed') @php $tutorInfo['name'] = $booking->tutor->full_name; if (!empty($booking?->tutor?->image) && Storage::disk(getStorageDisk())->exists($booking?->tutor?->image)) { $tutorInfo['image'] = resizedImage($booking?->tutor?->image, 36, 36); } else { $tutorInfo['image'] = setting('_general.default_avatar_for_user') ? url(Storage::url(setting('_general.default_avatar_for_user')[0]['path'])) : resizedImage('placeholder.png', 36, 36); } @endphp {{ __('calendar.add_review') }} @else {{ __('calendar.mark_as_completed') }} @endif
    @if(auth()->user()->role == 'student' && $booking->status == 'rescheduled') @elseif(auth()->user()->role == 'student' && $booking->status == 'disputed') @elseif(parseToUserTz($booking->slot->start_time)->isFuture()) @endif
  • @endforeach
@endif
@else @endif
@push('styles') @vite([ 'public/css/flatpicker.css', 'public/css/flatpicker-month-year-plugin.css' ]) @endpush @push('scripts') @endpush @script @endscript