@extends('garage.layouts.app') @section('title', 'Slots report') @section('content')

Slots report

Date-wise check & balance (used vs free) with vehicle filter.
Reset
@if(empty($dateSummaries) || count($dateSummaries) === 0)
No slot allocations found for the selected filters.
@else @foreach($dateSummaries as $day)
{{ $day['date'] }}
Total {{ (int) $day['total_slots'] }} Used {{ (int) $day['used_slots'] }} Free {{ (int) $day['free_slots'] }}
@foreach(($day['rows'] ?? []) as $r) @php $src = (string) ($r->source_type ?? ''); $num = (string) ($r->doc_number ?? ''); $st = (string) ($r->doc_status ?? ''); $slotName = (string) ($r->slot_name ?? ('Slot #'.($r->slot_id ?? ''))); $veh = (string) ($r->vehicle_registration ?? 'โ€”'); $cust = (string) ($r->customer_name ?? 'โ€”'); $link = null; if ($src === 'repair_order') { $link = route('garage.repair-orders.show', (int) ($r->source_id ?? 0)); } elseif ($src === 'estimate') { $link = route('garage.estimates.show', (int) ($r->source_id ?? 0)); } @endphp @endforeach
Slot Vehicle Customer Source Number Status
{{ $slotName }} {{ $veh }} {{ $cust }} @if($src === 'repair_order') {{ $glOrder ?? 'Order' }} @elseif($src === 'estimate') EST @else {{ $src ?: 'โ€”' }} @endif @if($link) {{ $num }} @else {{ $num }} @endif {{ str_replace('_',' ', $st) }}
@endforeach @endif
@endsection