@extends('layouts.admin') @section('page_header') @endsection @section('content') @php $statusBadge = [ 'pending' => 'bg-warning-transparent text-warning', 'approved' => 'bg-success-transparent text-success', 'rejected' => 'bg-danger-transparent text-danger', 'cancelled' => 'bg-light-transparent text-dark', 'expired' => 'bg-dark-transparent text-dark', 'completed' => 'bg-primary-transparent text-primary', ]; $perSelected = (int) ($filters['per_page'] ?? request('per_page', 10)); if (!in_array($perSelected, [10,25,50,100], true)) $perSelected = 10; $qValue = $filters['q'] ?? ''; $fuelOptions = ['Boş','4/1','4/2','4/3','Dolu']; $cleanlinessOptions = ['Temiz','Normal','Kirli']; @endphp
{{-- FILTER BAR --}}
@foreach(request()->except(['per_page','q','page']) as $k => $v) @endforeach
Entries
{{-- TABLE --}}
@forelse($reservations as $r) @php $cls = $statusBadge[$r->status] ?? 'bg-secondary-transparent text-secondary'; @endphp @empty @endforelse
User Purpose Vehicle Start End Status Action
{{ $r->user->name ?? '-' }} {{ $r->purpose }} {{ $r->vehicle->plate ?? '-' }} {{ optional($r->start_at)?->timezone(config('app.display_timezone'))->format('d.m.Y H:i') }} {{ $r->end_at ? $r->end_at->timezone(config('app.display_timezone'))->format('d.m.Y H:i') : '—' }} {{ ucfirst($r->status) }}
{{-- VIEW (only completed) --}} @if($r->status === 'completed') @endif {{-- EDIT --}} {{-- DELETE --}}
- No records found -
{{-- PAGINATION --}}
@if($reservations->total() > 0) Showing {{ $reservations->firstItem() }} to {{ $reservations->lastItem() }} of {{ $reservations->total() }} entries @else Showing 0 to 0 of 0 entries @endif
{{-- SweetAlert2 + Lightbox --}} {{-- CREATE MODAL --}} {{-- EDIT MODAL --}} {{-- SHOW (DETAIL) MODAL --}} {{-- Page JS --}} {{-- Search debounce --}} @endsection