Compare commits
No commits in common. "753e01d6122e92c9749e695929d473f4316822e7" and "2b62d8ff4e5af7919910674a4bb99cdf3792128c" have entirely different histories.
753e01d612
...
2b62d8ff4e
@ -273,33 +273,13 @@ export default function PlanningMobile() {
|
||||
|
||||
// Funzione per aprire dialog duplicazione sequenza
|
||||
const handleOpenDuplicateDialog = (route: any) => {
|
||||
try {
|
||||
// Validazione data selezionata
|
||||
const parsedDate = parseISO(selectedDate);
|
||||
if (!isValid(parsedDate)) {
|
||||
toast({
|
||||
title: "Errore data",
|
||||
description: "La data selezionata non è valida",
|
||||
variant: "destructive",
|
||||
});
|
||||
return;
|
||||
}
|
||||
|
||||
const nextDay = format(addDays(parsedDate, 1), "yyyy-MM-dd");
|
||||
setDuplicateDialog({
|
||||
isOpen: true,
|
||||
sourceRoute: route,
|
||||
targetDate: nextDay, // Default = giorno successivo
|
||||
selectedDuplicateGuardId: route.guardId || "", // Pre-compilato con guardia attuale
|
||||
});
|
||||
} catch (error) {
|
||||
toast({
|
||||
title: "Errore",
|
||||
description: "Impossibile aprire il dialog di duplicazione",
|
||||
variant: "destructive",
|
||||
});
|
||||
console.error("Error opening duplicate dialog:", error);
|
||||
}
|
||||
const nextDay = format(addDays(parseISO(selectedDate), 1), "yyyy-MM-dd");
|
||||
setDuplicateDialog({
|
||||
isOpen: true,
|
||||
sourceRoute: route,
|
||||
targetDate: nextDay, // Default = giorno successivo
|
||||
selectedDuplicateGuardId: route.guardId, // Pre-compilato con guardia attuale
|
||||
});
|
||||
};
|
||||
|
||||
// Handler submit dialog duplicazione
|
||||
@ -899,9 +879,7 @@ export default function PlanningMobile() {
|
||||
<div className="flex items-center justify-between">
|
||||
<span className="text-muted-foreground">Data:</span>
|
||||
<span className="font-medium">
|
||||
{duplicateDialog.sourceRoute.scheduledDate && isValid(parseISO(duplicateDialog.sourceRoute.scheduledDate))
|
||||
? format(parseISO(duplicateDialog.sourceRoute.scheduledDate), "dd/MM/yyyy", { locale: it })
|
||||
: "Data non valida"}
|
||||
{format(parseISO(duplicateDialog.sourceRoute.scheduledDate), "dd/MM/yyyy", { locale: it })}
|
||||
</span>
|
||||
</div>
|
||||
<div className="flex items-center justify-between">
|
||||
@ -923,7 +901,7 @@ export default function PlanningMobile() {
|
||||
data-testid="input-target-date"
|
||||
/>
|
||||
<p className="text-xs text-muted-foreground">
|
||||
{duplicateDialog.sourceRoute && duplicateDialog.targetDate && duplicateDialog.sourceRoute.scheduledDate && isValid(parseISO(duplicateDialog.sourceRoute.scheduledDate)) &&
|
||||
{duplicateDialog.sourceRoute && duplicateDialog.targetDate &&
|
||||
format(parseISO(duplicateDialog.sourceRoute.scheduledDate), "yyyy-MM-dd") === duplicateDialog.targetDate
|
||||
? "⚠️ Stessa data: verrà modificata la guardia della sequenza esistente"
|
||||
: "✓ Data diversa: verrà creata una nuova sequenza con tutte le tappe"
|
||||
|
||||
BIN
database-backups/vigilanzaturni_v1.0.44_20251023_143746.sql.gz
Normal file
BIN
database-backups/vigilanzaturni_v1.0.44_20251023_143746.sql.gz
Normal file
Binary file not shown.
Binary file not shown.
16
version.json
16
version.json
@ -1,13 +1,7 @@
|
||||
{
|
||||
"version": "1.0.54",
|
||||
"lastUpdate": "2025-10-24T17:25:43.941Z",
|
||||
"version": "1.0.53",
|
||||
"lastUpdate": "2025-10-24T16:35:13.318Z",
|
||||
"changelog": [
|
||||
{
|
||||
"version": "1.0.54",
|
||||
"date": "2025-10-24",
|
||||
"type": "patch",
|
||||
"description": "Deployment automatico v1.0.54"
|
||||
},
|
||||
{
|
||||
"version": "1.0.53",
|
||||
"date": "2025-10-24",
|
||||
@ -301,6 +295,12 @@
|
||||
"date": "2025-10-17",
|
||||
"type": "patch",
|
||||
"description": "Deployment automatico v1.0.5"
|
||||
},
|
||||
{
|
||||
"version": "1.0.4",
|
||||
"date": "2025-10-17",
|
||||
"type": "patch",
|
||||
"description": "Deployment automatico v1.0.4"
|
||||
}
|
||||
]
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user