Fix PUSH new entries did not show if filter had multiple values

This commit is contained in:
nathangray 2021-06-08 13:31:32 -06:00
parent 2c5461b953
commit 0caabaf516
2 changed files with 9 additions and 4 deletions

View File

@ -263,10 +263,12 @@ var EgwApp = /** @class */ (function () {
for (var _i = 0, _a = Object.values(filters); _i < _a.length; _i++) { for (var _i = 0, _a = Object.values(filters); _i < _a.length; _i++) {
var field_filter = _a[_i]; var field_filter = _a[_i];
var val = value.col_filter[field_filter.col]; var val = value.col_filter[field_filter.col];
if (val && (typeof val == "string" && val.trim().length > 0 || if (val && (typeof val == "string" && val.trim().length > 0)) {
typeof val == "object" && !jQuery.isEmptyObject(val))) {
field_filter.filter_values.push(val); field_filter.filter_values.push(val);
} }
else if (val && typeof val == "object" && !jQuery.isEmptyObject(val)) {
field_filter.filter_values = field_filter.filter_values.concat(Object.values(val));
}
} }
var _loop_2 = function (field_filter) { var _loop_2 = function (field_filter) {
// no filter set // no filter set

View File

@ -384,12 +384,15 @@ export abstract class EgwApp
{ {
let val = value.col_filter[field_filter.col]; let val = value.col_filter[field_filter.col];
if(val && ( if(val && (
typeof val == "string" && val.trim().length > 0 || typeof val == "string" && val.trim().length > 0
typeof val == "object" && !jQuery.isEmptyObject(val)
)) ))
{ {
field_filter.filter_values.push(val); field_filter.filter_values.push(val);
} }
else if (val && typeof val == "object" && !jQuery.isEmptyObject(val))
{
field_filter.filter_values = field_filter.filter_values.concat(Object.values(val))
}
} }
// check filters against pushData.acl data // check filters against pushData.acl data