diff --git a/src/app/(dashboard)/invoice/(index)/components/invoice-save.tsx b/src/app/(dashboard)/invoice/(index)/components/invoice-save.tsx index 39f0f8b..ab3b610 100644 --- a/src/app/(dashboard)/invoice/(index)/components/invoice-save.tsx +++ b/src/app/(dashboard)/invoice/(index)/components/invoice-save.tsx @@ -81,6 +81,9 @@ export function InvoiceSave({ products, invoice }: InvoiceSaveFormProps) { useSeo({ title }); + const productsErrorMessage = + errors.products?.message ?? errors.products?.root?.message; + return ( )} /> -

- Produits -

- {errors.products?.message && ( - {errors.products.message} - )} -
- {productsField.fields.map((field, index) => ( -
- -
- ( - ({ - value: el.name, - label: el.name, - }))} - /> - )} - /> - ( - - )} - /> - ( - - )} - /> + +
+ ( + ({ + value: el.name, + label: el.name, + }))} + /> + )} + /> + ( + + )} + /> + ( + + )} + /> +
-
- ))} + ))} +