@eqproject/eqp-dynamic-module 2.9.19 → 2.9.20

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.
@@ -5631,15 +5631,23 @@ class ActionButtonFieldTemplateComponent {
5631
5631
  const formula = formulaObj.value;
5632
5632
  let temp;
5633
5633
  GlobalService.debugLog("checkTriggers - formulas[key] ", formulaObj);
5634
- if (formulaObj.type === TriggerPropertyTypeEnum.DMMODULE) {
5634
+ if (formulaObj.type == TriggerPropertyTypeEnum.DMMODULE) { // assegno id/code del modulo selezionato
5635
5635
  temp = formula;
5636
+ GlobalService.debugLog("checkTriggers - assigned DMMODULE - id/code ", formula);
5636
5637
  }
5637
- else {
5638
+ else if (formulaObj.type == TriggerPropertyTypeEnum.DROPDOWN_LIST) {
5639
+ temp = formulaObj.selectedAllowedValue.key; // nel caso di dropdown gli assegno sia chiave che valore
5640
+ GlobalService.debugLog("checkTriggers - assigned DROPDOWN_LIST- selectedAllowedValue ", formulaObj.selectedAllowedValue);
5641
+ }
5642
+ else { // passo all'eval quando è stringa e assegno il valore calcolato
5638
5643
  temp = UtilityHelperService.EvaluateFieldFormula(formula, this.record, null);
5644
+ GlobalService.debugLog("checkTriggers - assigned - .value formula ", formula);
5645
+ GlobalService.debugLog("checkTriggers - assigned > value formulaObj.type ", formulaObj);
5639
5646
  }
5640
5647
  evaluatedFormulas[formulaObj.key] = temp;
5641
5648
  });
5642
5649
  }
5650
+ GlobalService.debugLog("checkTriggers - assigned- evaluatedFormulas ", evaluatedFormulas);
5643
5651
  triggerToFire.formulas = evaluatedFormulas;
5644
5652
  this.fireTrigger.emit(triggerToFire);
5645
5653
  }