@eqproject/eqp-dynamic-module 2.10.80 → 2.10.83

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.
@@ -8250,6 +8250,9 @@ class AddFormRecordComponent {
8250
8250
  this.showTitle = this.configurations.showTitle;
8251
8251
  this.showSaveButton = this.configurations.showSaveButton;
8252
8252
  this.showBackButton = this.configurations.showBackButton;
8253
+ if (this.actionButtons == null) {
8254
+ this.actionButtons = new Array();
8255
+ }
8253
8256
  this.visibleActionButtons = this.actionButtons.filter(x => x.ShowIn == ActionFlagEnum.ADDRECORD);
8254
8257
  GlobalService.debugLog("AddFormRecord");
8255
8258
  if (this.record == null) {
@@ -8290,6 +8293,17 @@ class AddFormRecordComponent {
8290
8293
  f.updateField();
8291
8294
  } });
8292
8295
  }
8296
+ // Le formule aggiornano record[fieldName] direttamente, senza passare dal FormControl.
8297
+ // Qui risincronizziamo tutti i FormControl dal record, altrimenti la validazione required
8298
+ // non si aggiorna quando un campo viene valorizzato via formula o ActionButton.
8299
+ if (this.form?.Fields) {
8300
+ this.form.Fields.forEach(field => {
8301
+ const ctrl = field.FormFormGroup?.get(field.Name);
8302
+ if (ctrl != null) {
8303
+ ctrl.setValue(this.record[field.Name], { emitEvent: false });
8304
+ }
8305
+ });
8306
+ }
8293
8307
  }
8294
8308
  //#endregion onRecordChange
8295
8309
  //#region previewOrNewResponseRecord
@@ -17856,6 +17870,9 @@ class EqpDynamicModuleConfiguratorComponent {
17856
17870
  // Trasformo il Base64String del Datagetter nel Datagetter vero e proprio
17857
17871
  if (field.DataGetterValueBase64String != null) {
17858
17872
  field.DataGetter = JSON.parse(atob(field.DataGetterValueBase64String));
17873
+ if (field.DataGetter == null) {
17874
+ field.DataGetter = new DataGetter();
17875
+ }
17859
17876
  field.DataGetter.DataGetterType = field.DataGetter.DataGetterType == null ? DataGetterTypeEnum.Manuale : field.DataGetter.DataGetterType;
17860
17877
  }
17861
17878
  else {