@extends('layouts.vispa-auth') @section('title', vtr('Dashboard VisPa', 'VisPa Dashboard')) @section('badge', 'Dashboard') @section('heading') @if ($mode === 'admin' && ! empty($isSuperAdmin) && ! $isSuperAdmin) Dashboard {{ $adminMunicipality?->name ?? 'Comune' }} @else {{ vtr('Dashboard VisPa', 'VisPa Dashboard') }} @endif @endsection @section('subtitle') @if ($mode === 'admin') @if (! empty($isSuperAdmin) && $isSuperAdmin) Panoramica amministrativa della piattaforma sosta. @else Panoramica delle soste del Comune e andamento degli ultimi giorni. @endif @elseif ($mode === 'checker') {{ vtr('Area operativa per controllo e verifica soste.', 'Operational area for parking checks and verification.') }} @else {{ vtr('Panoramica delle tue soste e del tuo wallet.', 'Overview of your parking sessions and wallet.') }} @endif @endsection @section('content') @if ($mode === 'admin') @if (! empty($isSuperAdmin) && $isSuperAdmin)
Comuni
{{ $municipalitiesCount }}
Aree sosta
{{ $parkingAreasCount }}
Tariffe
{{ $tariffsCount }}
Soste attive
{{ $activeSessionsCount }}
Soste programmate
{{ $scheduledSessionsCount }}
Importo sosta oggi
€ {{ number_format((float) $todayAmount, 2, ',', '.') }}
@else
Soste attive
{{ $activeSessionsCount }}
Soste programmate
{{ $scheduledSessionsCount }}
Importo sosta oggi
€ {{ number_format((float) $todayAmount, 2, ',', '.') }}
@endif @if (! empty($isSuperAdmin) && $isSuperAdmin)
Pagamenti in attesa
{{ $pendingPaymentsCount ?? 0 }}
Pagamenti falliti/errori
{{ $errorPaymentsCount ?? 0 }}
Return senza S2S
{{ $s2sMissingCount ?? 0 }}
@endif

Ultimi 14 giorni

Andamento giornaliero delle soste e dell’importo sosta di competenza Comune.

@if (Route::has('admin.sessions.index')) Vai al report soste @endif
@foreach ($dailyRows as $row) @php $height = $dailyMaxSessions > 0 ? max(5, round(($row['sessions_count'] / $dailyMaxSessions) * 100)) : 5; @endphp
{{ $row['sessions_count'] }}
{{ $row['label'] }}
€ {{ number_format((float) $row['parking_amount'], 0, ',', '.') }}
@endforeach

Ultime soste

@if ($latestAdminSessions->count())
@if (! empty($isSuperAdmin) && $isSuperAdmin) @endif @foreach ($latestAdminSessions as $session) @php $snapshot = $session->calculation_snapshot ?? []; $municipalityAmount = (float) $session->parking_amount; if ( $session->status === 'stopped' && ! empty($snapshot['stop']) && is_array($snapshot['stop']) ) { $municipalityAmount = (float) ($snapshot['stop']['parking_amount'] ?? $municipalityAmount); } @endphp @if (! empty($isSuperAdmin) && $isSuperAdmin) @endif @endforeach
ID TargaComuneArea Inizio Fine Stato Importo Comune
#{{ $session->id }} {{ $session->plate }}{{ $session->municipality?->name }}{{ $session->parkingArea?->name }} {{ $session->start_at?->format('d/m/Y H:i') }} {{ $session->end_at?->format('d/m/Y H:i') }} {{ $session->status }} € {{ number_format($municipalityAmount, 2, ',', '.') }} Dettaglio
@else

Nessuna sosta recente.

@endif
@elseif ($mode === 'checker')
{{ vtr('Soste attive', 'Active parking sessions') }}
{{ $activeSessionsCount }}
{{ vtr('Soste create oggi', 'Parking sessions created today') }}
{{ $todaySessionsCount }}

{{ vtr('Controlli', 'Checks') }}

{{ vtr( 'La ricerca targa dedicata sarà il prossimo modulo verificatori.', 'The dedicated plate search will be the next checker module.' ) }}

