@eqproject/eqp-dynamic-module 2.6.10 → 2.6.12
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.
- package/esm2020/lib/components/private/dynamic-module-field-fix/dynamic-module-field.component.mjs +5 -2
- package/esm2020/lib/components/private/form-records/add-form-record/add-form-record.component.mjs +70 -68
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +73 -68
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +73 -68
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -4317,7 +4317,10 @@ class DynamicModuleFieldFixComponent {
|
|
|
4317
4317
|
this.configList.values = this.record[this.field.Name];
|
|
4318
4318
|
this.configList.showTitle = true;
|
|
4319
4319
|
this.configList.defaultListActions = new DynamicModuleListFormRecordActionsDefault();
|
|
4320
|
-
if (this.field.
|
|
4320
|
+
if (this.field.DataGetterValueBase64String != null && this.field.DataGetterValueBase64String != "") {
|
|
4321
|
+
this.field.DataGetter = JSON.parse(atob(this.field.DataGetterValueBase64String));
|
|
4322
|
+
}
|
|
4323
|
+
if (this.field.DataGetter != null && this.field.DataGetter.DataGetterType == DataGetterTypeEnum['Da modulo dinamico']) {
|
|
4321
4324
|
this.manageDMGetter();
|
|
4322
4325
|
}
|
|
4323
4326
|
}
|
|
@@ -5062,75 +5065,77 @@ class AddFormRecordComponent {
|
|
|
5062
5065
|
// Controlla e spara il trigger se necessario
|
|
5063
5066
|
checkTriggers(record) {
|
|
5064
5067
|
var fireTrigger = true;
|
|
5065
|
-
this.form.Triggers
|
|
5066
|
-
|
|
5067
|
-
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
|
|
5073
|
-
|
|
5074
|
-
|
|
5075
|
-
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5080
|
-
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5086
|
-
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5092
|
-
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
|
|
5101
|
-
|
|
5102
|
-
|
|
5103
|
-
|
|
5104
|
-
|
|
5105
|
-
|
|
5106
|
-
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5112
|
-
|
|
5113
|
-
|
|
5068
|
+
if (this.form.Triggers != null) {
|
|
5069
|
+
this.form.Triggers.forEach((trigger) => {
|
|
5070
|
+
fireTrigger = true;
|
|
5071
|
+
trigger.conditions.forEach((condition) => {
|
|
5072
|
+
if (!fireTrigger) {
|
|
5073
|
+
return;
|
|
5074
|
+
}
|
|
5075
|
+
var logicOperator = condition.logicoperator;
|
|
5076
|
+
var conditionKey = Object.keys(condition.record)[0];
|
|
5077
|
+
var conditionValue = condition.record[conditionKey];
|
|
5078
|
+
var recordValue = record[conditionKey];
|
|
5079
|
+
if (logicOperator == LogicOperator['='] && conditionValue != recordValue) {
|
|
5080
|
+
fireTrigger = false;
|
|
5081
|
+
return;
|
|
5082
|
+
}
|
|
5083
|
+
if (logicOperator == LogicOperator['!='] && conditionValue == recordValue) {
|
|
5084
|
+
fireTrigger = false;
|
|
5085
|
+
return;
|
|
5086
|
+
}
|
|
5087
|
+
if (logicOperator == LogicOperator['<'] && conditionValue <= recordValue) {
|
|
5088
|
+
fireTrigger = false;
|
|
5089
|
+
return;
|
|
5090
|
+
}
|
|
5091
|
+
if (logicOperator == LogicOperator['<='] && conditionValue < recordValue) {
|
|
5092
|
+
fireTrigger = false;
|
|
5093
|
+
return;
|
|
5094
|
+
}
|
|
5095
|
+
if (logicOperator == LogicOperator['>'] && conditionValue >= recordValue) {
|
|
5096
|
+
fireTrigger = false;
|
|
5097
|
+
return;
|
|
5098
|
+
}
|
|
5099
|
+
if (logicOperator == LogicOperator['>='] && conditionValue > recordValue) {
|
|
5100
|
+
fireTrigger = false;
|
|
5101
|
+
return;
|
|
5102
|
+
}
|
|
5103
|
+
if (logicOperator == LogicOperator['LIKE'] && recordValue.indexOf(conditionValue) == -1) {
|
|
5104
|
+
fireTrigger = false;
|
|
5105
|
+
return;
|
|
5106
|
+
}
|
|
5107
|
+
if (logicOperator == LogicOperator['NOT LIKE'] && recordValue.indexOf(conditionValue) != -1) {
|
|
5108
|
+
fireTrigger = false;
|
|
5109
|
+
return;
|
|
5110
|
+
}
|
|
5111
|
+
if (logicOperator == LogicOperator.Si && !recordValue) {
|
|
5112
|
+
fireTrigger = false;
|
|
5113
|
+
return;
|
|
5114
|
+
}
|
|
5115
|
+
if (logicOperator == LogicOperator.No && recordValue) {
|
|
5116
|
+
fireTrigger = false;
|
|
5117
|
+
return;
|
|
5118
|
+
}
|
|
5119
|
+
});
|
|
5120
|
+
if (fireTrigger) {
|
|
5121
|
+
// Il trigger va sparato. Valuto le funzioni interne
|
|
5122
|
+
var formulas = JSON.parse(JSON.stringify(trigger.formulas));
|
|
5123
|
+
Object.keys(formulas).forEach((key) => {
|
|
5124
|
+
var formula = formulas[key];
|
|
5125
|
+
var temp = UtilityHelperService.EvaluateFieldFormula(formula, record, null);
|
|
5126
|
+
formulas[key] = temp;
|
|
5127
|
+
});
|
|
5128
|
+
// Sparo il trigger all'esterno
|
|
5129
|
+
var triggerToFire = new FireTrigger();
|
|
5130
|
+
triggerToFire.form = this.form; // Il form che ha provocato il trigger
|
|
5131
|
+
triggerToFire.record = record; // Il record che ha provocato il trigger
|
|
5132
|
+
triggerToFire.trigger = trigger; // Il trigger
|
|
5133
|
+
triggerToFire.formulas = formulas; // Le formule inviate in input al modulo dinamico, valutate nel contesto del trigger e del record
|
|
5134
|
+
triggerToFire.userPatient = this.userID; // UserID
|
|
5135
|
+
this.fireTrigger.emit(triggerToFire);
|
|
5114
5136
|
}
|
|
5115
5137
|
});
|
|
5116
|
-
|
|
5117
|
-
// Il trigger va sparato. Valuto le funzioni interne
|
|
5118
|
-
var formulas = JSON.parse(JSON.stringify(trigger.formulas));
|
|
5119
|
-
Object.keys(formulas).forEach((key) => {
|
|
5120
|
-
var formula = formulas[key];
|
|
5121
|
-
var temp = UtilityHelperService.EvaluateFieldFormula(formula, record, null);
|
|
5122
|
-
formulas[key] = temp;
|
|
5123
|
-
});
|
|
5124
|
-
// Sparo il trigger all'esterno
|
|
5125
|
-
var triggerToFire = new FireTrigger();
|
|
5126
|
-
triggerToFire.form = this.form; // Il form che ha provocato il trigger
|
|
5127
|
-
triggerToFire.record = record; // Il record che ha provocato il trigger
|
|
5128
|
-
triggerToFire.trigger = trigger; // Il trigger
|
|
5129
|
-
triggerToFire.formulas = formulas; // Le formule inviate in input al modulo dinamico, valutate nel contesto del trigger e del record
|
|
5130
|
-
triggerToFire.userPatient = this.userID; // UserID
|
|
5131
|
-
this.fireTrigger.emit(triggerToFire);
|
|
5132
|
-
}
|
|
5133
|
-
});
|
|
5138
|
+
}
|
|
5134
5139
|
}
|
|
5135
5140
|
}
|
|
5136
5141
|
AddFormRecordComponent.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "15.2.10", ngImport: i0, type: AddFormRecordComponent, deps: [{ token: i0.ChangeDetectorRef }, { token: UtilityHelperService }], target: i0.ɵɵFactoryTarget.Component });
|