From ee5d1aaa245f6b48f1d2eae92ff752ad8c67c97d Mon Sep 17 00:00:00 2001 From: marco370 <48531002-marco370@users.noreply.replit.com> Date: Wed, 29 Oct 2025 09:56:33 +0000 Subject: [PATCH] Show all guards in planning, marking those already busy Update the general planning view to display all guards, regardless of their current availability or contractual compatibility. Guards who are already assigned to a shift are now visually indicated in red but remain selectable for alternative shift assignments. This change involves modifying the guard filtering logic and adding visual cues for busy guards in the selection interface. Replit-Commit-Author: Agent Replit-Commit-Session-Id: e0b5b11c-5b75-4389-8ea9-5f3cd9332f88 Replit-Commit-Checkpoint-Type: full_checkpoint Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/6d543d2c-20b9-4ea6-93fe-70fe9b1d9f80/e0b5b11c-5b75-4389-8ea9-5f3cd9332f88/HjUaTbs --- .replit | 4 ++++ client/src/pages/general-planning.tsx | 27 ++++++++++++++++----------- 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/.replit b/.replit index bc23a6a..f96723c 100644 --- a/.replit +++ b/.replit @@ -19,6 +19,10 @@ externalPort = 80 localPort = 33035 externalPort = 3001 +[[ports]] +localPort = 35979 +externalPort = 6000 + [[ports]] localPort = 40417 externalPort = 8000 diff --git a/client/src/pages/general-planning.tsx b/client/src/pages/general-planning.tsx index 9f69fa0..f4ff2ad 100644 --- a/client/src/pages/general-planning.tsx +++ b/client/src/pages/general-planning.tsx @@ -8,7 +8,7 @@ import { Button } from "@/components/ui/button"; import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@/components/ui/select"; import { Input } from "@/components/ui/input"; import { Label } from "@/components/ui/label"; -import { ChevronLeft, ChevronRight, Calendar, MapPin, Users, AlertTriangle, Car, Edit, CheckCircle2, Plus, Trash2, Clock, Copy } from "lucide-react"; +import { ChevronLeft, ChevronRight, Calendar, MapPin, Users, AlertTriangle, Car, Edit, CheckCircle2, Plus, Trash2, Clock, Copy, Circle } from "lucide-react"; import { Badge } from "@/components/ui/badge"; import { Skeleton } from "@/components/ui/skeleton"; import { @@ -717,19 +717,19 @@ export default function GeneralPlanning() { })()} - {/* Select guardia disponibile */} + {/* Select guardia (tutte, evidenziate in rosso se impegnate) */} {(() => { - // Filtra guardie: mostra solo con ore ordinarie se toggle è off + // Mostra TUTTE le guardie, ma filtra solo per ore ordinarie/straordinario const filteredGuards = availableGuards?.filter(g => - g.isAvailable && (showOvertimeGuards || !g.requiresOvertime) + showOvertimeGuards || !g.requiresOvertime ) || []; - const hasOvertimeGuards = availableGuards?.some(g => g.requiresOvertime && g.isAvailable) || false; + const hasOvertimeGuards = availableGuards?.some(g => g.requiresOvertime) || false; return (