@eqproject/eqp-dynamic-module 2.4.28 → 2.4.30

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.
@@ -4008,8 +4008,7 @@ class DbgetterComponent {
4008
4008
  if (ev.Behaviours.indexOf("send-out") != -1) {
4009
4009
  this.out.emit(ev);
4010
4010
  }
4011
- this.data = JSON.parse(ev.Params);
4012
- this.data = JSON.parse(this.data.result);
4011
+ this.data = JSON.parse(ev.Params.result);
4013
4012
  this.processResult(this.data);
4014
4013
  }
4015
4014
  processResult(data) {
@@ -8530,7 +8529,9 @@ class AddFormFieldComponent {
8530
8529
  }
8531
8530
  ngOnInit() {
8532
8531
  this.configureColumns();
8533
- this.createColumnKeys();
8532
+ if (typeof this.field.DataGetterValue != "undefined" && this.field.DataGetterValue != null) {
8533
+ this.createColumnKeys(this.field.DataGetterValue.Params);
8534
+ }
8534
8535
  if (!this.fieldTypesToExclude.includes(FieldTypeEnum["Form di dettaglio"])) {
8535
8536
  this.fieldTypesToExclude.push(FieldTypeEnum["Form di dettaglio"]);
8536
8537
  }
@@ -9435,7 +9436,7 @@ class AddFormFieldComponent {
9435
9436
  else {
9436
9437
  this.httpClient.get('./assets/mockups/mockedFromQueryEditor_QUERY_WITHOUT_QUESTION.txt', { responseType: 'text' })
9437
9438
  .subscribe(mockedFromQueryEditor => {
9438
- this.treatDataFromQueryEditor(JSON.parse(mockedFromQueryEditor));
9439
+ this.treatDataFromQueryEditor(JSON.parse(mockedFromQueryEditor).Params);
9439
9440
  });
9440
9441
  }
9441
9442
  }
@@ -9455,12 +9456,13 @@ class AddFormFieldComponent {
9455
9456
  }
9456
9457
  treatDataFromQueryEditor(data) {
9457
9458
  this.field.DataGetterValue = data;
9458
- this.createColumnKeys();
9459
+ console.log("data on field.DataGetterValue", data);
9460
+ this.createColumnKeys(data);
9459
9461
  console.log("event out on dynamic module for saving", data);
9460
9462
  }
9461
- createColumnKeys() {
9462
- if (this.field.DataGetterValue != null) {
9463
- this.field.DataGetterValue.Params.selectedFields.forEach((key) => {
9463
+ createColumnKeys(data) {
9464
+ if (data != null && typeof data != "undefined" && typeof data.selectedFields != "undefined") {
9465
+ data.selectedFields.forEach((key) => {
9464
9466
  this.columnKeys.push({ key: key.DatabaseTableName + "_" + key.PropertyName + "__" + key.CurrentTranslate.replace(" ", "_"), value: key.CurrentTranslate });
9465
9467
  });
9466
9468
  }