@extends('layouts.admin') @section('title', 'لوحة المشغّل — دمشق باركينغ') @section('page-title', 'لوحة المشغّل') @push('styles') @endpush @section('content') {{-- ══════════════════════════════════════════════════════════════════════ LOT PICKER — shown when no lot is selected ══════════════════════════════════════════════════════════════════════ --}} @if(!$selectedLot)

اختر موقف السيارات

ابحث عن موقفك وابدأ إدارة السيارات

{{ $parkingLots->count() }} موقف متاح
{{-- Search bar --}}
{{-- ── Cards column ──────────────────────────────────────────────── --}}
@forelse($parkingLots as $lot) @php $pct = $lot['total'] > 0 ? round($lot['occupied'] / $lot['total'] * 100) : 0; $avail = $lot['avail']; if ($avail === 0) { $badgeCls = 'badge-soft-danger'; $badgeTxt = 'ممتلئ'; $barCol = '#ef4444'; } elseif ($avail < $lot['total'] * 0.2) { $badgeCls = 'badge-soft-warning'; $badgeTxt = $avail.' محدود'; $barCol = '#f59e0b'; } else { $badgeCls = 'badge-soft-success'; $badgeTxt = $avail.' متاح'; $barCol = '#10b981'; } @endphp
{{ $lot['name'] }}
{{ $lot['address'] }}
{{ $badgeTxt }}
{{ $lot['total'] }} مكان {{ number_format($lot['price']) }}/ساعة {{ $lot['hours'] }}
@empty
لا توجد مواقف نشطة
@endforelse
{{-- ── Map column ─────────────────────────────────────────────────── --}}
خريطة المواقف اضغط على الموقف للتحديد
{{-- Mobile tab toggle --}}
{{-- ══════════════════════════════════════════════════════════════════════ OPERATOR PANEL — shown after lot is selected ══════════════════════════════════════════════════════════════════════ --}} @else @php $pct = $selectedLot->usage_percentage; $barColor = $pct >= 90 ? '#ef4444' : ($pct >= 60 ? '#f59e0b' : '#10b981'); @endphp {{-- ── Selected lot header ─────────────────────────────────────────── --}}
{{ $selectedLot->name }}
{{ $selectedLot->address }}
{{-- Live stats --}}
{{ $selectedLot->available_spaces }}
متاح
{{ $selectedLot->occupied_spaces }}
مشغول
{{ $selectedLot->total_capacity }}
إجمالي
{{-- Capacity bar (inline) --}}
الإشغال{{ round($pct) }}%
{{-- Change lot --}} تغيير الموقف
{{-- Auto-refresh countdown --}}
{{-- ── Tabs ───────────────────────────────────────────────────────────── --}}
{{-- ───────────────────────────────────────────────────────────────────── TAB 1: Active walk-in cars ──────────────────────────────────────────────────────────────────────── --}}
السيارات داخل الموقف
@if($activeCars->isEmpty())

لا توجد سيارات داخل الموقف

@else
@foreach($activeCars as $car) @php $elapsedMin = $car->start_time->diffInMinutes(now()); $remainMins = now()->diffInMinutes($car->end_time, false); $isOverdue = $remainMins < 0; @endphp @endforeach
رقم اللوحة السائق وقت الدخول المدة المتبقي إجراء
{{ $car->vehicle_plate ?? '—' }} {{ $car->customer_name ?? 'غير محدد' }} @if($car->phone)
{{ $car->phone }}
@endif
{{ $car->start_time->format('H:i') }}
{{ $car->start_time->format('Y/m/d') }}
{{ floor($elapsedMin/60) }}س {{ $elapsedMin%60 }}د @if($isOverdue) تجاوز {{ floor(abs($remainMins)/60) }}س {{ abs($remainMins)%60 }}د @else {{ floor($remainMins/60) }}س {{ $remainMins%60 }}د @endif
@endif
{{-- ───────────────────────────────────────────────────────────────────── TAB 2: Manual check-in form ──────────────────────────────────────────────────────────────────────── --}} {{-- ───────────────────────────────────────────────────────────────────── TAB 3: Pre-reservations ──────────────────────────────────────────────────────────────────────── --}} @endif {{-- end selectedLot --}} {{-- ══════════════════════════════════════════════════════════════════════ RECEIPT & PAYMENT MODAL ══════════════════════════════════════════════════════════════════════ --}} @push('scripts') @endpush @endsection