@eqproject/eqp-dynamic-module 2.6.6 → 2.6.7

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.
@@ -4664,7 +4664,12 @@ class AddFormRecordComponent {
4664
4664
  this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, dynamicModuleParams, (res) => {
4665
4665
  this.form = res;
4666
4666
  this.form.OrgaID = this.orgaID;
4667
- this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
4667
+ if (this.form.ObjectTriggers != null && this.form.ObjectTriggers != "") {
4668
+ this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
4669
+ }
4670
+ else {
4671
+ this.form.Triggers = new Array();
4672
+ }
4668
4673
  this.setDataGetter(this.form);
4669
4674
  GlobalService.debugLog('getFormByID - DynaForm', this.form);
4670
4675
  this.fieldsConfig();
@@ -4716,7 +4721,12 @@ class AddFormRecordComponent {
4716
4721
  GlobalService.debugLog("AFTER getFormByIDandVersion - this.form", res);
4717
4722
  this.form = res;
4718
4723
  this.form.OrgaID = this.orgaID;
4719
- this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
4724
+ if (this.form.ObjectTriggers != null && this.form.ObjectTriggers != "") {
4725
+ this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
4726
+ }
4727
+ else {
4728
+ this.form.Triggers = new Array();
4729
+ }
4720
4730
  this.setDataGetter(this.form);
4721
4731
  this.createRecordProperties();
4722
4732
  this.reorderFormFields();
@@ -5796,7 +5806,12 @@ class ListViewFormRecordComponent {
5796
5806
  this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, dynamicModuleParams, (res) => {
5797
5807
  this.form = res;
5798
5808
  this.form.OrgaID = this.orgaID;
5799
- this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
5809
+ if (this.form.ObjectTriggers != null && this.form.ObjectTriggers != "") {
5810
+ this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
5811
+ }
5812
+ else {
5813
+ this.form.Triggers = new Array();
5814
+ }
5800
5815
  this.loadedform = true;
5801
5816
  this.configureColumns();
5802
5817
  }, (err) => { });
@@ -6065,7 +6080,12 @@ class ListViewFormRecordComponent {
6065
6080
  this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDAndVersionEndPoint, dynamicModuleParams, (res) => {
6066
6081
  this.form = res;
6067
6082
  this.form.OrgaID = this.orgaID;
6068
- this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
6083
+ if (this.form.ObjectTriggers != null && this.form.ObjectTriggers != "") {
6084
+ this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
6085
+ }
6086
+ else {
6087
+ this.form.Triggers = new Array();
6088
+ }
6069
6089
  // preparo i dati del record
6070
6090
  var dynamicRecordParams = [
6071
6091
  {
@@ -6099,7 +6119,12 @@ class ListViewFormRecordComponent {
6099
6119
  this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, dynamicModuleParams, (res) => {
6100
6120
  this.form = res;
6101
6121
  this.form.OrgaID = this.orgaID;
6102
- this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
6122
+ if (this.form.ObjectTriggers != null && this.form.ObjectTriggers != "") {
6123
+ this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
6124
+ }
6125
+ else {
6126
+ this.form.Triggers = new Array();
6127
+ }
6103
6128
  this.selectedRecord = null;
6104
6129
  this.onlyView = false;
6105
6130
  this.loader = true;
@@ -6125,7 +6150,12 @@ class ListViewFormRecordComponent {
6125
6150
  this.utilityHelperService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, dynamicModuleParams, (res) => {
6126
6151
  this.form = res;
6127
6152
  this.form.OrgaID = this.orgaID;
6128
- this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
6153
+ if (this.form.ObjectTriggers != null && this.form.ObjectTriggers != "") {
6154
+ this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
6155
+ }
6156
+ else {
6157
+ this.form.Triggers = new Array();
6158
+ }
6129
6159
  this.popupLoader = true;
6130
6160
  this.openAddDialogRef = this.dialog.open(this.openAddDialog, {
6131
6161
  disableClose: true,
@@ -11281,7 +11311,12 @@ class EqpDynamicModuleConfiguratorComponent {
11281
11311
  if (form != null) {
11282
11312
  this.form = form;
11283
11313
  this.form.OrgaID = this.orgaID;
11284
- this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
11314
+ if (this.form.ObjectTriggers != null && this.form.ObjectTriggers != "") {
11315
+ this.form.Triggers = JSON.parse(this.form.ObjectTriggers);
11316
+ }
11317
+ else {
11318
+ this.form.Triggers = new Array();
11319
+ }
11285
11320
  if (typeof this.form.Fields != "undefined") {
11286
11321
  this.form.Fields.forEach((field) => {
11287
11322
  // Trasformo il Base64String del Datagetter nel Datagetter vero e proprio