diff --git a/client/src/pages/Avoirs.tsx b/client/src/pages/Avoirs.tsx index 11eceac..203d13c 100644 --- a/client/src/pages/Avoirs.tsx +++ b/client/src/pages/Avoirs.tsx @@ -74,6 +74,7 @@ const avoirSchema = z.object({ amount: z.number().optional(), comment: z.string().optional(), commercialProcessed: z.boolean().optional(), + status: z.enum(["En attente de demande", "Demandé", "Reçu"]).optional(), }); type AvoirFormData = z.infer; @@ -219,6 +220,7 @@ export default function Avoirs() { amount: undefined, comment: "", commercialProcessed: false, + status: "En attente de demande", }, }); @@ -232,6 +234,7 @@ export default function Avoirs() { amount: undefined, comment: "", commercialProcessed: false, + status: "En attente de demande", }, }); @@ -257,7 +260,7 @@ export default function Avoirs() { amount: avoir.amount, comment: avoir.comment || "", commercialProcessed: avoir.commercialProcessed, - status: avoir.status, + status: avoir.status as "En attente de demande" | "Demandé" | "Reçu", }); setIsEditDialogOpen(true); }; @@ -552,7 +555,7 @@ export default function Avoirs() {

{searchTerm ? "Aucun avoir ne correspond à votre recherche." : "Commencez par créer votre premier avoir."}

- {canCreate && !searchTerm && ( + {!searchTerm && (