@eqproject/eqp-dynamic-module 2.4.28 → 2.4.29

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.
@@ -8557,7 +8557,9 @@ class AddFormFieldComponent {
8557
8557
  }
8558
8558
  ngOnInit() {
8559
8559
  this.configureColumns();
8560
- this.createColumnKeys();
8560
+ if (typeof this.field.DataGetterValue != "undefined" && this.field.DataGetterValue != null) {
8561
+ this.createColumnKeys(this.field.DataGetterValue.Params);
8562
+ }
8561
8563
  if (!this.fieldTypesToExclude.includes(FieldTypeEnum["Form di dettaglio"])) {
8562
8564
  this.fieldTypesToExclude.push(FieldTypeEnum["Form di dettaglio"]);
8563
8565
  }
@@ -9462,7 +9464,7 @@ class AddFormFieldComponent {
9462
9464
  else {
9463
9465
  this.httpClient.get('./assets/mockups/mockedFromQueryEditor_QUERY_WITHOUT_QUESTION.txt', { responseType: 'text' })
9464
9466
  .subscribe(mockedFromQueryEditor => {
9465
- this.treatDataFromQueryEditor(JSON.parse(mockedFromQueryEditor));
9467
+ this.treatDataFromQueryEditor(JSON.parse(mockedFromQueryEditor).Params);
9466
9468
  });
9467
9469
  }
9468
9470
  }
@@ -9482,12 +9484,13 @@ class AddFormFieldComponent {
9482
9484
  }
9483
9485
  treatDataFromQueryEditor(data) {
9484
9486
  this.field.DataGetterValue = data;
9485
- this.createColumnKeys();
9487
+ console.log("data on field.DataGetterValue", data);
9488
+ this.createColumnKeys(data);
9486
9489
  console.log("event out on dynamic module for saving", data);
9487
9490
  }
9488
- createColumnKeys() {
9489
- if (this.field.DataGetterValue != null) {
9490
- this.field.DataGetterValue.Params.selectedFields.forEach((key) => {
9491
+ createColumnKeys(data) {
9492
+ if (data != null && typeof data != "undefined" && typeof data.selectedFields != "undefined") {
9493
+ data.selectedFields.forEach((key) => {
9491
9494
  this.columnKeys.push({ key: key.DatabaseTableName + "_" + key.PropertyName + "__" + key.CurrentTranslate.replace(" ", "_"), value: key.CurrentTranslate });
9492
9495
  });
9493
9496
  }