feat(catalog) : M6 — écran Ajouter un produit /admin/products/new (ERP-205) #157
Reference in New Issue
Block a user
Delete Branch "feat/erp-205-product-create-form"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ERP-205 (1.9) — Écran Ajouter un produit
/admin/products/newFormulaire principal de création produit (admin-only), référence visuelle = écran « Ajouter un client / prestataire ».
Champs (composants Malio*)
MalioSelectCheckbox(≥ 1) → enumPURCHASE/SALE/OTHER.MalioSelectCheckbox(≥ 1),useSiteOptions().MalioInputText.MalioSelect,useCategoryOptions({ typeCode: 'PRODUIT' }).MalioSelectCheckbox,useStorageTypeOptions()filtré par sites.MalioCheckbox.Règles
falseau payload sinon).useProductForm().POST /api/productsviauseApi().post(..., { toast: false }); 422 mappées inline par champ (useFormErrors) ; 409 doublon de code →setError('code', …)+ toast explicite.Garde-fous
useApi()only, aucun<input>/<select>brut ; 4 espaces ; commentaires FR ; libellés i18n.Vérifications
make nuxt-test: 700 tests OK (dont 15 nouveaux —useProductForm: conditionnels SALE, cascade site→stockage, mapping 422/409 ; page : rendu conditionnel + submit→redirect + gating).View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.