diff --git a/client/src/components/NewSaleForm.tsx b/client/src/components/NewSaleForm.tsx index 8dd97a5..980cac8 100644 --- a/client/src/components/NewSaleForm.tsx +++ b/client/src/components/NewSaleForm.tsx @@ -64,7 +64,7 @@ export default function NewSaleForm() { const form = useForm({ defaultValues: { vendeur: '', - products: [{ typeArticle: '', categorie: '', quantite: '', gencode: '' }], + products: [{ typeArticle: '', categorie: '', quantite: '1', gencode: '' }], nom: '', prenom: '', dateNaissance: '', @@ -85,7 +85,7 @@ export default function NewSaleForm() { const addProduct = () => { const currentProducts = form.getValues('products'); - form.setValue('products', [...currentProducts, { typeArticle: '', categorie: '', quantite: '', gencode: '' }]); + form.setValue('products', [...currentProducts, { typeArticle: '', categorie: '', quantite: '1', gencode: '' }]); }; const removeProduct = (index: number) => { @@ -454,7 +454,7 @@ export default function NewSaleForm() { Quantité * - + diff --git a/replit.md b/replit.md index 5f07219..7e40e2f 100644 --- a/replit.md +++ b/replit.md @@ -332,6 +332,11 @@ Preferred communication style: Simple, everyday language. - ✅ **Validation Adjustment**: Photos no longer required for form submission compliance - ✅ **User Experience**: Added explanatory text to reduce confusion about photo requirements +### Form Usability Improvements (January 19, 2025) +- ✅ **Default Quantity**: Set product quantity field to default value of 1 for better user experience +- ✅ **Streamlined Input**: Users no longer need to manually enter quantity for single item purchases +- ✅ **Placeholder Update**: Changed placeholder text to reflect default value + ### Docker Configuration & Cleanup (January 9, 2025) - ✅ Complete Docker setup optimized for external PostgreSQL database - ✅ Docker Compose configuration with RegisFlow application only