@eqproject/eqp-dynamic-module 2.8.19 → 2.8.21

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.
@@ -6367,6 +6367,7 @@ class ListViewFormRecordComponent {
6367
6367
  this.tabellarColumns.push(col);
6368
6368
  }
6369
6369
  });
6370
+ this.maxperiod.setHours(23, 59, 59, 59);
6370
6371
  this.configurations.values.forEach((value) => {
6371
6372
  if (new Date(value.AnswerDate) >= this.minperiod && new Date(value.AnswerDate) <= this.maxperiod) {
6372
6373
  this.tabellarValues.push(value);
@@ -6377,10 +6378,35 @@ class ListViewFormRecordComponent {
6377
6378
  });
6378
6379
  //console.log("TABELLAR VALUES", this.form, this.tabellarColumns, this.tabellarFields, this.tabellarValues);
6379
6380
  this.tabellarConditionLoaded = true;
6380
- var heightValue = this.tabellarColumns.length * 60;
6381
+ if (this.tabellarValues.length == 0) {
6382
+ this.tabellarColumns = [];
6383
+ }
6381
6384
  setTimeout(() => {
6382
- document.querySelectorAll("#tabellar table")[0].setAttribute("height", heightValue + "px");
6383
- }, 100);
6385
+ // Non serve cercare i MAX, li setta CSS in automatico con la regola max-content
6386
+ document.querySelectorAll("#tabellar table tbody tr:first-child td").forEach((el, index) => {
6387
+ document.querySelectorAll("#tabellar table tbody tr:first-child td")[index].style.height = el.clientHeight + "px";
6388
+ if (el.clientHeight > 68) {
6389
+ document.querySelectorAll("#tabellar table thead tr:first-child th")[index].style.height = (el.clientHeight + 1) + "px";
6390
+ document.querySelectorAll("#tabellar table thead tr:first-child th")[index].style.minHeight = (el.clientHeight + 1) + "px";
6391
+ }
6392
+ else {
6393
+ document.querySelectorAll("#tabellar table tbody tr:first-child td")[index].style.height = "68px";
6394
+ document.querySelectorAll("#tabellar table tbody tr:first-child td")[index].style.minHeight = "68px";
6395
+ document.querySelectorAll("#tabellar table thead tr:first-child th")[index].style.height = "68px";
6396
+ document.querySelectorAll("#tabellar table thead tr:first-child th")[index].style.minHeight = "68px";
6397
+ }
6398
+ document.querySelectorAll("#tabellar table tbody tr:nth-child(n+2) td:nth-child(" + (index + 1) + ")").forEach((el2) => {
6399
+ el2.style.height = el.clientHeight + "px";
6400
+ if (el.clientHeight > 68) {
6401
+ el2.style.height = el.clientHeight + "px";
6402
+ }
6403
+ else {
6404
+ el2.style.height = "68px";
6405
+ el2.style.minHeight = "68px";
6406
+ }
6407
+ });
6408
+ });
6409
+ }, 300);
6384
6410
  }, 100);
6385
6411
  }
6386
6412
  configureListviewButtons() {