From cd3622a97e75b04bd2d136aee8bf3365df5b41da Mon Sep 17 00:00:00 2001 From: marco370 <48531002-marco370@users.noreply.replit.com> Date: Tue, 21 Oct 2025 16:07:32 +0000 Subject: [PATCH] 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 --- .replit | 4 ---- client/src/pages/general-planning.tsx | 23 ----------------------- 2 files changed, 27 deletions(-) diff --git a/.replit b/.replit index 97e4596..90b1d94 100644 --- a/.replit +++ b/.replit @@ -19,10 +19,6 @@ externalPort = 80 localPort = 33035 externalPort = 3001 -[[ports]] -localPort = 36359 -externalPort = 5173 - [[ports]] localPort = 41343 externalPort = 3000 diff --git a/client/src/pages/general-planning.tsx b/client/src/pages/general-planning.tsx index 6a9d585..fba8000 100644 --- a/client/src/pages/general-planning.tsx +++ b/client/src/pages/general-planning.tsx @@ -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;