forked from extern/egroupware
Timesheet: Fix push owner filter was preventing updating
This commit is contained in:
parent
69420c19ad
commit
b0a678c0ec
@ -203,11 +203,10 @@ var TimesheetApp = /** @class */ (function (_super) {
|
||||
// check if we might not see it because of an owner filter
|
||||
var nm = (_a = this.et2) === null || _a === void 0 ? void 0 : _a.getWidgetById('nm');
|
||||
var nm_value = (_b = nm) === null || _b === void 0 ? void 0 : _b.getValue();
|
||||
if (nm && nm_value && typeof ((_c = nm_value.col_filter) === null || _c === void 0 ? void 0 : _c.ts_owner) !== 'undefined') {
|
||||
if (!nm_value.col_filter.ts_owner || nm_value.col_filter.ts_owner == pushData.acl) {
|
||||
this.updateList(nm, pushData);
|
||||
}
|
||||
if (nm && nm_value && ((_c = nm_value.col_filter) === null || _c === void 0 ? void 0 : _c.ts_owner) && nm_value.col_filter.ts_owner != pushData.acl) {
|
||||
return;
|
||||
}
|
||||
this.updateList(nm, pushData);
|
||||
};
|
||||
return TimesheetApp;
|
||||
}(egw_app_1.EgwApp));
|
||||
|
@ -18,6 +18,7 @@ import '../jsapi/egw_global';
|
||||
import '../etemplate/et2_types';
|
||||
|
||||
import {EgwApp} from '../../api/js/jsapi/egw_app';
|
||||
import {et2_nextmatch} from "../../api/js/etemplate/et2_extension_nextmatch";
|
||||
|
||||
/**
|
||||
* UI for timesheet
|
||||
@ -232,15 +233,13 @@ class TimesheetApp extends EgwApp
|
||||
if (typeof this._grants[pushData.acl] === 'undefined') return;
|
||||
|
||||
// check if we might not see it because of an owner filter
|
||||
let nm = this.et2?.getWidgetById('nm');
|
||||
let nm = <et2_nextmatch>this.et2?.getWidgetById('nm');
|
||||
let nm_value = nm?.getValue();
|
||||
if (nm && nm_value && typeof nm_value.col_filter?.ts_owner !== 'undefined')
|
||||
if (nm && nm_value && nm_value.col_filter?.ts_owner && nm_value.col_filter.ts_owner != pushData.acl)
|
||||
{
|
||||
if (!nm_value.col_filter.ts_owner || nm_value.col_filter.ts_owner == pushData.acl)
|
||||
{
|
||||
this.updateList(nm, pushData);
|
||||
}
|
||||
return;
|
||||
}
|
||||
this.updateList(nm, pushData);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user