feat(web): extensiones por cliente (campos estándar adicionales y U_*) por módulo, y campo de selección

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-14 15:28:03 -05:00
1 parent 1f212e2b30
commit b3b47c34a3
12 files changed
+326 -10

No files matched your search

@@ -15,6 +15,8 @@ export type HeaderField =
| { type: 'date'; key: string; label: string; required?: boolean; missing?: string }
| { type: 'number'; key: string; label: string; decimals?: number }
| { type: 'textarea'; key: string; label: string }
/** Lista de valores válidos (típico de un campo de usuario con valores válidos en SAP). */
| { type: 'select'; key: string; label: string; options: readonly { value: string | number; label: string }[]; required?: boolean; missing?: string }
/** Abre la lista de almacenes. */
| { type: 'warehouse'; key: string; label: string; required?: boolean; missing?: string }
/** Código del socio de negocio (cliente o proveedor) con su lista; solo editable al crear. */
@@ -164,7 +166,7 @@ export const headerKeysOf = (layout: DocumentLayout): readonly string[] =>
/** Campos obligatorios de la cabecera, con el texto para el aviso ("Indique el cliente."). */
export const requiredHeaderOf = (layout: DocumentLayout): { key: string; label: string }[] =>
allFields(layout).flatMap((f) =>
(f.type === 'date' || f.type === 'warehouse' || f.type === 'partner') && f.required
(f.type === 'date' || f.type === 'warehouse' || f.type === 'partner' || f.type === 'select') && f.required
? [{ key: f.key, label: f.missing ?? f.label }]
: [],
);