diff --git a/.replit b/.replit
index 90b1d94..416b001 100644
--- a/.replit
+++ b/.replit
@@ -15,6 +15,10 @@ run = ["npm", "run", "start"]
localPort = 5000
externalPort = 80
+[[ports]]
+localPort = 32811
+externalPort = 5173
+
[[ports]]
localPort = 33035
externalPort = 3001
diff --git a/client/src/pages/general-planning.tsx b/client/src/pages/general-planning.tsx
index 72a9185..5e4b546 100644
--- a/client/src/pages/general-planning.tsx
+++ b/client/src/pages/general-planning.tsx
@@ -558,103 +558,8 @@ export default function GeneralPlanning() {
{selectedCell && (
- {/* Info turni */}
-
-
-
Turni Pianificati
-
{selectedCell.data.shiftsCount}
-
-
-
Ore Totali
-
{selectedCell.data.totalShiftHours}h
-
-
-
- {/* Veicoli */}
- {selectedCell.data.vehicles.length > 0 && (
-
-
-
- Veicoli Assegnati ({selectedCell.data.vehicles.length})
-
-
- {selectedCell.data.vehicles.map((vehicle, idx) => (
-
-
{vehicle.licensePlate}
-
- {vehicle.brand} {vehicle.model}
-
-
- ))}
-
-
- )}
-
- {/* Guardie mancanti */}
- {selectedCell.data.missingGuards > 0 && (
-
-
-
- Attenzione: Guardie Mancanti
-
-
- Servono ancora {selectedCell.data.missingGuards} {" "}
- {selectedCell.data.missingGuards === 1 ? "guardia" : "guardie"} per coprire completamente il servizio
- (calcolato su {selectedCell.data.totalShiftHours}h con max 9h per guardia e {selectedCell.data.minGuards} {selectedCell.data.minGuards === 1 ? "guardia minima" : "guardie minime"} contemporanee)
-
-
- )}
-
- {/* No turni */}
- {selectedCell.data.shiftsCount === 0 && (
-
-
-
Nessun turno pianificato per questa data
-
- )}
-
- {/* Form assegnazione guardia */}
-
- {/* Mostra guardie già assegnate per questo giorno */}
- {selectedCell.data.guards.length > 0 && (
-
-
- Guardie già assegnate per questa data:
-
-
- {selectedCell.data.guards.map((guard, idx) => (
-
-
-
- {guard.guardName}
- #{guard.badgeNumber}
-
-
-
- {formatTime(guard.plannedStartTime)} - {formatTime(guard.plannedEndTime)}
- ({guard.hours}h)
-
-
-
{
- if (confirm(`Confermi di voler rimuovere ${guard.guardName} da questo turno?`)) {
- deleteAssignmentMutation.mutate(guard.assignmentId);
- }
- }}
- disabled={deleteAssignmentMutation.isPending}
- data-testid={`button-delete-assignment-${guard.guardId}`}
- >
-
-
-
- ))}
-
-
- )}
-
+ {/* Form assegnazione guardia - SEMPRE IN ALTO E VISIBILE */}
+
Assegna Nuova Guardia
@@ -868,6 +773,110 @@ export default function GeneralPlanning() {
+
+ {/* Guardie già assegnate - fuori dal form box per evitare di nascondere il form */}
+ {selectedCell.data.guards.length > 0 && (
+
+
+
+ Guardie Già Assegnate ({selectedCell.data.guards.length})
+
+
+ {selectedCell.data.guards.map((guard, idx) => (
+
+
+
+ {guard.guardName}
+ #{guard.badgeNumber}
+
+
+
+ {formatTime(guard.plannedStartTime)} - {formatTime(guard.plannedEndTime)}
+ ({guard.hours}h)
+
+
+
{
+ if (confirm(`Confermi di voler rimuovere ${guard.guardName} da questo turno?`)) {
+ deleteAssignmentMutation.mutate(guard.assignmentId);
+ }
+ }}
+ disabled={deleteAssignmentMutation.isPending}
+ data-testid={`button-delete-assignment-${guard.guardId}`}
+ >
+
+
+
+ ))}
+
+
+ )}
+
+ {/* Separator */}
+
+
+ {/* Info turni esistenti */}
+
+
Situazione Attuale
+
+
+
+
Turni Pianificati
+
{selectedCell.data.shiftsCount}
+
+
+
Ore Totali
+
{selectedCell.data.totalShiftHours}h
+
+
+
+ {/* Guardie mancanti */}
+ {selectedCell.data.missingGuards > 0 && (
+
+
+
+ Attenzione: Guardie Mancanti
+
+
+ Servono ancora {selectedCell.data.missingGuards} {" "}
+ {selectedCell.data.missingGuards === 1 ? "guardia" : "guardie"} per coprire completamente il servizio
+ (calcolato su {selectedCell.data.totalShiftHours}h con max 9h per guardia e {selectedCell.data.minGuards} {selectedCell.data.minGuards === 1 ? "guardia minima" : "guardie minime"} contemporanee)
+
+
+ )}
+
+ {/* Veicoli */}
+ {selectedCell.data.vehicles.length > 0 && (
+
+
+
+ Veicoli Assegnati ({selectedCell.data.vehicles.length})
+
+
+ {selectedCell.data.vehicles.map((vehicle, idx) => (
+
+
{vehicle.licensePlate}
+
+ {vehicle.brand} {vehicle.model}
+
+
+ ))}
+
+
+ )}
+
+ {/* No turni */}
+ {selectedCell.data.shiftsCount === 0 && (
+
+
+
Nessun turno pianificato per questa data
+
Usa il modulo sopra per assegnare la prima guardia
+
+ )}
+
)}