@eqproject/eqp-dynamic-module 2.10.38 → 2.10.40

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.
@@ -5928,7 +5928,12 @@ class DbgetterComponent {
5928
5928
  if (correspondingCol == null) {
5929
5929
  correspondingCol = document.getElementById("col-" + key + "-id-" + row['ID']);
5930
5930
  }
5931
- correspondingCol.classList.add("row-selected");
5931
+ if (this.field.DataGetter.DataGetterColumnForce == null) {
5932
+ correspondingCol.classList.add("row-selected");
5933
+ }
5934
+ else {
5935
+ correspondingCol.parentElement.classList.add("row-selected");
5936
+ }
5932
5937
  }
5933
5938
  else {
5934
5939
  var index = this.selectedElements.findIndex(x => x.ID == row['ID']);
@@ -5937,7 +5942,12 @@ class DbgetterComponent {
5937
5942
  if (correspondingCol == null) {
5938
5943
  correspondingCol = document.getElementById("col-" + key + "-id-" + row['ID']);
5939
5944
  }
5940
- correspondingCol.classList.remove("row-selected");
5945
+ if (this.field.DataGetter.DataGetterColumnForce == null) {
5946
+ correspondingCol.classList.remove("row-selected");
5947
+ }
5948
+ else {
5949
+ correspondingCol.parentElement.classList.remove("row-selected");
5950
+ }
5941
5951
  }
5942
5952
  //this.selectedValue.emit([this.selectedElements]);
5943
5953
  }
@@ -5952,17 +5962,32 @@ class DbgetterComponent {
5952
5962
  this.selectedElements.forEach((selectedElement) => {
5953
5963
  var correspondingCol = document.getElementById("col-" + selectedElement.Field + "-id-" + selectedElement.ID);
5954
5964
  if (correspondingCol != null) {
5955
- correspondingCol.classList.add("row-selected");
5965
+ if (this.field.DataGetter.DataGetterColumnForce == null) {
5966
+ correspondingCol.classList.add("row-selected");
5967
+ }
5968
+ else {
5969
+ correspondingCol.parentElement.classList.add("row-selected");
5970
+ }
5956
5971
  }
5957
5972
  else {
5958
5973
  correspondingCol = document.getElementById("col-" + selectedElement.KeySV + "-id-" + selectedElement.ID);
5959
5974
  if (correspondingCol != null) {
5960
- correspondingCol.classList.add("row-selected");
5975
+ if (this.field.DataGetter.DataGetterColumnForce == null) {
5976
+ correspondingCol.classList.add("row-selected");
5977
+ }
5978
+ else {
5979
+ correspondingCol.parentElement.classList.add("row-selected");
5980
+ }
5961
5981
  }
5962
5982
  else {
5963
5983
  correspondingCol = document.getElementById("col-" + selectedElement.Key + "-id-" + selectedElement.ID);
5964
5984
  if (correspondingCol != null) {
5965
- correspondingCol.classList.add("row-selected");
5985
+ if (this.field.DataGetter.DataGetterColumnForce == null) {
5986
+ correspondingCol.classList.add("row-selected");
5987
+ }
5988
+ else {
5989
+ correspondingCol.parentElement.classList.add("row-selected");
5990
+ }
5966
5991
  }
5967
5992
  }
5968
5993
  }
@@ -6321,15 +6346,38 @@ class DynamicModuleFieldFixComponent {
6321
6346
  //#region onSelectedValue
6322
6347
  onSelectedValue(value) {
6323
6348
  GlobalService.debugLog("onSelectedValue FROM DBGETTER", value);
6349
+ console.log("onSelectedValue FROM DBGETTER", value, this.field, this.field.FieldType == FieldTypeEnum['Elenco generico']);
6324
6350
  if (value[0] == "****CLOSE****") {
6325
6351
  return;
6326
6352
  }
6327
6353
  if (this.field.FieldType == FieldTypeEnum['Campo di testo']) {
6328
- this.record[this.field.Name] = value[0];
6354
+ var valueToPut = null;
6355
+ if (value == null) {
6356
+ valueToPut = null;
6357
+ }
6358
+ else if (Array.isArray(value[0])) {
6359
+ valueToPut = value[0][0];
6360
+ }
6361
+ else {
6362
+ valueToPut = value[0];
6363
+ }
6364
+ console.log("VALUETOPUT campoditesto", value, valueToPut);
6365
+ this.record[this.field.Name] = valueToPut;
6329
6366
  }
6330
6367
  if (this.field.FieldType == FieldTypeEnum['Elenco generico']) {
6331
6368
  GlobalService.debugLog("onSelectedValue FROM DBGETTER ELENCO GENERICO", value);
6332
- this.record[this.field.Name] = value != null ? value[0] : [];
6369
+ var valueToPut = null;
6370
+ if (value == null) {
6371
+ valueToPut = [];
6372
+ }
6373
+ else if (Array.isArray(value[0])) {
6374
+ valueToPut = value[0][0];
6375
+ }
6376
+ else {
6377
+ valueToPut = value[0];
6378
+ }
6379
+ console.log("VALUETOPUT elencogenerico", value, valueToPut);
6380
+ this.record[this.field.Name] = valueToPut;
6333
6381
  this.DBGetterFieldsLoaded = false;
6334
6382
  setTimeout(() => { this.DBGetterFieldsLoaded = true; }, 1000);
6335
6383
  }