@resolveio/server-lib 4.4.23 → 4.4.24
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/methods/report-builder.js +11 -11
- package/package.json +1 -1
|
@@ -187,7 +187,7 @@ function loadReportBuilderMethods(methodManager) {
|
|
|
187
187
|
if (date_field === void 0) { date_field = ''; }
|
|
188
188
|
if (date_interval === void 0) { date_interval = ''; }
|
|
189
189
|
return new Promise(function (resolve, reject) { return __awaiter(_this, void 0, void 0, function () {
|
|
190
|
-
var _a, _b, uniqueSelectedFieldCollections, modelCollection, queryMatchCondition, queryLookups,
|
|
190
|
+
var _a, _b, uniqueSelectedFieldCollections, modelCollection, queryMatchCondition, queryLookups, queryGroupUnwindCollectionPaths, queryUnwindCollectionPaths, queryGroups, queryGroupUnwind, queryGroup_1, correctSort_1, _loop_1, i, queryProjection, queryTotals, query, queryMatchConditionLookup, tmpProj_1, tmpAnds_1, res, err_1;
|
|
191
191
|
var _this = this;
|
|
192
192
|
return __generator(this, function (_c) {
|
|
193
193
|
switch (_c.label) {
|
|
@@ -244,25 +244,25 @@ function loadReportBuilderMethods(methodManager) {
|
|
|
244
244
|
}
|
|
245
245
|
});
|
|
246
246
|
});
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
var arrayPartData = field.fieldPath.split('.$');
|
|
247
|
+
queryGroupUnwindCollectionPaths = [];
|
|
248
|
+
groupsRow.filter(function (a) { return a.treeItem.fieldPath.includes('$'); }).forEach(function (field) {
|
|
249
|
+
var arrayPartData = field.treeItem.fieldPath.split('.$');
|
|
250
250
|
var path = '$';
|
|
251
251
|
for (var i = 0; i < arrayPartData.length - 1; i++) {
|
|
252
252
|
path += arrayPartData[i];
|
|
253
|
-
if (!
|
|
254
|
-
|
|
253
|
+
if (!queryGroupUnwindCollectionPaths.filter(function (a) { return a === path; })[0]) {
|
|
254
|
+
queryGroupUnwindCollectionPaths.push(path);
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
257
|
});
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
var arrayPartData = field.
|
|
258
|
+
queryUnwindCollectionPaths = [];
|
|
259
|
+
selectedFields.filter(function (a) { return a.fieldPath.includes('$'); }).forEach(function (field) {
|
|
260
|
+
var arrayPartData = field.fieldPath.split('.$');
|
|
261
261
|
var path = '$';
|
|
262
262
|
for (var i = 0; i < arrayPartData.length - 1; i++) {
|
|
263
263
|
path += arrayPartData[i];
|
|
264
|
-
if (!queryGroupUnwindCollectionPaths.
|
|
265
|
-
|
|
264
|
+
if (!queryUnwindCollectionPaths.some(function (a) { return a === path; }) && !queryGroupUnwindCollectionPaths.some(function (a) { return a === path; })) {
|
|
265
|
+
queryUnwindCollectionPaths.push(path);
|
|
266
266
|
}
|
|
267
267
|
}
|
|
268
268
|
});
|