Compare commits

..

3 Commits

Author SHA1 Message Date
Marco Lanzara
d8a6ec9c49 🚀 Release v1.0.33
- Tipo: patch
- Database backup: database-backups/vigilanzaturni_v1.0.33_20251022_085205.sql.gz
- Data: 2025-10-22 08:52:21
2025-10-22 08:52:21 +00:00
marco370
0fe9363aa9 Improve vehicle assignment logic in general planning
Update the general planning page to correctly handle the "none" vehicle selection, ensuring that the vehicleId is only included in the assignment payload when a valid vehicle is chosen.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/NB1Ej1f
2025-10-22 08:45:18 +00:00
marco370
ce00b4d946 Add image file for visual assets
No code changes, only an image file was added.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df
Replit-Commit-Checkpoint-Type: full_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/NB1Ej1f
2025-10-22 08:39:47 +00:00
5 changed files with 11 additions and 5 deletions

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

View File

@ -98,7 +98,7 @@ export default function GeneralPlanning() {
// Form state per assegnazione guardia // Form state per assegnazione guardia
const [selectedGuardId, setSelectedGuardId] = useState<string>(""); const [selectedGuardId, setSelectedGuardId] = useState<string>("");
const [selectedVehicleId, setSelectedVehicleId] = useState<string>(""); const [selectedVehicleId, setSelectedVehicleId] = useState<string>("none");
const [startTime, setStartTime] = useState<string>("06:00"); const [startTime, setStartTime] = useState<string>("06:00");
const [durationHours, setDurationHours] = useState<number>(8); const [durationHours, setDurationHours] = useState<number>(8);
const [consecutiveDays, setConsecutiveDays] = useState<number>(1); const [consecutiveDays, setConsecutiveDays] = useState<number>(1);
@ -244,7 +244,7 @@ export default function GeneralPlanning() {
startTime, startTime,
durationHours, durationHours,
consecutiveDays, consecutiveDays,
...(selectedVehicleId && { vehicleId: selectedVehicleId }), ...(selectedVehicleId && selectedVehicleId !== "none" && { vehicleId: selectedVehicleId }),
}); });
}; };
@ -738,7 +738,7 @@ export default function GeneralPlanning() {
<SelectValue placeholder="Nessun veicolo" /> <SelectValue placeholder="Nessun veicolo" />
</SelectTrigger> </SelectTrigger>
<SelectContent> <SelectContent>
<SelectItem value="">Nessun veicolo</SelectItem> <SelectItem value="none">Nessun veicolo</SelectItem>
{availableVehicles && availableVehicles.length > 0 ? ( {availableVehicles && availableVehicles.length > 0 ? (
availableVehicles.map((vehicle) => ( availableVehicles.map((vehicle) => (
<SelectItem key={vehicle.id} value={vehicle.id}> <SelectItem key={vehicle.id} value={vehicle.id}>

View File

@ -1,7 +1,13 @@
{ {
"version": "1.0.32", "version": "1.0.33",
"lastUpdate": "2025-10-22T08:34:24.863Z", "lastUpdate": "2025-10-22T08:52:21.600Z",
"changelog": [ "changelog": [
{
"version": "1.0.33",
"date": "2025-10-22",
"type": "patch",
"description": "Deployment automatico v1.0.33"
},
{ {
"version": "1.0.32", "version": "1.0.32",
"date": "2025-10-22", "date": "2025-10-22",