mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-11-22 16:03:47 +01:00
Calendar: Fix event var got lost when refactoring
This commit is contained in:
parent
853fd72d91
commit
406cc7ec8b
@ -533,8 +533,6 @@ var CalendarApp = /** @class */ (function (_super) {
|
|||||||
// Calendar cares about calendar & infolog
|
// Calendar cares about calendar & infolog
|
||||||
if (pushData.app !== this.appname && pushData.app !== 'infolog')
|
if (pushData.app !== this.appname && pushData.app !== 'infolog')
|
||||||
return;
|
return;
|
||||||
// pushData does not contain everything, just the minimum. See calendar_hooks::search_link().
|
|
||||||
var event = pushData.acl || {};
|
|
||||||
if (pushData.type === 'delete') {
|
if (pushData.type === 'delete') {
|
||||||
return _super.prototype.push.call(this, pushData);
|
return _super.prototype.push.call(this, pushData);
|
||||||
}
|
}
|
||||||
@ -560,6 +558,8 @@ var CalendarApp = /** @class */ (function (_super) {
|
|||||||
* @param pushData
|
* @param pushData
|
||||||
*/
|
*/
|
||||||
CalendarApp.prototype.push_calendar = function (pushData) {
|
CalendarApp.prototype.push_calendar = function (pushData) {
|
||||||
|
// pushData does not contain everything, just the minimum. See calendar_hooks::search_link().
|
||||||
|
var cal_event = pushData.acl || {};
|
||||||
// check visibility - grants is ID => permission of people we're allowed to see
|
// check visibility - grants is ID => permission of people we're allowed to see
|
||||||
var owners = [];
|
var owners = [];
|
||||||
if (typeof this._grants === 'undefined') {
|
if (typeof this._grants === 'undefined') {
|
||||||
@ -568,13 +568,13 @@ var CalendarApp = /** @class */ (function (_super) {
|
|||||||
// Filter what's allowed down to those we care about
|
// Filter what's allowed down to those we care about
|
||||||
var filtered = Object.keys(this._grants).filter(function (account) { return app.calendar.state.owner.indexOf(account) >= 0; });
|
var filtered = Object.keys(this._grants).filter(function (account) { return app.calendar.state.owner.indexOf(account) >= 0; });
|
||||||
// Check if we're interested in displaying by owner / participant
|
// Check if we're interested in displaying by owner / participant
|
||||||
var owner_check = et2_widget_event_1.et2_calendar_event.owner_check(event, { options: { owner: filtered } });
|
var owner_check = et2_widget_event_1.et2_calendar_event.owner_check(cal_event, { options: { owner: filtered } });
|
||||||
if (!owner_check) {
|
if (!owner_check) {
|
||||||
// The owner is not in the list of what we're allowed / care about
|
// The owner is not in the list of what we're allowed / care about
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// Check if we're interested by date?
|
// Check if we're interested by date?
|
||||||
if (event.end <= new Date(this.state.first).valueOf() / 1000 || event.start > new Date(this.state.last).valueOf() / 1000) {
|
if (cal_event.end <= new Date(this.state.first).valueOf() / 1000 || cal_event.start > new Date(this.state.last).valueOf() / 1000) {
|
||||||
// The event is outside our current view
|
// The event is outside our current view
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -461,9 +461,6 @@ class CalendarApp extends EgwApp
|
|||||||
// Calendar cares about calendar & infolog
|
// Calendar cares about calendar & infolog
|
||||||
if(pushData.app !== this.appname && pushData.app !== 'infolog') return;
|
if(pushData.app !== this.appname && pushData.app !== 'infolog') return;
|
||||||
|
|
||||||
// pushData does not contain everything, just the minimum. See calendar_hooks::search_link().
|
|
||||||
let event = pushData.acl || {};
|
|
||||||
|
|
||||||
if(pushData.type === 'delete')
|
if(pushData.type === 'delete')
|
||||||
{
|
{
|
||||||
return super.push(pushData);
|
return super.push(pushData);
|
||||||
@ -496,6 +493,9 @@ class CalendarApp extends EgwApp
|
|||||||
*/
|
*/
|
||||||
private push_calendar(pushData)
|
private push_calendar(pushData)
|
||||||
{
|
{
|
||||||
|
// pushData does not contain everything, just the minimum. See calendar_hooks::search_link().
|
||||||
|
let cal_event = pushData.acl || {};
|
||||||
|
|
||||||
// check visibility - grants is ID => permission of people we're allowed to see
|
// check visibility - grants is ID => permission of people we're allowed to see
|
||||||
let owners = [];
|
let owners = [];
|
||||||
if(typeof this._grants === 'undefined')
|
if(typeof this._grants === 'undefined')
|
||||||
@ -506,7 +506,7 @@ class CalendarApp extends EgwApp
|
|||||||
let filtered = Object.keys(this._grants).filter(account => app.calendar.state.owner.indexOf(account) >= 0);
|
let filtered = Object.keys(this._grants).filter(account => app.calendar.state.owner.indexOf(account) >= 0);
|
||||||
|
|
||||||
// Check if we're interested in displaying by owner / participant
|
// Check if we're interested in displaying by owner / participant
|
||||||
let owner_check = et2_calendar_event.owner_check(event, {options: {owner: filtered}});
|
let owner_check = et2_calendar_event.owner_check(cal_event, {options: {owner: filtered}});
|
||||||
if(!owner_check)
|
if(!owner_check)
|
||||||
{
|
{
|
||||||
// The owner is not in the list of what we're allowed / care about
|
// The owner is not in the list of what we're allowed / care about
|
||||||
@ -514,7 +514,7 @@ class CalendarApp extends EgwApp
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Check if we're interested by date?
|
// Check if we're interested by date?
|
||||||
if(event.end <= new Date(this.state.first).valueOf() /1000 || event.start > new Date(this.state.last).valueOf()/1000)
|
if(cal_event.end <= new Date(this.state.first).valueOf() /1000 || cal_event.start > new Date(this.state.last).valueOf()/1000)
|
||||||
{
|
{
|
||||||
// The event is outside our current view
|
// The event is outside our current view
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user