@include('viki-location.partials.top-header')
{{ __('viki.cal_hero_title') }}
{{ __('viki.cal_hero_sub') }}
@if (session('success'))
{{ session('success') }}
@endif
@if ($errors->any())
@foreach ($errors->all() as $error)- {{ $error }}
@endforeach
@endif
@if($maisons->isEmpty())
@else
{{-- Sélecteur de maison --}}
{{ __('viki.cal_choose_house') }}
{{-- Statut du jour --}}
@php
$sb = [
'available' => ['sb-available','fa-circle-check',__('viki.cal_available_today'),__('viki.cal_available_today_sub')],
'blocked' => ['sb-blocked','fa-lock',__('viki.cal_blocked_today'),__('viki.cal_blocked_today_sub')],
'booked' => ['sb-booked','fa-calendar-check',__('viki.cal_booked_today'),__('viki.cal_booked_today_sub')],
][$todayStatus];
@endphp
{{ $maison->title }} — {{ $sb[2] }}
{{ $sb[3] }}
{{-- Calendrier --}}
@foreach([__('viki.weekday_mon'),__('viki.weekday_tue'),__('viki.weekday_wed'),__('viki.weekday_thu'),__('viki.weekday_fri'),__('viki.weekday_sat'),__('viki.weekday_sun')] as $wd)
{{ $wd }}
@endforeach
@foreach($weeks as $week)
@foreach($week as $d)
@php
$classes = 'cal-day';
if (!$d['inMonth']) $classes .= ' out';
if ($d['isPast']) $classes .= ' past';
else $classes .= ' day-' . $d['status'];
if ($d['isToday']) $classes .= ' today';
$tag = $d['status'] === 'booked' ? __('viki.cal_tag_booked') : ($d['status'] === 'blocked' ? __('viki.cal_tag_blocked') : '');
@endphp
{{ $d['day'] }}
@if($tag && !$d['isPast']){{ $tag }}@endif
@endforeach
@endforeach
{{ __('viki.cal_legend_available') }}
{{ __('viki.cal_legend_blocked') }}
{{ __('viki.cal_legend_booked') }}
{{ __('viki.cal_today') }}
{{-- Formulaire + périodes --}}
{{ __('viki.cal_add_title') }}
{{ __('viki.cal_upcoming') }}
@if($upcomingPeriods->isEmpty())
{{ __('viki.cal_no_upcoming') }}
@else
@foreach($upcomingPeriods as $period)
{{ $period->isBooked() ? __('viki.cal_type_reservation') : __('viki.cal_tag_blocked') }}
@if($period->guest_name) — {{ $period->guest_name }} @endif
{{ __('viki.cal_from') }} {{ $period->start_date->translatedFormat('d M Y') }}
{{ __('viki.cal_to_lc') }} {{ $period->end_date->translatedFormat('d M Y') }}
@if($period->note) · {{ $period->note }} @endif
@endforeach
@endif
@endif