@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
|
@@ -4326,7 +4326,10 @@ class DynamicModuleFieldFixComponent {
|
|
|
4326
4326
|
this.configList.values = this.record[this.field.Name];
|
|
4327
4327
|
this.configList.showTitle = true;
|
|
4328
4328
|
this.configList.defaultListActions = new DynamicModuleListFormRecordActionsDefault();
|
|
4329
|
-
if (this.field.
|
|
4329
|
+
if (this.field.DataGetterValueBase64String != null && this.field.DataGetterValueBase64String != "") {
|
|
4330
|
+
this.field.DataGetter = JSON.parse(atob(this.field.DataGetterValueBase64String));
|
|
4331
|
+
}
|
|
4332
|
+
if (this.field.DataGetter != null && this.field.DataGetter.DataGetterType == DataGetterTypeEnum['Da modulo dinamico']) {
|
|
4330
4333
|
this.manageDMGetter();
|
|
4331
4334
|
}
|
|
4332
4335
|
}
|
|
@@ -5080,75 +5083,77 @@ class AddFormRecordComponent {
|
|
|
5080
5083
|
// Controlla e spara il trigger se necessario
|
|
5081
5084
|
checkTriggers(record) {
|
|
5082
5085
|
var fireTrigger = true;
|
|
5083
|
-
this.form.Triggers
|
|
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
|
-
|
|
5114
|
-
|
|
5115
|
-
|
|
5116
|
-
|
|
5117
|
-
|
|
5118
|
-
|
|
5119
|
-
|
|
5120
|
-
|
|
5121
|
-
|
|
5122
|
-
|
|
5123
|
-
|
|
5124
|
-
|
|
5125
|
-
|
|
5126
|
-
|
|
5127
|
-
|
|
5128
|
-
|
|
5129
|
-
|
|
5130
|
-
|
|
5131
|
-
|
|
5086
|
+
if (this.form.Triggers != null) {
|
|
5087
|
+
this.form.Triggers.forEach((trigger) => {
|
|
5088
|
+
fireTrigger = true;
|
|
5089
|
+
trigger.conditions.forEach((condition) => {
|
|
5090
|
+
if (!fireTrigger) {
|
|
5091
|
+
return;
|
|
5092
|
+
}
|
|
5093
|
+
var logicOperator = condition.logicoperator;
|
|
5094
|
+
var conditionKey = Object.keys(condition.record)[0];
|
|
5095
|
+
var conditionValue = condition.record[conditionKey];
|
|
5096
|
+
var recordValue = record[conditionKey];
|
|
5097
|
+
if (logicOperator == LogicOperator['='] && conditionValue != recordValue) {
|
|
5098
|
+
fireTrigger = false;
|
|
5099
|
+
return;
|
|
5100
|
+
}
|
|
5101
|
+
if (logicOperator == LogicOperator['!='] && conditionValue == recordValue) {
|
|
5102
|
+
fireTrigger = false;
|
|
5103
|
+
return;
|
|
5104
|
+
}
|
|
5105
|
+
if (logicOperator == LogicOperator['<'] && conditionValue <= recordValue) {
|
|
5106
|
+
fireTrigger = false;
|
|
5107
|
+
return;
|
|
5108
|
+
}
|
|
5109
|
+
if (logicOperator == LogicOperator['<='] && conditionValue < recordValue) {
|
|
5110
|
+
fireTrigger = false;
|
|
5111
|
+
return;
|
|
5112
|
+
}
|
|
5113
|
+
if (logicOperator == LogicOperator['>'] && conditionValue >= recordValue) {
|
|
5114
|
+
fireTrigger = false;
|
|
5115
|
+
return;
|
|
5116
|
+
}
|
|
5117
|
+
if (logicOperator == LogicOperator['>='] && conditionValue > recordValue) {
|
|
5118
|
+
fireTrigger = false;
|
|
5119
|
+
return;
|
|
5120
|
+
}
|
|
5121
|
+
if (logicOperator == LogicOperator['LIKE'] && recordValue.indexOf(conditionValue) == -1) {
|
|
5122
|
+
fireTrigger = false;
|
|
5123
|
+
return;
|
|
5124
|
+
}
|
|
5125
|
+
if (logicOperator == LogicOperator['NOT LIKE'] && recordValue.indexOf(conditionValue) != -1) {
|
|
5126
|
+
fireTrigger = false;
|
|
5127
|
+
return;
|
|
5128
|
+
}
|
|
5129
|
+
if (logicOperator == LogicOperator.Si && !recordValue) {
|
|
5130
|
+
fireTrigger = false;
|
|
5131
|
+
return;
|
|
5132
|
+
}
|
|
5133
|
+
if (logicOperator == LogicOperator.No && recordValue) {
|
|
5134
|
+
fireTrigger = false;
|
|
5135
|
+
return;
|
|
5136
|
+
}
|
|
5137
|
+
});
|
|
5138
|
+
if (fireTrigger) {
|
|
5139
|
+
// Il trigger va sparato. Valuto le funzioni interne
|
|
5140
|
+
var formulas = JSON.parse(JSON.stringify(trigger.formulas));
|
|
5141
|
+
Object.keys(formulas).forEach((key) => {
|
|
5142
|
+
var formula = formulas[key];
|
|
5143
|
+
var temp = UtilityHelperService.EvaluateFieldFormula(formula, record, null);
|
|
5144
|
+
formulas[key] = temp;
|
|
5145
|
+
});
|
|
5146
|
+
// Sparo il trigger all'esterno
|
|
5147
|
+
var triggerToFire = new FireTrigger();
|
|
5148
|
+
triggerToFire.form = this.form; // Il form che ha provocato il trigger
|
|
5149
|
+
triggerToFire.record = record; // Il record che ha provocato il trigger
|
|
5150
|
+
triggerToFire.trigger = trigger; // Il trigger
|
|
5151
|
+
triggerToFire.formulas = formulas; // Le formule inviate in input al modulo dinamico, valutate nel contesto del trigger e del record
|
|
5152
|
+
triggerToFire.userPatient = this.userID; // UserID
|
|
5153
|
+
this.fireTrigger.emit(triggerToFire);
|
|
5132
5154
|
}
|
|
5133
5155
|
});
|
|
5134
|
-
|
|
5135
|
-
// Il trigger va sparato. Valuto le funzioni interne
|
|
5136
|
-
var formulas = JSON.parse(JSON.stringify(trigger.formulas));
|
|
5137
|
-
Object.keys(formulas).forEach((key) => {
|
|
5138
|
-
var formula = formulas[key];
|
|
5139
|
-
var temp = UtilityHelperService.EvaluateFieldFormula(formula, record, null);
|
|
5140
|
-
formulas[key] = temp;
|
|
5141
|
-
});
|
|
5142
|
-
// Sparo il trigger all'esterno
|
|
5143
|
-
var triggerToFire = new FireTrigger();
|
|
5144
|
-
triggerToFire.form = this.form; // Il form che ha provocato il trigger
|
|
5145
|
-
triggerToFire.record = record; // Il record che ha provocato il trigger
|
|
5146
|
-
triggerToFire.trigger = trigger; // Il trigger
|
|
5147
|
-
triggerToFire.formulas = formulas; // Le formule inviate in input al modulo dinamico, valutate nel contesto del trigger e del record
|
|
5148
|
-
triggerToFire.userPatient = this.userID; // UserID
|
|
5149
|
-
this.fireTrigger.emit(triggerToFire);
|
|
5150
|
-
}
|
|
5151
|
-
});
|
|
5156
|
+
}
|
|
5152
5157
|
}
|
|
5153
5158
|
}
|
|
5154
5159
|
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 });
|