@extends('layouts.admin') @section('title', 'Reservas') @section('breadcrumb') @endsection @push('styles') @endpush @section('content') @php $statusColors = \App\Models\Reservation::$statusColors; $statusLabels = \App\Models\Reservation::$statusLabels; function sortLink(string $col, string $currentSort, string $currentDir, array $filters): string { $dir = ($currentSort === $col && $currentDir === 'asc') ? 'desc' : 'asc'; $icon = $currentSort === $col ? ($currentDir === 'asc' ? '↑' : '↓') : '↕'; $url = request()->fullUrlWithQuery(array_merge($filters, ['sort' => $col, 'direction' => $dir])); return "{$icon}"; } @endphp {{-- ─── PAGE HEADER ─── --}}
{{ $reservations->total() }} reserva{{ $reservations->total() !== 1 ? 's' : '' }} encontrada{{ $reservations->total() !== 1 ? 's' : '' }}
| Reserva {!! sortLink('locator', $sort, $direction, $filters) !!} | Hóspede | UH | Categoria | Check-in {!! sortLink('check_in_expected', $sort, $direction, $filters) !!} | Check-out {!! sortLink('check_out_expected', $sort, $direction, $filters) !!} | Pax | Canal | Status {!! sortLink('status', $sort, $direction, $filters) !!} | Total {!! sortLink('total_expected', $sort, $direction, $filters) !!} | Ações |
|---|---|---|---|---|---|---|---|---|---|---|
|
{{ $res->locator }}
{{ $nights }} diária{{ $nights !== 1 ? 's' : '' }} |
{{-- Hóspede --}}
{{ $res->guest?->full_name ?? '—' }}
@if($res->guest?->document_number)
{{ strtoupper($res->guest->document_type ?? '') }}: {{ $res->guest->document_number }} @endif |
{{-- UH --}}
{{ $res->room?->name ?? '—' }} | {{-- Categoria --}}{{ $res->category?->name ?? '—' }} | {{-- Check-in --}}
{{ $res->check_in_expected->format('d/m/Y') }}
@if($res->check_in_realized)
✓ {{ $res->check_in_realized->format('H:i') }} @endif |
{{-- Check-out --}}
{{ $res->check_out_expected->format('d/m/Y') }}
@if($res->check_out_realized)
✓ {{ $res->check_out_realized->format('H:i') }} @endif |
{{-- Pax --}}
👤 {{ $res->adults }} @if($res->children) +{{ $res->children }}🧒 @endif | {{-- Canal --}}
@if($res->salesChannel)
@if($res->salesChannel->icon_svg)
{!! $res->salesChannel->icon_svg !!}
@endif
{{ $res->salesChannel->short_name ?? $res->salesChannel->name }}
@else
Direto
@endif
|
{{-- Status --}}
{{ $res->status_label }} | {{-- Total --}}
R$ {{ number_format($res->total_expected, 2, ',', '.') }}
@if($res->balance > 0)
Saldo: R$ {{ number_format($res->balance, 2, ',', '.') }} @elseif($res->total_paid > 0) Pago @endif |
{{-- Ações --}}
|
Nenhuma reserva encontrada@if(collect($filters)->filter()->isNotEmpty()) Tente ajustar os filtros aplicados ou limpe a busca. @else Nenhuma reserva registrada ainda. Crie uma nova pelo mapa ou pelo botão acima. @endif Ir para o Mapa |
||||||||||