+ {/* Header */}
+
+
Planning Mobile
+
+ Pianificazione ronde, ispezioni e interventi notturni per servizi mobili
+
+
+
+ {/* Filtri */}
+
+
+
+
+ Filtri Pianificazione
+
+ Seleziona sede, data e guardia per iniziare
+
+
+
+
+
+
+
+
+
+ setSelectedDate(e.target.value)}
+ data-testid="input-mobile-date"
+ />
+
+
+
+
+
+
+
+
+
+ {/* Grid: Mappa + Siti */}
+
+ {/* Mappa Siti */}
+
+
+
+
+ Mappa Siti Mobile
+
+
+ {mobileSites?.length || 0} siti con servizi mobili in {locationLabels[selectedLocation]}
+
+
+
+
+
+
+ Integrazione mappa in sviluppo
+
+ (Leaflet/Google Maps)
+
+
+
+
+
+ {/* Lista Siti Mobile */}
+
+
+
+
+ Siti con Servizi Mobili
+
+
+ Ronde notturne, ispezioni, interventi programmati
+
+
+
+ {sitesLoading ? (
+ Caricamento...
+ ) : mobileSites && mobileSites.length > 0 ? (
+ mobileSites.map((site) => (
+
+
+
+
{site.name}
+
+
+ {site.address}, {site.city}
+
+
+
+ {locationLabels[site.location]}
+
+
+
+
+ {site.serviceTypeName}
+
+
+
+
+
+
+
+ ))
+ ) : (
+
+
+
+ Nessun sito con servizi mobili in {locationLabels[selectedLocation]}
+
+
+ )}
+
+
+
+
+ {/* Guardie Disponibili */}
+
+
+
+
+ Guardie Disponibili ({availableGuards?.length || 0})
+
+
+ Guardie con ore disponibili per {format(parseISO(selectedDate), "dd MMMM yyyy", { locale: it })}
+
+
+
+
+ {guardsLoading ? (
+
Caricamento...
+ ) : availableGuards && availableGuards.length > 0 ? (
+ availableGuards.map((guard) => (
+
+
+
+
+ {guard.firstName} {guard.lastName}
+
+
#{guard.badgeNumber}
+
+
+ {locationLabels[guard.location]}
+
+
+
+
+ Ore settimanali:
+ {guard.weeklyHours}h / 45h
+
+
+ Disponibili:
+ {guard.availableHours}h
+
+
+
+ ))
+ ) : (
+
+ Nessuna guardia disponibile per la data selezionata
+
+ )}
+
+
+
+
+ );
+}
diff --git a/server/routes.ts b/server/routes.ts
index 9ae7de5..4967841 100644
--- a/server/routes.ts
+++ b/server/routes.ts
@@ -3175,6 +3175,135 @@ export async function registerRoutes(app: Express): Promise