diff --git a/client/src/components/modals/ValidateDeliveryModal.tsx b/client/src/components/modals/ValidateDeliveryModal.tsx index 03682b9..5024aef 100644 --- a/client/src/components/modals/ValidateDeliveryModal.tsx +++ b/client/src/components/modals/ValidateDeliveryModal.tsx @@ -14,7 +14,6 @@ import { Check, X } from "lucide-react"; const validateDeliverySchema = z.object({ blNumber: z.string().min(1, "Le numéro de bon de livraison est obligatoire"), - blAmount: z.string().optional(), }); type ValidateDeliveryForm = z.infer; @@ -39,20 +38,14 @@ export default function ValidateDeliveryModal({ resolver: zodResolver(validateDeliverySchema), defaultValues: { blNumber: "", - blAmount: "", }, }); const validateDeliveryMutation = useMutation({ mutationFn: async (data: ValidateDeliveryForm) => { - const payload: any = {}; - - // Le blNumber est maintenant obligatoire - payload.blNumber = data.blNumber.trim(); - - if (data.blAmount && data.blAmount.trim() !== '') { - payload.blAmount = parseFloat(data.blAmount); - } + const payload = { + blNumber: data.blNumber.trim() + }; await apiRequest(`/api/deliveries/${delivery.id}/validate`, "POST", payload); }, @@ -147,25 +140,6 @@ export default function ValidateDeliveryModal({ )} /> - {/* Montant BL */} - ( - - Montant BL (€) - Optionnel - - - - - - )} - /> {/* Actions */}