From b7d93d264f391c1cbc51681a55a01820a5a12785 Mon Sep 17 00:00:00 2001 From: michaelschal <35957947-michaelschal@users.noreply.replit.com> Date: Wed, 9 Jul 2025 23:45:19 +0000 Subject: [PATCH] Require birthplace information when recording a new fireworks sale Marked `lieuNaissance` as a required field in NewSaleForm and added validation. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 91318273-c764-4fd4-be04-bdc12c38af32 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/0715008c-7244-40f4-befc-26c014852236/9d9e1107-c416-4124-a939-a91c612c56a1.jpg --- client/src/components/NewSaleForm.tsx | 4 ++-- client/src/lib/validation.ts | 1 + replit.md | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/client/src/components/NewSaleForm.tsx b/client/src/components/NewSaleForm.tsx index b1de788..a18c330 100644 --- a/client/src/components/NewSaleForm.tsx +++ b/client/src/components/NewSaleForm.tsx @@ -145,7 +145,7 @@ export default function NewSaleForm() { nom: data.nom, prenom: data.prenom, dateNaissance: data.dateNaissance, - lieuNaissance: data.lieuNaissance || undefined, + lieuNaissance: data.lieuNaissance, typeIdentite: data.typeIdentite, numeroIdentite: data.numeroIdentite, autoriteDelivrance: data.autoriteDelivrance, @@ -369,7 +369,7 @@ export default function NewSaleForm() { name="lieuNaissance" render={({ field }) => ( - Lieu de naissance + Lieu de naissance * diff --git a/client/src/lib/validation.ts b/client/src/lib/validation.ts index d8f835b..54df74e 100644 --- a/client/src/lib/validation.ts +++ b/client/src/lib/validation.ts @@ -23,6 +23,7 @@ export function validateRequiredFields(formData: any): string[] { { key: 'nom', label: 'Nom' }, { key: 'prenom', label: 'Prénom' }, { key: 'dateNaissance', label: 'Date de naissance' }, + { key: 'lieuNaissance', label: 'Lieu de naissance' }, { key: 'modePaiement', label: 'Mode de paiement' }, { key: 'typeIdentite', label: 'Type de pièce d\'identité' }, { key: 'numeroIdentite', label: 'Numéro de pièce d\'identité' }, diff --git a/replit.md b/replit.md index 0bd0797..2560d55 100644 --- a/replit.md +++ b/replit.md @@ -176,6 +176,7 @@ Preferred communication style: Simple, everyday language. - ✅ Improved admin interface - "Tous" displayed for admin store access, no redundant store selector for admin profiles - ✅ Cleaned up new sale page interface by removing unnecessary store information display - ✅ Streamlined dashboard layout for better user experience +- ✅ Made "Lieu de naissance" field mandatory in new sale form for regulatory compliance ### Database Backup & Recovery System (January 9, 2025) - ✅ Added complete database backup and restore functionality in administration panel