From 576db2d7f450aad6cb93f96ef3693e5f2d95cd0d Mon Sep 17 00:00:00 2001 From: Michael SCHAL Date: Thu, 2 Apr 2026 11:50:46 +0200 Subject: [PATCH] feat: implement customer order form with automated product lookup and mobile-responsive order page --- client/src/components/CustomerOrderForm.tsx | 2 +- client/src/pages/mobile/CustomerOrdersPage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/client/src/components/CustomerOrderForm.tsx b/client/src/components/CustomerOrderForm.tsx index 9bffb40..338e818 100644 --- a/client/src/components/CustomerOrderForm.tsx +++ b/client/src/components/CustomerOrderForm.tsx @@ -176,7 +176,7 @@ export function CustomerOrderForm({ setArticleNotFound(false); form.setValue("productName", article.libelle1, { shouldValidate: true }); if (article.gtin) form.setValue("gencode", article.gtin, { shouldValidate: true }); - if (article.codein) form.setValue("productReference", article.codein, { shouldValidate: true }); + if (article.ref_fou_principale) form.setValue("productReference", article.ref_fou_principale, { shouldValidate: true }); // Fournisseur : dernière entrée en stock en priorité let codefouToMatch = article.codefou_principal; diff --git a/client/src/pages/mobile/CustomerOrdersPage.tsx b/client/src/pages/mobile/CustomerOrdersPage.tsx index 4ec112f..20ffa6b 100644 --- a/client/src/pages/mobile/CustomerOrdersPage.tsx +++ b/client/src/pages/mobile/CustomerOrdersPage.tsx @@ -178,7 +178,7 @@ export default function MobileCustomerOrdersPage() { setArticleNotFound(false); form.setValue("productName", article.libelle1, { shouldValidate: true }); if (article.gtin) form.setValue("gencode", article.gtin, { shouldValidate: true }); - if (article.codein) form.setValue("productReference", article.codein, { shouldValidate: true }); + if (article.ref_fou_principale) form.setValue("productReference", article.ref_fou_principale, { shouldValidate: true }); let codefouToMatch = article.codefou_principal; try {