@extends('layouts.app') @section('title', 'Réservations — ' . $activeHostel?->name) @section('content')
Accès lecture seule
En tant que Financier, vous consultez uniquement sans pouvoir créer ou modifier.
Aucune réservation pour {{ $year }}
Commencez par créer votre première réservation.
| Guest principal | Arrivée | Départ | Nuits | Guests | Source | Montant TND | Statut | Ajouté par | @if($canEdit)Actions | @endif
|---|---|---|---|---|---|---|---|---|---|
|
@if($isActive)
{{ $initial }}
{{ $initial }}
@endif
{{ $res->mainGuest?->first_name }} {{ $res->mainGuest?->last_name }} {{ $res->mainGuest?->country?->name ?? '—' }} |
{{ $res->start_date->format('d/m/Y') }} | {{ $res->end_date->format('d/m/Y') }} | {{ $res->nights }}n | {{ $res->total_guests }} | {{ $res->source ?? '—' }} | {{ number_format($res->total_price_tnd, 3) }} | @if($res->status === 'confirmed') Confirmé @elseif($res->status === 'pending') En attente @else {{ ucfirst($res->status) }} @endif | {{ $res->created_by ?? '—' }} | @if($canEdit)@endif |
Aucune unité d'hébergement
Configurez d'abord vos chambres et tentes.
| Unité | @foreach($planning['dates'] as $d) @php $isToday = $d->isSameDay($today); $isWeekend = $d->isWeekend(); $cls = $isToday ? 'today-col' : ($isWeekend ? 'weekend-col' : ''); @endphp
{{ $d->format('d') }}
{{ ucfirst($d->locale('fr')->isoFormat('ddd')) }} {{ $d->format('m') }}
|
@endforeach
|
|---|---|---|
| 🏠 {{ $room->name }} ({{ $room->max_capacity }} pers.) | @foreach($planning['dates'] as $d) @php $key = $d->format('Y-m-d'); $occ = $occupancy['room'][$room->id][$key] ?? null; $cls = $d->isSameDay($today) ? 'today-col' : ($d->isWeekend() ? 'weekend-col' : ''); @endphp @if($occ)✗ | @else✓ | @endif @endforeach
| 🛏️ {{ $room->name }} ({{ $room->beds->count() }} lits) | @foreach($planning['dates'] as $d) @php $key = $d->format('Y-m-d'); $totalBeds = $room->beds->count(); $occupiedBeds = 0; foreach ($room->beds as $bed) { if (isset($occupancy['bed'][$bed->id][$key])) $occupiedBeds++; } $freeBeds = max(0, $totalBeds - $occupiedBeds); if ($totalBeds === 0) $recapCls = 'empty'; elseif ($freeBeds === 0) $recapCls = 'full'; elseif ($freeBeds < $totalBeds) $recapCls = 'partial'; else $recapCls = 'empty'; $cls = $d->isSameDay($today) ? 'today-col' : ($d->isWeekend() ? 'weekend-col' : ''); @endphp{{ $freeBeds }}/{{ $totalBeds }} | @endforeach|
| ↳ {{ $bed->name }} | @foreach($planning['dates'] as $d) @php $key = $d->format('Y-m-d'); $occ = $occupancy['bed'][$bed->id][$key] ?? null; $cls = $d->isSameDay($today) ? 'today-col' : ($d->isWeekend() ? 'weekend-col' : ''); @endphp @if($occ)✗ | @else✓ | @endif @endforeach
| ⛺ {{ $tent->name }} ({{ $tent->max_persons }} pers.) | @foreach($planning['dates'] as $d) @php $key = $d->format('Y-m-d'); $occ = $occupancy['tent_space'][$tent->id][$key] ?? null; $cls = $d->isSameDay($today) ? 'today-col' : ($d->isWeekend() ? 'weekend-col' : ''); @endphp @if($occ)✗ | @else✓ | @endif @endforeach
Supprimer la réservation
Cette action est irréversible
Réservation de :