@extends('layouts.app') @section('title', 'Dashboard — ' . $activeHostel->name) @section('content')
{{-- ── HERO ─────────────────────────────────────────────────── --}}
Dashboard {{ now()->format('d M Y') }}

Bonjour 👋
{{ Auth::guard('owner')->user()->name }}

{{ $activeHostel->name }}
{{-- ── KPI CARDS ────────────────────────────────────────────── --}}

Réservations actives

{{ $activeReservations }}

🛏️
En cours

Lits disponibles

{{ $availableBeds }}

Actifs & libres

Revenus du mois

{{ number_format($monthlyRevenue, 0, '.', ' ') }}

{{ $activeHostel->default_currency ?? 'TND' }}
💰
{{ now()->format('F Y') }}
{{-- ── ROW 2 : Chambres + Taux d'occupation ─────────────────── --}}
{{-- Chambres card --}}
🚪 État des chambres
@php $total = $privateRoomsCount + $dormitoryRoomsCount + $unavailableRoomsCount; @endphp {{ $total }} au total
{{-- Privées --}}
🔑
Chambres privées {{ $privateRoomsCount }}
{{ $total > 0 ? round($privateRoomsCount/$total*100) : 0 }}% du parc · Actives & disponibles
{{-- Dortoirs --}}
🏨
Dortoirs {{ $dormitoryRoomsCount }}
{{ $total > 0 ? round($dormitoryRoomsCount/$total*100) : 0 }}% du parc · Actifs & disponibles
{{-- Indisponibles --}}
🚫
Indisponibles {{ $unavailableRoomsCount }}
{{ $total > 0 ? round($unavailableRoomsCount/$total*100) : 0 }}% du parc @if($blockedRoomIds->count() > 0) · dont {{ $blockedRoomIds->count() }} bloquée{{ $blockedRoomIds->count()>1?'s':'' }} @endif
{{-- Taux d'occupation --}}
📊 Occupation
@php $totalRooms = $privateRoomsCount + $dormitoryRoomsCount + $unavailableRoomsCount; $availableRooms = $privateRoomsCount + $dormitoryRoomsCount; $occupancyPct = $totalRooms > 0 ? round(($totalRooms - $availableRooms) / $totalRooms * 100) : 0; $circumference = 2 * M_PI * 50; $offset = $circumference - ($occupancyPct / 100) * $circumference; @endphp
{{ $occupancyPct }}% occupé
Disponibles {{ $availableRooms }}
Indisponibles {{ $unavailableRoomsCount }}
Total {{ $totalRooms }}
{{-- ── ROW 3 : Tentes + Actions rapides ─────────────────────── --}}
{{-- Espaces tentes --}}
Espaces tentes
@php $totalTents = $activeTentSpacesCount + $inactiveTentSpacesCount; @endphp {{ $totalTents }} total

Actifs

{{ $activeTentSpacesCount }}

Disponibles à la réservation

{{ $totalTents > 0 ? round($activeTentSpacesCount/$totalTents*100) : 0 }}% actifs

Inactifs

{{ $inactiveTentSpacesCount }}

Non disponibles

{{ $totalTents > 0 ? round($inactiveTentSpacesCount/$totalTents*100) : 0 }}% inactifs
{{-- Actions rapides --}}
@endsection