@if (Route::has('admin.sessions.index')) {{ vtr('Vai al report soste', 'Go to parking report') }} @endif
@else @php $sessionStatusLabels = [ 'scheduled' => vtr('Programmata', 'Scheduled'), 'active' => vtr('Attiva', 'Active'), 'expired' => vtr('Scaduta', 'Expired'), 'stopped' => vtr('Interrotta', 'Stopped'), 'cancelled' => vtr('Annullata', 'Cancelled'), 'failed' => vtr('Fallita', 'Failed'), 'pending_payment' => vtr('In pagamento', 'Pending payment'), ]; $passStatusLabels = [ 'pending_payment' => vtr('In pagamento', 'Pending payment'), 'scheduled' => vtr('Programmato', 'Scheduled'), 'active' => vtr('Attivo', 'Active'), 'expired' => vtr('Scaduto', 'Expired'), 'cancelled' => vtr('Annullato', 'Cancelled'), 'revoked' => vtr('Revocato', 'Revoked'), 'failed' => vtr('Fallito', 'Failed'), ]; @endphp
{{ vtr('Validità attive', 'Active parking rights') }}
{{ $activeParkingCount }}
{{ $activeSessionsCount }} {{ vtr('soste', 'sessions') }} · {{ $activePassesCount }} {{ vtr('titoli', 'passes') }}
{{ vtr('Validità programmate', 'Scheduled parking rights') }}
{{ $scheduledParkingCount }}
{{ $scheduledSessionsCount }} {{ vtr('soste', 'sessions') }} · {{ $scheduledPassesCount }} {{ vtr('titoli', 'passes') }}
{{ vtr('Saldo wallet', 'Wallet balance') }}
€ {{ number_format($wallet->total_balance ?? 0, 2, ',', '.') }}

{{ vtr('Ultime soste e titoli', 'Latest parking sessions and passes') }}

{{ vtr( 'Qui trovi insieme le soste orarie e i titoli giornalieri o periodici acquistati più di recente.', 'This area combines your most recent hourly sessions and daily or periodic passes.' ) }}

@if (Route::has('parking.quote')) {{ vtr('Nuova sosta o titolo', 'New session or pass') }} @endif
@if ($latestParkingActivities->count())
@foreach ($latestParkingActivities as $activity) @php $isPass = $activity['type'] === 'pass'; $record = $activity['record']; $status = $isPass ? $record->effectiveStatus() : $record->status; $statusLabel = $isPass ? ($passStatusLabels[$status] ?? $status) : ($sessionStatusLabels[$status] ?? $status); $startsAt = $isPass ? $record->starts_at : $record->start_at; $endsAt = $isPass ? $record->ends_at : $record->end_at; $netAmount = max(0, (float) $record->amount - (float) $record->refunded_amount); @endphp
{{ $isPass ? vtr('Titolo di sosta', 'Parking pass') : vtr('Sosta oraria', 'Hourly session') }}
{{ $record->plate }}
{{ $record->parkingArea?->name }} @if ($record->municipality) · {{ $record->municipality->name }} @endif
@if ($isPass && $record->parkingTariff)
{{ $record->parkingTariff->name }}
@endif
{{ $statusLabel }}
€ {{ number_format($netAmount, 2, ',', '.') }}
{{ $isPass ? vtr('Inizio validità', 'Validity starts') : vtr('Inizio', 'Start') }}
{{ $startsAt?->format('d/m/Y H:i') }}
{{ $isPass ? vtr('Scadenza', 'Expiry') : vtr('Fine', 'End') }}
{{ $endsAt?->format('d/m/Y H:i') }}
@endforeach
{{ vtr('Soste e titoli', 'Sessions and passes') }} {{ vtr('Tutti i titoli', 'All passes') }}
@else

{{ vtr( 'Non hai ancora soste o titoli collegati al tuo account.', 'You do not have any parking sessions or passes linked to your account yet.' ) }}

@if (Route::has('parking.quote')) {{ vtr('Nuova sosta o titolo', 'New session or pass') }} @endif @if (Route::has('user.vehicles.index')) {{ vtr('Le mie targhe', 'My plates') }} @endif
@endif
@php $supportPhone = config('vispa.support.phone', '+39 376 0622272'); $supportWhatsapp = config('vispa.support.whatsapp', '393760622272'); @endphp

{{ vtr('Assistenza telefonica', 'Phone support') }}

{{ vtr( 'Per difficoltà su sosta, wallet o pagamenti puoi contattare l’assistenza.', 'For help with parking, wallet or payments, you can contact support.' ) }}

WhatsApp

{{ vtr( 'Puoi scriverci anche su WhatsApp indicando email, targa e problema riscontrato.', 'You can also write to us on WhatsApp, including your email, plate and issue.' ) }}

@endif @endsection