@eqproject/eqp-dynamic-module 2.3.31 → 2.3.32
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/field-templates/list-value-field-template/list-value-field-template.component.mjs +2 -2
- package/esm2020/lib/components/private/form-records/add-form-record/add-form-record.component.mjs +2 -2
- package/esm2020/lib/components/private/form-records/list-form-record/list-form-record.component.mjs +2 -2
- package/esm2020/lib/components/private/form-records/list-view-form-record/single-record/single-record.component.mjs +2 -2
- package/esm2020/lib/components/private/form-records/view-form-record/view-form-record.component.mjs +2 -2
- package/esm2020/lib/components/private/form-statistics/filter-form-statistic/filter-form-statistic.component.mjs +2 -2
- package/fesm2015/eqproject-eqp-dynamic-module.mjs +53 -54
- package/fesm2015/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/fesm2020/eqproject-eqp-dynamic-module.mjs +53 -54
- package/fesm2020/eqproject-eqp-dynamic-module.mjs.map +1 -1
- package/package.json +1 -1
|
@@ -9,7 +9,6 @@ import * as i2 from '@angular/common/http';
|
|
|
9
9
|
import { Subject, interval } from 'rxjs';
|
|
10
10
|
import * as i6$1 from '@eqproject/eqp-table';
|
|
11
11
|
import { TypeColumn, NumberColumnPipe, CellAlignmentEnum, ExportEqpTable, CustomExportType, EqpTableModule } from '@eqproject/eqp-table';
|
|
12
|
-
import { GlobalService as GlobalService$1 } from 'projects/eqp-dynamic-module/src/lib/services/global.service';
|
|
13
12
|
import * as i2$1 from '@angular/material/button';
|
|
14
13
|
import { MatButtonModule } from '@angular/material/button';
|
|
15
14
|
import * as i5$1 from '@angular/material/card';
|
|
@@ -1155,11 +1154,11 @@ class ListFormRecordComponent {
|
|
|
1155
1154
|
this.defaultListActions = this.configurations.defaultListActions;
|
|
1156
1155
|
this.showTitle = this.configurations.showTitle;
|
|
1157
1156
|
// this.values = this.configurations.values
|
|
1158
|
-
GlobalService
|
|
1157
|
+
GlobalService.debugLog('list-form-record - ngOnInit - configurations', this.configurations);
|
|
1159
1158
|
this.getFormByID();
|
|
1160
1159
|
}
|
|
1161
1160
|
ngOnChanges(changes) {
|
|
1162
|
-
GlobalService
|
|
1161
|
+
GlobalService.debugLog('list-form-record - changes', changes);
|
|
1163
1162
|
// Se viene modificato il valore di "ngModelInput" allora aggiorna l'input
|
|
1164
1163
|
// if (changes['configurations'] != undefined && changes['configurations'].firstChange == false) {
|
|
1165
1164
|
// this.configurations.values = changes['configurations'].currentValue;
|
|
@@ -1167,7 +1166,7 @@ class ListFormRecordComponent {
|
|
|
1167
1166
|
// }
|
|
1168
1167
|
}
|
|
1169
1168
|
async getFormByID(id = this.formID) {
|
|
1170
|
-
GlobalService
|
|
1169
|
+
GlobalService.debugLog('list-form-record - getFormByID', this.form);
|
|
1171
1170
|
if (this.form == null) {
|
|
1172
1171
|
const dynamicModuleParams = new Array();
|
|
1173
1172
|
dynamicModuleParams.push({
|
|
@@ -1326,7 +1325,7 @@ class ListFormRecordComponent {
|
|
|
1326
1325
|
* definite dall'utente all'interno della Form.
|
|
1327
1326
|
*/
|
|
1328
1327
|
createAdditionalActions() {
|
|
1329
|
-
GlobalService
|
|
1328
|
+
GlobalService.debugLog('list-form-record - createAdditionalActions', this.form);
|
|
1330
1329
|
if (this.form.ActionsOnRecord && this.form.ActionsOnRecord.length > 0) {
|
|
1331
1330
|
this.form.ActionsOnRecord.sort((a, b) => a.OrdinalPosition > b.OrdinalPosition
|
|
1332
1331
|
? 1
|
|
@@ -1356,7 +1355,7 @@ class ListFormRecordComponent {
|
|
|
1356
1355
|
* seleziona i primi 6.
|
|
1357
1356
|
*/
|
|
1358
1357
|
createColumnsFromFormFields() {
|
|
1359
|
-
GlobalService
|
|
1358
|
+
GlobalService.debugLog('list-form-record - createColumnsFromFormFields', this.form);
|
|
1360
1359
|
var fieldsForColumns;
|
|
1361
1360
|
if (this.form.Fields.find((f) => f.InListView)) {
|
|
1362
1361
|
fieldsForColumns = this.form.Fields.filter((f) => f.InListView);
|
|
@@ -2085,8 +2084,8 @@ class ListValueFieldTemplateComponent {
|
|
|
2085
2084
|
this.LabelstyleObj = UtilityHelperService.initStyles(this.field.LabelstyleCSS);
|
|
2086
2085
|
}
|
|
2087
2086
|
ngOnInit() {
|
|
2088
|
-
GlobalService
|
|
2089
|
-
GlobalService
|
|
2087
|
+
GlobalService.debugLog("combobox debugMode", this.debugMode);
|
|
2088
|
+
GlobalService.debugLog("combobox filed", this.field);
|
|
2090
2089
|
this.updateField();
|
|
2091
2090
|
this.setArrayData();
|
|
2092
2091
|
if (this.field.IsMultiChoiche && !this.record[this.field.Name]) {
|
|
@@ -2110,9 +2109,9 @@ class ListValueFieldTemplateComponent {
|
|
|
2110
2109
|
*/
|
|
2111
2110
|
updateField() {
|
|
2112
2111
|
// devo controllare se ho la stringa (ValueString) o il dizionario (ValuePairs)
|
|
2113
|
-
GlobalService
|
|
2112
|
+
GlobalService.debugLog("list-value-field updateField", this.field);
|
|
2114
2113
|
if (this.field.Formula) {
|
|
2115
|
-
GlobalService
|
|
2114
|
+
GlobalService.debugLog("list-value-field - updateField - Formula");
|
|
2116
2115
|
this.field.ValuePairs = {};
|
|
2117
2116
|
const temp = UtilityHelperService.EvaluateFieldFormula(this.field.Formula, this.record, null);
|
|
2118
2117
|
// temp dovrebbe essere una stringa del tipo "chiave1! valore 1 ; chiave2 | valore 2 "
|
|
@@ -2129,10 +2128,10 @@ class ListValueFieldTemplateComponent {
|
|
|
2129
2128
|
//this.record[this.field.Name] = UtilityHelperService.EvaluateFieldFormula(this.field.Formula, this.record, null);
|
|
2130
2129
|
}
|
|
2131
2130
|
else if (this.field.ValuePairs != null && this.field.ValuePairs.lenght > 0) {
|
|
2132
|
-
GlobalService
|
|
2131
|
+
GlobalService.debugLog("list-value-field - updateField - ValuePairs");
|
|
2133
2132
|
}
|
|
2134
2133
|
else if (this.field.ValueString != null && this.field.ValueString != "") {
|
|
2135
|
-
GlobalService
|
|
2134
|
+
GlobalService.debugLog("list-value-field - updateField - ValueString");
|
|
2136
2135
|
this.field.ValuePairs = this.stringToValuePairs(this.field.ValueString);
|
|
2137
2136
|
}
|
|
2138
2137
|
if (this.field.VisibleIf) {
|
|
@@ -2753,7 +2752,7 @@ class AddFormRecordComponent {
|
|
|
2753
2752
|
}
|
|
2754
2753
|
// l'inizializzazione termina con il recupero del record o con l'inizializzazione del form vuoto
|
|
2755
2754
|
this.cdr.detectChanges();
|
|
2756
|
-
GlobalService
|
|
2755
|
+
GlobalService.debugLog('oninit - DynaForm', this.form);
|
|
2757
2756
|
}
|
|
2758
2757
|
/**
|
|
2759
2758
|
* Metodo invocato al cambio del valore di ogni proprietà dell'oggetto record.
|
|
@@ -2793,7 +2792,7 @@ class AddFormRecordComponent {
|
|
|
2793
2792
|
* Metodo per salvare i dati inseriti dall'utente una volta conclusa la compilazione della form.
|
|
2794
2793
|
*/
|
|
2795
2794
|
saveOrExitForm(exit) {
|
|
2796
|
-
GlobalService
|
|
2795
|
+
GlobalService.debugLog('add-form-record saveRecordEvent');
|
|
2797
2796
|
if (exit) {
|
|
2798
2797
|
// this.saveRecordEvent.emit(null);
|
|
2799
2798
|
this.onSaveRecord(null);
|
|
@@ -2810,8 +2809,8 @@ class AddFormRecordComponent {
|
|
|
2810
2809
|
* @param event Oggetto di tipo Record da salvare.
|
|
2811
2810
|
*/
|
|
2812
2811
|
onSaveRecord(event) {
|
|
2813
|
-
GlobalService
|
|
2814
|
-
GlobalService
|
|
2812
|
+
GlobalService.debugLog('onSaveRecord - event', event);
|
|
2813
|
+
GlobalService.debugLog('onSaveRecord - form', this.form);
|
|
2815
2814
|
if (event != null &&
|
|
2816
2815
|
this.endPointConfiguration != null &&
|
|
2817
2816
|
this.endPointConfiguration.Records.SaveEndPoint) {
|
|
@@ -2831,7 +2830,7 @@ class AddFormRecordComponent {
|
|
|
2831
2830
|
ParamType: ParamTypeEnum["In Body"],
|
|
2832
2831
|
},
|
|
2833
2832
|
];
|
|
2834
|
-
GlobalService
|
|
2833
|
+
GlobalService.debugLog('onSaveRecord - dynamicModuleParams', dynamicModuleParams);
|
|
2835
2834
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Records.SaveEndPoint, dynamicModuleParams, (res) => {
|
|
2836
2835
|
this.afterSaveRecordEvent.emit(event);
|
|
2837
2836
|
});
|
|
@@ -2849,7 +2848,7 @@ class AddFormRecordComponent {
|
|
|
2849
2848
|
});
|
|
2850
2849
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, dynamicModuleParams, (res) => {
|
|
2851
2850
|
this.form = res;
|
|
2852
|
-
GlobalService
|
|
2851
|
+
GlobalService.debugLog('getFormByID - DynaForm', this.form);
|
|
2853
2852
|
this.fieldsConfig();
|
|
2854
2853
|
}, (err) => { });
|
|
2855
2854
|
}
|
|
@@ -2890,7 +2889,7 @@ class AddFormRecordComponent {
|
|
|
2890
2889
|
ParamType: ParamTypeEnum["Query param"],
|
|
2891
2890
|
},
|
|
2892
2891
|
];
|
|
2893
|
-
GlobalService
|
|
2892
|
+
GlobalService.debugLog("getFormByIDandVersion - this record", this.record);
|
|
2894
2893
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDAndVersionEndPoint, dynamicModuleParams, (res) => {
|
|
2895
2894
|
this.form = res;
|
|
2896
2895
|
this.createRecordProperties();
|
|
@@ -2909,7 +2908,7 @@ class AddFormRecordComponent {
|
|
|
2909
2908
|
if (this.form.FormScalarType != FormScalarTypeEnum.Semplice) {
|
|
2910
2909
|
this.createFieldGroups();
|
|
2911
2910
|
}
|
|
2912
|
-
GlobalService
|
|
2911
|
+
GlobalService.debugLog("fieldsConfig - form", this.form);
|
|
2913
2912
|
this.loader = true;
|
|
2914
2913
|
}
|
|
2915
2914
|
/**
|
|
@@ -2930,7 +2929,7 @@ class AddFormRecordComponent {
|
|
|
2930
2929
|
}
|
|
2931
2930
|
});
|
|
2932
2931
|
}
|
|
2933
|
-
GlobalService
|
|
2932
|
+
GlobalService.debugLog("createRecordProperties - form", this.form);
|
|
2934
2933
|
}
|
|
2935
2934
|
/**
|
|
2936
2935
|
* Metodo per riordinare i campi che compongono la form.
|
|
@@ -2939,14 +2938,14 @@ class AddFormRecordComponent {
|
|
|
2939
2938
|
if (this.form.Fields && this.form.Fields.length > 0) {
|
|
2940
2939
|
this.form.Fields.sort((a, b) => a.OrdinalPosition > b.OrdinalPosition ? 1 : b.OrdinalPosition > a.OrdinalPosition ? -1 : 0);
|
|
2941
2940
|
}
|
|
2942
|
-
GlobalService
|
|
2941
|
+
GlobalService.debugLog("reorderFormFields - form", this.form);
|
|
2943
2942
|
}
|
|
2944
2943
|
/**
|
|
2945
2944
|
* Metodo per creare il FormGroup che rappresenta la form.
|
|
2946
2945
|
*/
|
|
2947
2946
|
createFormGroup() {
|
|
2948
2947
|
this.formForm = this.utilityService.CreateFormFormGroup(this.form.Fields, this.record, this.onlyView);
|
|
2949
|
-
GlobalService
|
|
2948
|
+
GlobalService.debugLog("createFormGroup - form", this.form);
|
|
2950
2949
|
}
|
|
2951
2950
|
/**
|
|
2952
2951
|
* Metodo per creare i gruppi in cui raggruppare i campi della form in base
|
|
@@ -2958,27 +2957,27 @@ class AddFormRecordComponent {
|
|
|
2958
2957
|
.forEach((groupName) => {
|
|
2959
2958
|
this.fieldGroups[groupName] = this.form.Fields.filter((f) => f.FieldGroup == groupName);
|
|
2960
2959
|
});
|
|
2961
|
-
GlobalService
|
|
2960
|
+
GlobalService.debugLog("createFieldGroups - form", this.form);
|
|
2962
2961
|
}
|
|
2963
2962
|
/**
|
|
2964
2963
|
* Metodo per creare il FormGroup che rappresenta la form.
|
|
2965
2964
|
*/
|
|
2966
2965
|
createHTMLreadableValues(record) {
|
|
2967
|
-
GlobalService
|
|
2968
|
-
GlobalService
|
|
2966
|
+
GlobalService.debugLog("createHTMLreadableValues - record", record);
|
|
2967
|
+
GlobalService.debugLog("createHTMLreadableValues - form", this.form);
|
|
2969
2968
|
var formnames = new Array();
|
|
2970
2969
|
this.form.Fields.forEach((field) => { formnames.push(field.Name); });
|
|
2971
|
-
GlobalService
|
|
2970
|
+
GlobalService.debugLog("createHTMLreadableValues - form fields names", formnames);
|
|
2972
2971
|
// alert("continue for values?")
|
|
2973
2972
|
let outputValuesArray = this.getResponseValues(record, this.form);
|
|
2974
|
-
GlobalService
|
|
2973
|
+
GlobalService.debugLog("createHTMLreadableValues - outputValuesArray", outputValuesArray);
|
|
2975
2974
|
// alert("continue for templates?")
|
|
2976
2975
|
let template = this.getResponseTemplate(record, this.form); // oggetto nel quale viene costruito il template o che prende il valore da un template esterno
|
|
2977
|
-
GlobalService
|
|
2976
|
+
GlobalService.debugLog("createHTMLreadableValues - template", template);
|
|
2978
2977
|
// alert("continue for output?")
|
|
2979
2978
|
const regex = /##([\w]+)##/g;
|
|
2980
2979
|
const output = this.replaceTemplatePlaceholdersWithValues(template, outputValuesArray, regex);
|
|
2981
|
-
GlobalService
|
|
2980
|
+
GlobalService.debugLog("createHTMLreadableValues - output", output);
|
|
2982
2981
|
// alert("continue for ending?")
|
|
2983
2982
|
return output; // oggetto che conterrà l'output elaborato
|
|
2984
2983
|
}
|
|
@@ -3118,7 +3117,7 @@ class AddFormRecordComponent {
|
|
|
3118
3117
|
// console.error(e);
|
|
3119
3118
|
// }
|
|
3120
3119
|
// }
|
|
3121
|
-
GlobalService
|
|
3120
|
+
GlobalService.debugLog("outputValuesArray 1", outputValuesArray);
|
|
3122
3121
|
// cancello i valori indefiniti o nulli
|
|
3123
3122
|
for (const chiave in outputValuesArray) {
|
|
3124
3123
|
if (outputValuesArray[chiave] == undefined || outputValuesArray[chiave] == null)
|
|
@@ -3130,7 +3129,7 @@ class AddFormRecordComponent {
|
|
|
3130
3129
|
let template = '<div class="row">';
|
|
3131
3130
|
// PREPARO O PRENDO LA STRUTTURA DA STAMPARE
|
|
3132
3131
|
form.Fields.forEach((baseField) => {
|
|
3133
|
-
GlobalService
|
|
3132
|
+
GlobalService.debugLog('getResposneTemplate - pre - field', baseField);
|
|
3134
3133
|
if (baseField.AnswerStyle == null || baseField.AnswerStyle == undefined) {
|
|
3135
3134
|
baseField.AnswerStyle = new AnswerStyle();
|
|
3136
3135
|
baseField.AnswerStyle.ColSpanSizes = baseField.ColSpanSizes;
|
|
@@ -3146,7 +3145,7 @@ class AddFormRecordComponent {
|
|
|
3146
3145
|
}
|
|
3147
3146
|
if (baseField.AnswerStyle.VisibleIf) {
|
|
3148
3147
|
const visibility = UtilityHelperService.EvaluateFieldFormula(baseField.AnswerStyle.VisibleIf, record, null);
|
|
3149
|
-
GlobalService
|
|
3148
|
+
GlobalService.debugLog("EvaluateFieldFormula - visibility", visibility);
|
|
3150
3149
|
baseField.AnswerStyle.InListView = (visibility == true) ? true : false;
|
|
3151
3150
|
}
|
|
3152
3151
|
if (baseField.AnswerStyle.InListView) {
|
|
@@ -3155,7 +3154,7 @@ class AddFormRecordComponent {
|
|
|
3155
3154
|
' <span class="dynaform-response" style="' + baseField.AnswerStyle.FieldstyleCSS + '"> ##' + baseField.Name + '##</span>' +
|
|
3156
3155
|
'</div> \n ';
|
|
3157
3156
|
}
|
|
3158
|
-
GlobalService
|
|
3157
|
+
GlobalService.debugLog('getResposneTemplate - post - field', baseField);
|
|
3159
3158
|
});
|
|
3160
3159
|
// (attualmente non esiste il concetto di tempate di output)
|
|
3161
3160
|
template += '</div>';
|
|
@@ -3220,7 +3219,7 @@ class ViewFormRecordComponent {
|
|
|
3220
3219
|
this.goBackEvent = new EventEmitter();
|
|
3221
3220
|
}
|
|
3222
3221
|
ngOnInit() {
|
|
3223
|
-
GlobalService
|
|
3222
|
+
GlobalService.debugLog('this.record', this.record);
|
|
3224
3223
|
if (typeof this.record === "string") {
|
|
3225
3224
|
// allora è un ID
|
|
3226
3225
|
this.getRecordByID();
|
|
@@ -3260,7 +3259,7 @@ class ViewFormRecordComponent {
|
|
|
3260
3259
|
this.record.HTMLreadableValues = res.HTMLreadableValues;
|
|
3261
3260
|
// this.viewMode = DynamicModuleViewModeEnum.COMPILE;
|
|
3262
3261
|
// this.loader = true;
|
|
3263
|
-
GlobalService
|
|
3262
|
+
GlobalService.debugLog("record", this.record);
|
|
3264
3263
|
this.createOutput();
|
|
3265
3264
|
// this.getFormByIDandVersion();
|
|
3266
3265
|
});
|
|
@@ -3281,7 +3280,7 @@ class ViewFormRecordComponent {
|
|
|
3281
3280
|
];
|
|
3282
3281
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDAndVersionEndPoint, dynamicModuleParams, (res) => {
|
|
3283
3282
|
this.form = res;
|
|
3284
|
-
GlobalService
|
|
3283
|
+
GlobalService.debugLog("form", this.form);
|
|
3285
3284
|
this.createOutput();
|
|
3286
3285
|
});
|
|
3287
3286
|
}
|
|
@@ -3341,18 +3340,18 @@ class SingleRecordComponent {
|
|
|
3341
3340
|
this.loaded = false;
|
|
3342
3341
|
}
|
|
3343
3342
|
ngOnInit() {
|
|
3344
|
-
GlobalService
|
|
3343
|
+
GlobalService.debugLog("single-record - outCompileConfigurations", this.outCompileConfigurations);
|
|
3345
3344
|
this.loaded = true;
|
|
3346
3345
|
}
|
|
3347
3346
|
/**
|
|
3348
3347
|
* Metodo per salvare i dati inseriti dall'utente una volta conclusa la compilazione della form.
|
|
3349
3348
|
*/
|
|
3350
3349
|
saveOrExitForm(record) {
|
|
3351
|
-
GlobalService
|
|
3350
|
+
GlobalService.debugLog('single-record saveRecordEvent', record);
|
|
3352
3351
|
this.saveRecordEvent.emit(record);
|
|
3353
3352
|
}
|
|
3354
3353
|
onAfterSaveRecord(event) {
|
|
3355
|
-
GlobalService
|
|
3354
|
+
GlobalService.debugLog('single-record afterSaveRecordEvent', event);
|
|
3356
3355
|
this.afterSaveRecordEvent.emit(event);
|
|
3357
3356
|
}
|
|
3358
3357
|
}
|
|
@@ -5282,7 +5281,7 @@ class FilterFormStatisticComponent {
|
|
|
5282
5281
|
ParamType: ParamTypeEnum["Query param"],
|
|
5283
5282
|
},
|
|
5284
5283
|
];
|
|
5285
|
-
GlobalService
|
|
5284
|
+
GlobalService.debugLog("getFormByIDandVersion - this record", this.record);
|
|
5286
5285
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDAndVersionEndPoint, dynamicModuleParams, (res) => {
|
|
5287
5286
|
this.form = res;
|
|
5288
5287
|
this.createRecordProperties();
|
|
@@ -5351,26 +5350,26 @@ class FilterFormStatisticComponent {
|
|
|
5351
5350
|
* Metodo per creare il FormGroup che rappresenta la form.
|
|
5352
5351
|
*/
|
|
5353
5352
|
createHTMLreadableValues(record) {
|
|
5354
|
-
GlobalService
|
|
5355
|
-
GlobalService
|
|
5353
|
+
GlobalService.debugLog("record", record);
|
|
5354
|
+
GlobalService.debugLog("form", this.form);
|
|
5356
5355
|
let outputValuesArray = this.getResponseValues(record, this.form);
|
|
5357
|
-
GlobalService
|
|
5356
|
+
GlobalService.debugLog("outputValuesArray", outputValuesArray);
|
|
5358
5357
|
let template = this.getResponseTemplate(this.form); // oggetto nel quale viene costruito il template o che prende il valore da un template esterno
|
|
5359
|
-
GlobalService
|
|
5358
|
+
GlobalService.debugLog("template", template);
|
|
5360
5359
|
const regex = /##([\w]+)##/g;
|
|
5361
5360
|
return this.replaceTemplatePlaceholdersWithValues(template, outputValuesArray, regex); // oggetto che conterrà l'output elaborato
|
|
5362
5361
|
}
|
|
5363
5362
|
getResponseValues(record, form) {
|
|
5364
5363
|
let outputValuesArray = []; // array con i valori delle risposte
|
|
5365
5364
|
//(<DynRecord>this.record).Values è la lista di oggetti {fieldName: valore}
|
|
5366
|
-
GlobalService
|
|
5365
|
+
GlobalService.debugLog("(record).Values", record);
|
|
5367
5366
|
for (let fieldName in record) {
|
|
5368
5367
|
try {
|
|
5369
5368
|
// fieldName è il nome del campo
|
|
5370
5369
|
// PREPARO VARIABILI VALORI CORRETTI
|
|
5371
5370
|
let foundObject = form.Fields.find((obj) => obj.Name === fieldName);
|
|
5372
|
-
GlobalService
|
|
5373
|
-
GlobalService
|
|
5371
|
+
GlobalService.debugLog("fieldName", fieldName);
|
|
5372
|
+
GlobalService.debugLog("foundObject", foundObject);
|
|
5374
5373
|
// gestire caso fieldtype 8 [elenco generico]
|
|
5375
5374
|
// fare un eval per popolare i valuePairs se è presente una formula
|
|
5376
5375
|
// prendere la label corretta
|
|
@@ -5380,7 +5379,7 @@ class FilterFormStatisticComponent {
|
|
|
5380
5379
|
// aggiungo a valuepairs i valori calcolati
|
|
5381
5380
|
// (<ListValueField>foundObject).ValuePairs = {};
|
|
5382
5381
|
var temp = UtilityHelperService.EvaluateFieldFormula(foundObject.Formula, record, null);
|
|
5383
|
-
GlobalService
|
|
5382
|
+
GlobalService.debugLog("temp", temp);
|
|
5384
5383
|
for (let key2 in temp) {
|
|
5385
5384
|
if (UtilityHelperService.isNumeric(temp[key2])) {
|
|
5386
5385
|
foundObject.ValuePairs[Number(key2)] = temp[key2];
|
|
@@ -5389,12 +5388,12 @@ class FilterFormStatisticComponent {
|
|
|
5389
5388
|
foundObject.ValuePairs[key2] = temp[key2];
|
|
5390
5389
|
}
|
|
5391
5390
|
}
|
|
5392
|
-
GlobalService
|
|
5393
|
-
GlobalService
|
|
5391
|
+
GlobalService.debugLog("(record).Values[fieldName]", record[fieldName]);
|
|
5392
|
+
GlobalService.debugLog("(<ListValueField>foundObject).ValuePairs[record[fieldName]]", foundObject.ValuePairs[record[fieldName]]);
|
|
5394
5393
|
outputValuesArray[fieldName] = foundObject.ValuePairs[record[fieldName]];
|
|
5395
5394
|
}
|
|
5396
5395
|
let inverted = {};
|
|
5397
|
-
GlobalService
|
|
5396
|
+
GlobalService.debugLog("(<ListValueField>foundObject).ValuePairs", foundObject.ValuePairs);
|
|
5398
5397
|
for (let key in foundObject.ValuePairs) {
|
|
5399
5398
|
inverted[foundObject.ValuePairs[key]] = key;
|
|
5400
5399
|
}
|
|
@@ -5402,7 +5401,7 @@ class FilterFormStatisticComponent {
|
|
|
5402
5401
|
outputValuesArray[fieldName] = foundObject.ValuePairs[record[fieldName]];
|
|
5403
5402
|
}
|
|
5404
5403
|
else {
|
|
5405
|
-
GlobalService
|
|
5404
|
+
GlobalService.debugLog("record[fieldName]", record[fieldName]);
|
|
5406
5405
|
outputValuesArray[fieldName] = record[fieldName];
|
|
5407
5406
|
}
|
|
5408
5407
|
////////////////////////////////////////////////////////////////////////////////
|
|
@@ -5411,7 +5410,7 @@ class FilterFormStatisticComponent {
|
|
|
5411
5410
|
console.error(e);
|
|
5412
5411
|
}
|
|
5413
5412
|
}
|
|
5414
|
-
GlobalService
|
|
5413
|
+
GlobalService.debugLog("outputValuesArray 1", outputValuesArray);
|
|
5415
5414
|
// cancello i valori indefiniti o nulli
|
|
5416
5415
|
for (const chiave in outputValuesArray) {
|
|
5417
5416
|
if (outputValuesArray[chiave] == undefined || outputValuesArray[chiave] == null)
|