feat: parámetros de solo lectura en los reportes (se ven con su valor por defecto y no se pueden cambiar; el servidor los ignora)

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
GeorgeandClaude Sonnet 5.5 committed 2026-10-20 16:57:33 -05:00
1 parent f71577e792
commit a472731277
6 files changed
+27 -7

No files matched your search

@@ -24,7 +24,8 @@ export function parseHtmlValues(def: HtmlReportDef, raw: Readonly<Record<string,
const missing: string[] = [];
for (const p of def.params) {
const v = raw[p.name];
let text = typeof v === 'string' ? v.trim() : typeof v === 'number' ? String(v) : '';
// un parámetro de solo lectura vale siempre su valor por defecto, escriba lo que escriba el cliente
let text = p.readOnly ? '' : typeof v === 'string' ? v.trim() : typeof v === 'number' ? String(v) : '';
if (text === '') text = p.defaultValue ?? '';
if (text === '') {
if (p.required) missing.push(p.label);