diff --git a/.replit b/.replit index c7abdf5..796ed8b 100644 --- a/.replit +++ b/.replit @@ -39,6 +39,10 @@ externalPort = 5000 localPort = 41343 externalPort = 3001 +[[ports]] +localPort = 42551 +externalPort = 8000 + [[ports]] localPort = 43315 externalPort = 6000 diff --git a/client/src/components/modals/ValidateDeliveryModal.tsx b/client/src/components/modals/ValidateDeliveryModal.tsx index 5024aef..e2906cf 100644 --- a/client/src/components/modals/ValidateDeliveryModal.tsx +++ b/client/src/components/modals/ValidateDeliveryModal.tsx @@ -10,7 +10,7 @@ import { Input } from "@/components/ui/input"; import { useToast } from "@/hooks/use-toast"; import { apiRequest } from "@/lib/queryClient"; import { isUnauthorizedError } from "@/lib/authUtils"; -import { Check, X } from "lucide-react"; +import { Check, X, AlertTriangle } from "lucide-react"; const validateDeliverySchema = z.object({ blNumber: z.string().min(1, "Le numéro de bon de livraison est obligatoire"), @@ -110,6 +110,21 @@ export default function ValidateDeliveryModal({

+ {/* Alerte si le fournisseur nécessite un contrôle */} + {delivery.supplier?.requiresControl && ( +
+ +
+

+ ⚠️ Contrôle à effectuer sur cette livraison +

+

+ Ce fournisseur nécessite un contrôle qualité lors de la réception de la livraison. +

+
+
+ )} +
{/* Informations de la livraison */} diff --git a/client/src/pages/Suppliers.tsx b/client/src/pages/Suppliers.tsx index 3a826fe..5e2b093 100644 --- a/client/src/pages/Suppliers.tsx +++ b/client/src/pages/Suppliers.tsx @@ -38,6 +38,7 @@ export default function Suppliers() { phone: "", hasDlc: false, automaticReconciliation: false, + requiresControl: false, }); const { data: suppliers = [], isLoading } = useQuery({ @@ -191,6 +192,7 @@ export default function Suppliers() { phone: "", hasDlc: false, automaticReconciliation: false, + requiresControl: false, }); }; @@ -227,6 +229,7 @@ export default function Suppliers() { phone: supplier.phone || "", hasDlc: supplier.hasDlc || false, automaticReconciliation: supplier.automaticReconciliation || false, + requiresControl: supplier.requiresControl || false, }); setShowEditModal(true); }; @@ -410,10 +413,16 @@ export default function Suppliers() { Auto-rapprochement )} + {supplier.requiresControl && ( +
+ + Contrôle requis +
+ )} - {!supplier.hasDlc && !supplier.automaticReconciliation && ( + {!supplier.hasDlc && !supplier.automaticReconciliation && !supplier.requiresControl && (
Aucune option activée
@@ -524,6 +533,18 @@ export default function Suppliers() { +
+ handleChange('requiresControl', checked === true)} + data-testid="checkbox-requires-control" + /> + +
+