@extends('layouts.admin') @section('styles') @endsection @section('content')
@if (session('success'))
{{ session('success') }}
@endif @if (session('error'))
{{ session('error') }}
@endif {{-- ── FILTER ── --}}
@if (request('search') || request('status')) Reset @endif
{{-- ── TOP 3 CARDS ── --}} @if ($topLokasi->count())
@foreach ($topLokasi as $lok) @php $hunian = $lok->slot_parkir_count > 0 ? round(($lok->slot_terisi_count / $lok->slot_parkir_count) * 100) : 0; $barColor = $hunian >= 80 ? 'var(--red)' : ($hunian >= 60 ? 'var(--amber)' : 'var(--green)'); $pendapatan = $pendapatanHariIni[$lok->id] ?? 0; $pendapatanLabel = $pendapatan >= 1000000 ? round($pendapatan / 1000000, 1) . 'jt' : ($pendapatan >= 1000 ? round($pendapatan / 1000) . 'rb' : number_format($pendapatan)); @endphp
{{ $lok->nama }}
{{ Str::limit($lok->alamat, 45) }}
● {{ $lok->aktif ? 'Aktif' : 'Nonaktif' }}
Kapasitas
{{ $lok->total_slot }}
Pendapatan/Hari
Rp {{ $pendapatanLabel }}
Hunian {{ $hunian }}%
@endforeach
@endif {{-- ── TABLE ── --}}
Semua Lokasi Export CSV
@forelse($lokasis as $lok) @php $hunian = $lok->slot_parkir_count > 0 ? round(($lok->slot_terisi_count / $lok->slot_parkir_count) * 100) : 0; $barColor = $hunian >= 80 ? 'var(--red)' : ($hunian >= 60 ? 'var(--amber)' : 'var(--green)'); @endphp {{-- Foto thumbnail column --}} @empty @endforelse
Nama Lokasi Kode Alamat Kapasitas Hunian Harga/Jam Jam Operasi Foto Status Aksi
{{ $lok->nama }} {{ $lok->kode_unik }} {{ $lok->alamat }} {{ number_format($lok->total_slot) }} slot
{{ $hunian }}%
Rp {{ number_format($lok->harga_per_jam, 0, ',', '.') }} {{ substr($lok->jam_buka, 0, 5) }} – {{ substr($lok->jam_tutup, 0, 5) }}
@if ($lok->foto) Foto @else
@endif @if ($lok->foto_360) 360° @else
@endif
● {{ $lok->aktif ? 'Aktif' : 'Nonaktif' }}
Tidak ada lokasi yang ditemukan.
@if ($lokasis->hasPages())
Menampilkan {{ $lokasis->firstItem() }}–{{ $lokasis->lastItem() }} dari {{ $lokasis->total() }} lokasi
@endif
{{-- ═══════════════════════════════════════════════════ LIGHTBOX ════════════════════════════════════════════════════ --}} {{-- ═══════════════════════════════════════════════════ MODAL: TAMBAH LOKASI ════════════════════════════════════════════════════ --}} {{-- ═══════════════════════════════════════════════════ MODAL: EDIT LOKASI ════════════════════════════════════════════════════ --}} {{-- ═══════════════════════════════════════════════════ MODAL: CONFIRM DELETE ════════════════════════════════════════════════════ --}} @endsection @section('scripts') @endsection