forked from extern/egroupware
* Timesheet: fix list not always refreshed via push, caused by owner filter
This commit is contained in:
parent
3755c1079a
commit
640f69e09a
@ -194,6 +194,11 @@ var TimesheetApp = /** @class */ (function (_super) {
|
|||||||
if (pushData.type === 'delete') {
|
if (pushData.type === 'delete') {
|
||||||
return _super.prototype.push.call(this, pushData);
|
return _super.prototype.push.call(this, pushData);
|
||||||
}
|
}
|
||||||
|
// This must be before all ACL checks, as owner might have changed and entry need to be removed
|
||||||
|
// (server responds then with null / no entry causing the entry to disapear)
|
||||||
|
if (pushData.type !== "add" && this.egw.dataHasUID(this.uid(pushData))) {
|
||||||
|
return etemplate2_1.etemplate2.app_refresh("", pushData.app, pushData.id, pushData.type);
|
||||||
|
}
|
||||||
// all other cases (add, edit, update) are handled identical
|
// all other cases (add, edit, update) are handled identical
|
||||||
// check visibility
|
// check visibility
|
||||||
if (typeof this._grants === 'undefined') {
|
if (typeof this._grants === 'undefined') {
|
||||||
@ -204,7 +209,7 @@ var TimesheetApp = /** @class */ (function (_super) {
|
|||||||
// check if we might not see it because of an owner filter
|
// 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 = (_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();
|
var nm_value = (_b = nm) === null || _b === void 0 ? void 0 : _b.getValue();
|
||||||
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) {
|
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.ts_owner) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
etemplate2_1.etemplate2.app_refresh("", pushData.app, pushData.id, pushData.type);
|
etemplate2_1.etemplate2.app_refresh("", pushData.app, pushData.id, pushData.type);
|
||||||
|
@ -225,6 +225,13 @@ class TimesheetApp extends EgwApp
|
|||||||
return super.push(pushData);
|
return super.push(pushData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// This must be before all ACL checks, as owner might have changed and entry need to be removed
|
||||||
|
// (server responds then with null / no entry causing the entry to disapear)
|
||||||
|
if (pushData.type !== "add" && this.egw.dataHasUID(this.uid(pushData)))
|
||||||
|
{
|
||||||
|
return etemplate2.app_refresh("", pushData.app, pushData.id, pushData.type);
|
||||||
|
}
|
||||||
|
|
||||||
// all other cases (add, edit, update) are handled identical
|
// all other cases (add, edit, update) are handled identical
|
||||||
// check visibility
|
// check visibility
|
||||||
if (typeof this._grants === 'undefined')
|
if (typeof this._grants === 'undefined')
|
||||||
@ -236,7 +243,7 @@ class TimesheetApp extends EgwApp
|
|||||||
// check if we might not see it because of an owner filter
|
// check if we might not see it because of an owner filter
|
||||||
let nm = <et2_nextmatch>this.et2?.getWidgetById('nm');
|
let nm = <et2_nextmatch>this.et2?.getWidgetById('nm');
|
||||||
let nm_value = nm?.getValue();
|
let nm_value = nm?.getValue();
|
||||||
if (nm && nm_value && nm_value.col_filter?.ts_owner && nm_value.col_filter.ts_owner != pushData.acl)
|
if (nm && nm_value && nm_value.col_filter?.ts_owner && nm_value.col_filter.ts_owner != pushData.acl.ts_owner)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user