Allow removing guards from scheduled shifts

Remove the unassign guard mutation and its associated toast notifications from the GeneralPlanning page, as this functionality is no longer required.

Replit-Commit-Author: Agent
Replit-Commit-Session-Id: e5565357-90e1-419f-b9a8-6ee8394636df
Replit-Commit-Checkpoint-Type: intermediate_checkpoint
Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e5565357-90e1-419f-b9a8-6ee8394636df/G1ZUdV2
This commit is contained in:
marco370 2025-10-21 16:07:32 +00:00
parent eec694d9d1
commit cd3622a97e
2 changed files with 0 additions and 27 deletions

View File

@ -19,10 +19,6 @@ externalPort = 80
localPort = 33035
externalPort = 3001
[[ports]]
localPort = 36359
externalPort = 5173
[[ports]]
localPort = 41343
externalPort = 3000

View File

@ -207,29 +207,6 @@ export default function GeneralPlanning() {
},
});
// Mutation per deassegnare guardia
const unassignGuardMutation = useMutation({
mutationFn: async (assignmentId: string) => {
return apiRequest("DELETE", `/api/shift-assignments/${assignmentId}`, {});
},
onSuccess: () => {
queryClient.invalidateQueries({ queryKey: ["/api/general-planning"] });
queryClient.invalidateQueries({ queryKey: ["/api/guards/availability"] });
toast({
title: "Guardia deassegnata",
description: "La guardia è stata rimossa dal turno",
});
},
onError: (error: any) => {
toast({
title: "Errore",
description: error.message || "Impossibile deassegnare la guardia",
variant: "destructive",
});
},
});
// Handler per submit form assegnazione guardia
const handleAssignGuard = () => {
if (!selectedCell || !selectedGuardId) return;