@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
|
@@ -10,7 +10,6 @@ import * as i2 from '@angular/common/http';
|
|
|
10
10
|
import { Subject, interval } from 'rxjs';
|
|
11
11
|
import * as i6$1 from '@eqproject/eqp-table';
|
|
12
12
|
import { TypeColumn, NumberColumnPipe, CellAlignmentEnum, ExportEqpTable, CustomExportType, EqpTableModule } from '@eqproject/eqp-table';
|
|
13
|
-
import { GlobalService as GlobalService$1 } from 'projects/eqp-dynamic-module/src/lib/services/global.service';
|
|
14
13
|
import * as i2$1 from '@angular/material/button';
|
|
15
14
|
import { MatButtonModule } from '@angular/material/button';
|
|
16
15
|
import * as i5$1 from '@angular/material/card';
|
|
@@ -1156,11 +1155,11 @@ class ListFormRecordComponent {
|
|
|
1156
1155
|
this.defaultListActions = this.configurations.defaultListActions;
|
|
1157
1156
|
this.showTitle = this.configurations.showTitle;
|
|
1158
1157
|
// this.values = this.configurations.values
|
|
1159
|
-
GlobalService
|
|
1158
|
+
GlobalService.debugLog('list-form-record - ngOnInit - configurations', this.configurations);
|
|
1160
1159
|
this.getFormByID();
|
|
1161
1160
|
}
|
|
1162
1161
|
ngOnChanges(changes) {
|
|
1163
|
-
GlobalService
|
|
1162
|
+
GlobalService.debugLog('list-form-record - changes', changes);
|
|
1164
1163
|
// Se viene modificato il valore di "ngModelInput" allora aggiorna l'input
|
|
1165
1164
|
// if (changes['configurations'] != undefined && changes['configurations'].firstChange == false) {
|
|
1166
1165
|
// this.configurations.values = changes['configurations'].currentValue;
|
|
@@ -1169,7 +1168,7 @@ class ListFormRecordComponent {
|
|
|
1169
1168
|
}
|
|
1170
1169
|
getFormByID(id = this.formID) {
|
|
1171
1170
|
return __awaiter(this, void 0, void 0, function* () {
|
|
1172
|
-
GlobalService
|
|
1171
|
+
GlobalService.debugLog('list-form-record - getFormByID', this.form);
|
|
1173
1172
|
if (this.form == null) {
|
|
1174
1173
|
const dynamicModuleParams = new Array();
|
|
1175
1174
|
dynamicModuleParams.push({
|
|
@@ -1331,7 +1330,7 @@ class ListFormRecordComponent {
|
|
|
1331
1330
|
* definite dall'utente all'interno della Form.
|
|
1332
1331
|
*/
|
|
1333
1332
|
createAdditionalActions() {
|
|
1334
|
-
GlobalService
|
|
1333
|
+
GlobalService.debugLog('list-form-record - createAdditionalActions', this.form);
|
|
1335
1334
|
if (this.form.ActionsOnRecord && this.form.ActionsOnRecord.length > 0) {
|
|
1336
1335
|
this.form.ActionsOnRecord.sort((a, b) => a.OrdinalPosition > b.OrdinalPosition
|
|
1337
1336
|
? 1
|
|
@@ -1361,7 +1360,7 @@ class ListFormRecordComponent {
|
|
|
1361
1360
|
* seleziona i primi 6.
|
|
1362
1361
|
*/
|
|
1363
1362
|
createColumnsFromFormFields() {
|
|
1364
|
-
GlobalService
|
|
1363
|
+
GlobalService.debugLog('list-form-record - createColumnsFromFormFields', this.form);
|
|
1365
1364
|
var fieldsForColumns;
|
|
1366
1365
|
if (this.form.Fields.find((f) => f.InListView)) {
|
|
1367
1366
|
fieldsForColumns = this.form.Fields.filter((f) => f.InListView);
|
|
@@ -2090,8 +2089,8 @@ class ListValueFieldTemplateComponent {
|
|
|
2090
2089
|
this.LabelstyleObj = UtilityHelperService.initStyles(this.field.LabelstyleCSS);
|
|
2091
2090
|
}
|
|
2092
2091
|
ngOnInit() {
|
|
2093
|
-
GlobalService
|
|
2094
|
-
GlobalService
|
|
2092
|
+
GlobalService.debugLog("combobox debugMode", this.debugMode);
|
|
2093
|
+
GlobalService.debugLog("combobox filed", this.field);
|
|
2095
2094
|
this.updateField();
|
|
2096
2095
|
this.setArrayData();
|
|
2097
2096
|
if (this.field.IsMultiChoiche && !this.record[this.field.Name]) {
|
|
@@ -2115,9 +2114,9 @@ class ListValueFieldTemplateComponent {
|
|
|
2115
2114
|
*/
|
|
2116
2115
|
updateField() {
|
|
2117
2116
|
// devo controllare se ho la stringa (ValueString) o il dizionario (ValuePairs)
|
|
2118
|
-
GlobalService
|
|
2117
|
+
GlobalService.debugLog("list-value-field updateField", this.field);
|
|
2119
2118
|
if (this.field.Formula) {
|
|
2120
|
-
GlobalService
|
|
2119
|
+
GlobalService.debugLog("list-value-field - updateField - Formula");
|
|
2121
2120
|
this.field.ValuePairs = {};
|
|
2122
2121
|
const temp = UtilityHelperService.EvaluateFieldFormula(this.field.Formula, this.record, null);
|
|
2123
2122
|
// temp dovrebbe essere una stringa del tipo "chiave1! valore 1 ; chiave2 | valore 2 "
|
|
@@ -2134,10 +2133,10 @@ class ListValueFieldTemplateComponent {
|
|
|
2134
2133
|
//this.record[this.field.Name] = UtilityHelperService.EvaluateFieldFormula(this.field.Formula, this.record, null);
|
|
2135
2134
|
}
|
|
2136
2135
|
else if (this.field.ValuePairs != null && this.field.ValuePairs.lenght > 0) {
|
|
2137
|
-
GlobalService
|
|
2136
|
+
GlobalService.debugLog("list-value-field - updateField - ValuePairs");
|
|
2138
2137
|
}
|
|
2139
2138
|
else if (this.field.ValueString != null && this.field.ValueString != "") {
|
|
2140
|
-
GlobalService
|
|
2139
|
+
GlobalService.debugLog("list-value-field - updateField - ValueString");
|
|
2141
2140
|
this.field.ValuePairs = this.stringToValuePairs(this.field.ValueString);
|
|
2142
2141
|
}
|
|
2143
2142
|
if (this.field.VisibleIf) {
|
|
@@ -2760,7 +2759,7 @@ class AddFormRecordComponent {
|
|
|
2760
2759
|
}
|
|
2761
2760
|
// l'inizializzazione termina con il recupero del record o con l'inizializzazione del form vuoto
|
|
2762
2761
|
this.cdr.detectChanges();
|
|
2763
|
-
GlobalService
|
|
2762
|
+
GlobalService.debugLog('oninit - DynaForm', this.form);
|
|
2764
2763
|
}
|
|
2765
2764
|
/**
|
|
2766
2765
|
* Metodo invocato al cambio del valore di ogni proprietà dell'oggetto record.
|
|
@@ -2800,7 +2799,7 @@ class AddFormRecordComponent {
|
|
|
2800
2799
|
* Metodo per salvare i dati inseriti dall'utente una volta conclusa la compilazione della form.
|
|
2801
2800
|
*/
|
|
2802
2801
|
saveOrExitForm(exit) {
|
|
2803
|
-
GlobalService
|
|
2802
|
+
GlobalService.debugLog('add-form-record saveRecordEvent');
|
|
2804
2803
|
if (exit) {
|
|
2805
2804
|
// this.saveRecordEvent.emit(null);
|
|
2806
2805
|
this.onSaveRecord(null);
|
|
@@ -2818,8 +2817,8 @@ class AddFormRecordComponent {
|
|
|
2818
2817
|
*/
|
|
2819
2818
|
onSaveRecord(event) {
|
|
2820
2819
|
var _a;
|
|
2821
|
-
GlobalService
|
|
2822
|
-
GlobalService
|
|
2820
|
+
GlobalService.debugLog('onSaveRecord - event', event);
|
|
2821
|
+
GlobalService.debugLog('onSaveRecord - form', this.form);
|
|
2823
2822
|
if (event != null &&
|
|
2824
2823
|
this.endPointConfiguration != null &&
|
|
2825
2824
|
this.endPointConfiguration.Records.SaveEndPoint) {
|
|
@@ -2839,7 +2838,7 @@ class AddFormRecordComponent {
|
|
|
2839
2838
|
ParamType: ParamTypeEnum["In Body"],
|
|
2840
2839
|
},
|
|
2841
2840
|
];
|
|
2842
|
-
GlobalService
|
|
2841
|
+
GlobalService.debugLog('onSaveRecord - dynamicModuleParams', dynamicModuleParams);
|
|
2843
2842
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Records.SaveEndPoint, dynamicModuleParams, (res) => {
|
|
2844
2843
|
this.afterSaveRecordEvent.emit(event);
|
|
2845
2844
|
});
|
|
@@ -2857,7 +2856,7 @@ class AddFormRecordComponent {
|
|
|
2857
2856
|
});
|
|
2858
2857
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDEndPoint, dynamicModuleParams, (res) => {
|
|
2859
2858
|
this.form = res;
|
|
2860
|
-
GlobalService
|
|
2859
|
+
GlobalService.debugLog('getFormByID - DynaForm', this.form);
|
|
2861
2860
|
this.fieldsConfig();
|
|
2862
2861
|
}, (err) => { });
|
|
2863
2862
|
}
|
|
@@ -2898,7 +2897,7 @@ class AddFormRecordComponent {
|
|
|
2898
2897
|
ParamType: ParamTypeEnum["Query param"],
|
|
2899
2898
|
},
|
|
2900
2899
|
];
|
|
2901
|
-
GlobalService
|
|
2900
|
+
GlobalService.debugLog("getFormByIDandVersion - this record", this.record);
|
|
2902
2901
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDAndVersionEndPoint, dynamicModuleParams, (res) => {
|
|
2903
2902
|
this.form = res;
|
|
2904
2903
|
this.createRecordProperties();
|
|
@@ -2917,7 +2916,7 @@ class AddFormRecordComponent {
|
|
|
2917
2916
|
if (this.form.FormScalarType != FormScalarTypeEnum.Semplice) {
|
|
2918
2917
|
this.createFieldGroups();
|
|
2919
2918
|
}
|
|
2920
|
-
GlobalService
|
|
2919
|
+
GlobalService.debugLog("fieldsConfig - form", this.form);
|
|
2921
2920
|
this.loader = true;
|
|
2922
2921
|
}
|
|
2923
2922
|
/**
|
|
@@ -2938,7 +2937,7 @@ class AddFormRecordComponent {
|
|
|
2938
2937
|
}
|
|
2939
2938
|
});
|
|
2940
2939
|
}
|
|
2941
|
-
GlobalService
|
|
2940
|
+
GlobalService.debugLog("createRecordProperties - form", this.form);
|
|
2942
2941
|
}
|
|
2943
2942
|
/**
|
|
2944
2943
|
* Metodo per riordinare i campi che compongono la form.
|
|
@@ -2947,14 +2946,14 @@ class AddFormRecordComponent {
|
|
|
2947
2946
|
if (this.form.Fields && this.form.Fields.length > 0) {
|
|
2948
2947
|
this.form.Fields.sort((a, b) => a.OrdinalPosition > b.OrdinalPosition ? 1 : b.OrdinalPosition > a.OrdinalPosition ? -1 : 0);
|
|
2949
2948
|
}
|
|
2950
|
-
GlobalService
|
|
2949
|
+
GlobalService.debugLog("reorderFormFields - form", this.form);
|
|
2951
2950
|
}
|
|
2952
2951
|
/**
|
|
2953
2952
|
* Metodo per creare il FormGroup che rappresenta la form.
|
|
2954
2953
|
*/
|
|
2955
2954
|
createFormGroup() {
|
|
2956
2955
|
this.formForm = this.utilityService.CreateFormFormGroup(this.form.Fields, this.record, this.onlyView);
|
|
2957
|
-
GlobalService
|
|
2956
|
+
GlobalService.debugLog("createFormGroup - form", this.form);
|
|
2958
2957
|
}
|
|
2959
2958
|
/**
|
|
2960
2959
|
* Metodo per creare i gruppi in cui raggruppare i campi della form in base
|
|
@@ -2966,27 +2965,27 @@ class AddFormRecordComponent {
|
|
|
2966
2965
|
.forEach((groupName) => {
|
|
2967
2966
|
this.fieldGroups[groupName] = this.form.Fields.filter((f) => f.FieldGroup == groupName);
|
|
2968
2967
|
});
|
|
2969
|
-
GlobalService
|
|
2968
|
+
GlobalService.debugLog("createFieldGroups - form", this.form);
|
|
2970
2969
|
}
|
|
2971
2970
|
/**
|
|
2972
2971
|
* Metodo per creare il FormGroup che rappresenta la form.
|
|
2973
2972
|
*/
|
|
2974
2973
|
createHTMLreadableValues(record) {
|
|
2975
|
-
GlobalService
|
|
2976
|
-
GlobalService
|
|
2974
|
+
GlobalService.debugLog("createHTMLreadableValues - record", record);
|
|
2975
|
+
GlobalService.debugLog("createHTMLreadableValues - form", this.form);
|
|
2977
2976
|
var formnames = new Array();
|
|
2978
2977
|
this.form.Fields.forEach((field) => { formnames.push(field.Name); });
|
|
2979
|
-
GlobalService
|
|
2978
|
+
GlobalService.debugLog("createHTMLreadableValues - form fields names", formnames);
|
|
2980
2979
|
// alert("continue for values?")
|
|
2981
2980
|
let outputValuesArray = this.getResponseValues(record, this.form);
|
|
2982
|
-
GlobalService
|
|
2981
|
+
GlobalService.debugLog("createHTMLreadableValues - outputValuesArray", outputValuesArray);
|
|
2983
2982
|
// alert("continue for templates?")
|
|
2984
2983
|
let template = this.getResponseTemplate(record, this.form); // oggetto nel quale viene costruito il template o che prende il valore da un template esterno
|
|
2985
|
-
GlobalService
|
|
2984
|
+
GlobalService.debugLog("createHTMLreadableValues - template", template);
|
|
2986
2985
|
// alert("continue for output?")
|
|
2987
2986
|
const regex = /##([\w]+)##/g;
|
|
2988
2987
|
const output = this.replaceTemplatePlaceholdersWithValues(template, outputValuesArray, regex);
|
|
2989
|
-
GlobalService
|
|
2988
|
+
GlobalService.debugLog("createHTMLreadableValues - output", output);
|
|
2990
2989
|
// alert("continue for ending?")
|
|
2991
2990
|
return output; // oggetto che conterrà l'output elaborato
|
|
2992
2991
|
}
|
|
@@ -3126,7 +3125,7 @@ class AddFormRecordComponent {
|
|
|
3126
3125
|
// console.error(e);
|
|
3127
3126
|
// }
|
|
3128
3127
|
// }
|
|
3129
|
-
GlobalService
|
|
3128
|
+
GlobalService.debugLog("outputValuesArray 1", outputValuesArray);
|
|
3130
3129
|
// cancello i valori indefiniti o nulli
|
|
3131
3130
|
for (const chiave in outputValuesArray) {
|
|
3132
3131
|
if (outputValuesArray[chiave] == undefined || outputValuesArray[chiave] == null)
|
|
@@ -3138,7 +3137,7 @@ class AddFormRecordComponent {
|
|
|
3138
3137
|
let template = '<div class="row">';
|
|
3139
3138
|
// PREPARO O PRENDO LA STRUTTURA DA STAMPARE
|
|
3140
3139
|
form.Fields.forEach((baseField) => {
|
|
3141
|
-
GlobalService
|
|
3140
|
+
GlobalService.debugLog('getResposneTemplate - pre - field', baseField);
|
|
3142
3141
|
if (baseField.AnswerStyle == null || baseField.AnswerStyle == undefined) {
|
|
3143
3142
|
baseField.AnswerStyle = new AnswerStyle();
|
|
3144
3143
|
baseField.AnswerStyle.ColSpanSizes = baseField.ColSpanSizes;
|
|
@@ -3154,7 +3153,7 @@ class AddFormRecordComponent {
|
|
|
3154
3153
|
}
|
|
3155
3154
|
if (baseField.AnswerStyle.VisibleIf) {
|
|
3156
3155
|
const visibility = UtilityHelperService.EvaluateFieldFormula(baseField.AnswerStyle.VisibleIf, record, null);
|
|
3157
|
-
GlobalService
|
|
3156
|
+
GlobalService.debugLog("EvaluateFieldFormula - visibility", visibility);
|
|
3158
3157
|
baseField.AnswerStyle.InListView = (visibility == true) ? true : false;
|
|
3159
3158
|
}
|
|
3160
3159
|
if (baseField.AnswerStyle.InListView) {
|
|
@@ -3163,7 +3162,7 @@ class AddFormRecordComponent {
|
|
|
3163
3162
|
' <span class="dynaform-response" style="' + baseField.AnswerStyle.FieldstyleCSS + '"> ##' + baseField.Name + '##</span>' +
|
|
3164
3163
|
'</div> \n ';
|
|
3165
3164
|
}
|
|
3166
|
-
GlobalService
|
|
3165
|
+
GlobalService.debugLog('getResposneTemplate - post - field', baseField);
|
|
3167
3166
|
});
|
|
3168
3167
|
// (attualmente non esiste il concetto di tempate di output)
|
|
3169
3168
|
template += '</div>';
|
|
@@ -3228,7 +3227,7 @@ class ViewFormRecordComponent {
|
|
|
3228
3227
|
this.goBackEvent = new EventEmitter();
|
|
3229
3228
|
}
|
|
3230
3229
|
ngOnInit() {
|
|
3231
|
-
GlobalService
|
|
3230
|
+
GlobalService.debugLog('this.record', this.record);
|
|
3232
3231
|
if (typeof this.record === "string") {
|
|
3233
3232
|
// allora è un ID
|
|
3234
3233
|
this.getRecordByID();
|
|
@@ -3268,7 +3267,7 @@ class ViewFormRecordComponent {
|
|
|
3268
3267
|
this.record.HTMLreadableValues = res.HTMLreadableValues;
|
|
3269
3268
|
// this.viewMode = DynamicModuleViewModeEnum.COMPILE;
|
|
3270
3269
|
// this.loader = true;
|
|
3271
|
-
GlobalService
|
|
3270
|
+
GlobalService.debugLog("record", this.record);
|
|
3272
3271
|
this.createOutput();
|
|
3273
3272
|
// this.getFormByIDandVersion();
|
|
3274
3273
|
});
|
|
@@ -3289,7 +3288,7 @@ class ViewFormRecordComponent {
|
|
|
3289
3288
|
];
|
|
3290
3289
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDAndVersionEndPoint, dynamicModuleParams, (res) => {
|
|
3291
3290
|
this.form = res;
|
|
3292
|
-
GlobalService
|
|
3291
|
+
GlobalService.debugLog("form", this.form);
|
|
3293
3292
|
this.createOutput();
|
|
3294
3293
|
});
|
|
3295
3294
|
}
|
|
@@ -3349,18 +3348,18 @@ class SingleRecordComponent {
|
|
|
3349
3348
|
this.loaded = false;
|
|
3350
3349
|
}
|
|
3351
3350
|
ngOnInit() {
|
|
3352
|
-
GlobalService
|
|
3351
|
+
GlobalService.debugLog("single-record - outCompileConfigurations", this.outCompileConfigurations);
|
|
3353
3352
|
this.loaded = true;
|
|
3354
3353
|
}
|
|
3355
3354
|
/**
|
|
3356
3355
|
* Metodo per salvare i dati inseriti dall'utente una volta conclusa la compilazione della form.
|
|
3357
3356
|
*/
|
|
3358
3357
|
saveOrExitForm(record) {
|
|
3359
|
-
GlobalService
|
|
3358
|
+
GlobalService.debugLog('single-record saveRecordEvent', record);
|
|
3360
3359
|
this.saveRecordEvent.emit(record);
|
|
3361
3360
|
}
|
|
3362
3361
|
onAfterSaveRecord(event) {
|
|
3363
|
-
GlobalService
|
|
3362
|
+
GlobalService.debugLog('single-record afterSaveRecordEvent', event);
|
|
3364
3363
|
this.afterSaveRecordEvent.emit(event);
|
|
3365
3364
|
}
|
|
3366
3365
|
}
|
|
@@ -5293,7 +5292,7 @@ class FilterFormStatisticComponent {
|
|
|
5293
5292
|
ParamType: ParamTypeEnum["Query param"],
|
|
5294
5293
|
},
|
|
5295
5294
|
];
|
|
5296
|
-
GlobalService
|
|
5295
|
+
GlobalService.debugLog("getFormByIDandVersion - this record", this.record);
|
|
5297
5296
|
this.utilityService.RunEndPointCall(this.endPointConfiguration.Forms.GetByIDAndVersionEndPoint, dynamicModuleParams, (res) => {
|
|
5298
5297
|
this.form = res;
|
|
5299
5298
|
this.createRecordProperties();
|
|
@@ -5362,26 +5361,26 @@ class FilterFormStatisticComponent {
|
|
|
5362
5361
|
* Metodo per creare il FormGroup che rappresenta la form.
|
|
5363
5362
|
*/
|
|
5364
5363
|
createHTMLreadableValues(record) {
|
|
5365
|
-
GlobalService
|
|
5366
|
-
GlobalService
|
|
5364
|
+
GlobalService.debugLog("record", record);
|
|
5365
|
+
GlobalService.debugLog("form", this.form);
|
|
5367
5366
|
let outputValuesArray = this.getResponseValues(record, this.form);
|
|
5368
|
-
GlobalService
|
|
5367
|
+
GlobalService.debugLog("outputValuesArray", outputValuesArray);
|
|
5369
5368
|
let template = this.getResponseTemplate(this.form); // oggetto nel quale viene costruito il template o che prende il valore da un template esterno
|
|
5370
|
-
GlobalService
|
|
5369
|
+
GlobalService.debugLog("template", template);
|
|
5371
5370
|
const regex = /##([\w]+)##/g;
|
|
5372
5371
|
return this.replaceTemplatePlaceholdersWithValues(template, outputValuesArray, regex); // oggetto che conterrà l'output elaborato
|
|
5373
5372
|
}
|
|
5374
5373
|
getResponseValues(record, form) {
|
|
5375
5374
|
let outputValuesArray = []; // array con i valori delle risposte
|
|
5376
5375
|
//(<DynRecord>this.record).Values è la lista di oggetti {fieldName: valore}
|
|
5377
|
-
GlobalService
|
|
5376
|
+
GlobalService.debugLog("(record).Values", record);
|
|
5378
5377
|
for (let fieldName in record) {
|
|
5379
5378
|
try {
|
|
5380
5379
|
// fieldName è il nome del campo
|
|
5381
5380
|
// PREPARO VARIABILI VALORI CORRETTI
|
|
5382
5381
|
let foundObject = form.Fields.find((obj) => obj.Name === fieldName);
|
|
5383
|
-
GlobalService
|
|
5384
|
-
GlobalService
|
|
5382
|
+
GlobalService.debugLog("fieldName", fieldName);
|
|
5383
|
+
GlobalService.debugLog("foundObject", foundObject);
|
|
5385
5384
|
// gestire caso fieldtype 8 [elenco generico]
|
|
5386
5385
|
// fare un eval per popolare i valuePairs se è presente una formula
|
|
5387
5386
|
// prendere la label corretta
|
|
@@ -5391,7 +5390,7 @@ class FilterFormStatisticComponent {
|
|
|
5391
5390
|
// aggiungo a valuepairs i valori calcolati
|
|
5392
5391
|
// (<ListValueField>foundObject).ValuePairs = {};
|
|
5393
5392
|
var temp = UtilityHelperService.EvaluateFieldFormula(foundObject.Formula, record, null);
|
|
5394
|
-
GlobalService
|
|
5393
|
+
GlobalService.debugLog("temp", temp);
|
|
5395
5394
|
for (let key2 in temp) {
|
|
5396
5395
|
if (UtilityHelperService.isNumeric(temp[key2])) {
|
|
5397
5396
|
foundObject.ValuePairs[Number(key2)] = temp[key2];
|
|
@@ -5400,12 +5399,12 @@ class FilterFormStatisticComponent {
|
|
|
5400
5399
|
foundObject.ValuePairs[key2] = temp[key2];
|
|
5401
5400
|
}
|
|
5402
5401
|
}
|
|
5403
|
-
GlobalService
|
|
5404
|
-
GlobalService
|
|
5402
|
+
GlobalService.debugLog("(record).Values[fieldName]", record[fieldName]);
|
|
5403
|
+
GlobalService.debugLog("(<ListValueField>foundObject).ValuePairs[record[fieldName]]", foundObject.ValuePairs[record[fieldName]]);
|
|
5405
5404
|
outputValuesArray[fieldName] = foundObject.ValuePairs[record[fieldName]];
|
|
5406
5405
|
}
|
|
5407
5406
|
let inverted = {};
|
|
5408
|
-
GlobalService
|
|
5407
|
+
GlobalService.debugLog("(<ListValueField>foundObject).ValuePairs", foundObject.ValuePairs);
|
|
5409
5408
|
for (let key in foundObject.ValuePairs) {
|
|
5410
5409
|
inverted[foundObject.ValuePairs[key]] = key;
|
|
5411
5410
|
}
|
|
@@ -5413,7 +5412,7 @@ class FilterFormStatisticComponent {
|
|
|
5413
5412
|
outputValuesArray[fieldName] = foundObject.ValuePairs[record[fieldName]];
|
|
5414
5413
|
}
|
|
5415
5414
|
else {
|
|
5416
|
-
GlobalService
|
|
5415
|
+
GlobalService.debugLog("record[fieldName]", record[fieldName]);
|
|
5417
5416
|
outputValuesArray[fieldName] = record[fieldName];
|
|
5418
5417
|
}
|
|
5419
5418
|
////////////////////////////////////////////////////////////////////////////////
|
|
@@ -5422,7 +5421,7 @@ class FilterFormStatisticComponent {
|
|
|
5422
5421
|
console.error(e);
|
|
5423
5422
|
}
|
|
5424
5423
|
}
|
|
5425
|
-
GlobalService
|
|
5424
|
+
GlobalService.debugLog("outputValuesArray 1", outputValuesArray);
|
|
5426
5425
|
// cancello i valori indefiniti o nulli
|
|
5427
5426
|
for (const chiave in outputValuesArray) {
|
|
5428
5427
|
if (outputValuesArray[chiave] == undefined || outputValuesArray[chiave] == null)
|