$date->isToday()])> --}} | $selectedDate === $date->toDateString()])>
{{ $date->format('j M') }}
{{ $date->format('D') }}
|
@endfor
---|---|
@if(!empty($slots))
@foreach ($slots as $index => $slot)
@php
$subject = $slot?->subjectGroupSubjects?->subject?->name;
$group = $slot?->subjectGroupSubjects?->userSubjectGroup?->group?->name ?? '';
$total_spaces = $slot->spaces ?? 0;
$total_booked = $slot->total_booked ?? 0;
$available_slot = $total_spaces - $total_booked;
$show_all = $index > 3;
$cartItemIds = array_column(array_column($cartItems?->toArray() ?? [], 'options'), 'slot_id');
$tooltipClass = Arr::random(['warning', 'pending', 'ready', 'success']);
$discountedFee = 0;
if(isActivePackage('kupondeal')){
$coupon = $slot?->subjectGroupSubjects?->coupons?->first();
if(!empty($coupon)){
$discountedFee = getDiscountedTotal($slot->session_fee, $coupon->discount_type, $coupon->discount_value);
}
}
@endphp
$index > 3, 'am-slot-selected' => in_array($slot->id, $cartItemIds), 'am-weekly-slots_card', 'am-slot-'.$tooltipClass]) id="sessionslot-{{ $slot->id}}">
@if(!empty($group))
@endforeach
@else
{{ __('calendar.no_sessions') }}
@endif
{{ $group }}
@if(in_array($slot->id, $cartItemIds))
@endif
@if(!empty($subject)) |
@endfor