dmencu 0.3.55 → 0.3.57

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1370,17 +1370,33 @@ function BarraDeNavegacion(props:{forPk:ForPk, soloLectura:boolean, modoDirecto:
1370
1370
  //location.hash=hash.toString();
1371
1371
  }
1372
1372
  var botonesFormulario=[];
1373
+ const ID_BOTON_VOLVER_HDR = 'boton-volver-hdr';
1373
1374
  if(!opciones.modoDirecto){
1374
- botonesFormulario.push({que: 'hdr' , abr:'HdR', label:'hoja de ruta', retroceso:0})
1375
+ botonesFormulario.push({que: 'hdr' , abr:'HdR', id:ID_BOTON_VOLVER_HDR, label:'hoja de ruta', retroceso:0})
1375
1376
  }
1376
1377
  opciones.pilaForPk.forEach((forPk,i)=>
1377
1378
  botonesFormulario.push({que:'volver', abr:forPk.formulario.replace(/^F:/,''), label:forPk.formulario, retroceso:opciones.pilaForPk.length-i})
1378
1379
  )
1379
1380
  botonesFormulario.push({que:'', abr:forPk.formulario.replace(/^F:/,''), label:forPk.formulario, retroceso:0});
1381
+ const ID_BOTON_CERRAR = 'boton-cerrar-encuesta';
1382
+ registrarElemento({id:props.modoDirecto?ID_BOTON_CERRAR:ID_BOTON_VOLVER_HDR, direct:true,
1383
+ fun:(
1384
+ r:Respuestas,
1385
+ _feedbackForm: FormStructureState<IdVariable, Valor, IdFin>,
1386
+ elemento:HTMLDivElement,
1387
+ feedbackAll:{[formulario in PlainForPk]:FormStructureState<IdVariable, Valor, IdFin>},
1388
+ _estructura:Estructura
1389
+ )=>{
1390
+ elemento.setAttribute('resumen-estado',calcularResumenVivienda(forPk, feedbackAll, r).resumenEstado);
1391
+
1392
+ }
1393
+
1394
+ })
1380
1395
  return <>
1381
1396
  <ButtonGroup key="formularios" className="barra-navegacion" solo-lectura={props.soloLectura?'si':'no'} >
1382
1397
  {botonesFormulario.map((b,i)=>
1383
1398
  <Button color={b.que==forPk.formulario?"primary":"inherit"} variant="outlined"
1399
+ id={b.id}
1384
1400
  key={`${i}-${b.que}-${b.retroceso}`}
1385
1401
  disabled={!b.que}
1386
1402
  onClick={()=>{
@@ -1402,6 +1418,7 @@ function BarraDeNavegacion(props:{forPk:ForPk, soloLectura:boolean, modoDirecto:
1402
1418
  <>
1403
1419
  <ButtonGroup key="volver_y_grabar" style={{margin:'0 0 0 30px'}}>
1404
1420
  <Button
1421
+ id={ID_BOTON_CERRAR}
1405
1422
  color="inherit"
1406
1423
  variant="outlined"
1407
1424
  onClick={async ()=>{
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "dmencu",
3
3
  "description": "DM Encu - Encuestas en dispositivo móvil",
4
- "version": "0.3.55",
4
+ "version": "0.3.57",
5
5
  "author": "Codenautas <codenautas@googlegroups.com>",
6
6
  "license": "MIT",
7
7
  "main": "dist/server/server/app-dmencu.js",