From a01d1b29d01e8770843c040ca51699cafa8003ba Mon Sep 17 00:00:00 2001 From: Soporte ZH Consultores Date: Fri, 5 Jun 2026 00:36:36 +0000 Subject: [PATCH] =?UTF-8?q?fix(tramites):=20incluir=20tambi=C3=A9n=20al=20?= =?UTF-8?q?Abogado=20Solicitante=20en=20dropdown=20de=20Horas?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Refinamiento del commit anterior: el dropdown de "Horas Incurridas" ahora incluye al Abogado Solicitante del trámite + los Involucrados (deduplicado por nombre). Si el trámite no tiene ni solicitante asignado ni involucrados, inputs/botón quedan disabled con mensaje "— Sin asignados —". --- views/tramites.html | 26 ++++++++++++++++++-------- 1 file changed, 18 insertions(+), 8 deletions(-) diff --git a/views/tramites.html b/views/tramites.html index f562ce1..367fd12 100644 --- a/views/tramites.html +++ b/views/tramites.html @@ -529,14 +529,24 @@ function buildDetail(dept,r){

Horas Incurridas

${hrs?``:'

Sin horas registradas.

'}
Total: ${totalH} h
-
- ${(r.involucrados&&r.involucrados.length) - ? `` - : ``} - - - -
+ ${(()=>{ + // Opciones del dropdown de Horas: abogado solicitante + todos los involucrados, + // deduplicados por nombre. Si el trámite no tiene ni solicitante ni involucrados, + // el dropdown queda deshabilitado. + const opts = new Set(); + if (r.abogado) opts.add(r.abogado); + (r.involucrados||[]).forEach(u => { if (u.name||u.email) opts.add(u.name||u.email); }); + const list = [...opts]; + const enabled = list.length > 0; + return `
+ ${enabled + ? `` + : ``} + + + +
`; + })()} `;