@extends('layouts.app') @section('title', 'Indisponibilités') @section('content')

Indisponibilités

Blocages planifiés de l'inventaire

+ Ajouter
@if(session('success'))
{{ session('success') }}
@endif
@forelse($blocks as $block) @php $label = match($block->blockable_type) { 'room' => 'Chambre', 'bed' => 'Lit', 'tent_space' => 'Espace tente', default => $block->blockable_type, }; $blockLabel = $block->block_type === 'maintenance' ? 'Maintenance' : 'Blocage manuel'; $blockColor = $block->block_type === 'maintenance' ? 'background:#FEF3C7;color:#92400E;' : 'background:#FEE2E2;color:#991B1B;'; $name = $block->blockable?->name ?? '—'; $isActive = is_null($block->end_date) || $block->end_date >= now()->toDateString(); @endphp @empty @endforelse
Élément Type Blocage Période Motif Actions
{{ $name }} ({{ $label }}) {{ $blockLabel }} {{ $isActive ? '● Actif' : '○ Terminé' }} {{ \Carbon\Carbon::parse($block->start_date)->format('d/m/Y') }} → {{ $block->end_date ? \Carbon\Carbon::parse($block->end_date)->format('d/m/Y') : '∞' }} {{ $block->reason ?? '—' }} @if($block->note)

{{ Str::limit($block->note, 60) }}

@endif
Modifier
@csrf @method('DELETE')
Aucune indisponibilité enregistrée.
@endsection