From 9513608e508e8bfac3eb291cfe0f138728e31f94 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 9 Nov 2025 21:03:00 +0000 Subject: [PATCH] feat: Improve Supplier wizard with delivery days and optional payment terms MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Supplier Wizard Improvements: - Added 'Días de Entrega' (Lead Time Days) field - CRITICAL field - Field shows as required with asterisk and helper text - Validates that lead time is provided before allowing continue - Made 'Términos de Pago' optional (not critical info) - Added empty option 'Seleccionar...' to payment terms dropdown - Updated API call to include lead_time_days parameter - Payment terms now sends undefined if not selected - Lead time days properly parsed as integer before sending to API These changes ensure critical logistics information is captured while making optional business terms more flexible. --- .../unified-wizard/wizards/SupplierWizard.tsx | 26 ++++++++++++++++--- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/frontend/src/components/domain/unified-wizard/wizards/SupplierWizard.tsx b/frontend/src/components/domain/unified-wizard/wizards/SupplierWizard.tsx index 53ebc24d..5db37fe2 100644 --- a/frontend/src/components/domain/unified-wizard/wizards/SupplierWizard.tsx +++ b/frontend/src/components/domain/unified-wizard/wizards/SupplierWizard.tsx @@ -18,7 +18,8 @@ const SupplierInfoStep: React.FC = ({ data, onDataChange, onNex phone: data.phone || '', email: data.email || '', address: data.address || '', - paymentTerms: data.paymentTerms || 'net30', + paymentTerms: data.paymentTerms || '', + leadTimeDays: data.leadTimeDays || '', notes: data.notes || '', }); @@ -107,13 +108,29 @@ const SupplierInfoStep: React.FC = ({ data, onDataChange, onNex
+ setSupplierData({ ...supplierData, leadTimeDays: e.target.value })} + placeholder="Ej: 7" + min="0" + className="w-full px-3 py-2 border border-[var(--border-secondary)] rounded-lg focus:outline-none focus:ring-2 focus:ring-[var(--color-primary)]" + /> +
+ +
+