mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 13:02:56 +00:00
improve
This commit is contained in:
@@ -305,6 +305,28 @@ export class EventsService {
|
||||
} else {
|
||||
this.hasAnyCalendar = true
|
||||
}
|
||||
|
||||
|
||||
(() => {
|
||||
const keys = {}
|
||||
|
||||
for (let e of SessionStore.user.OwnerCalendars) {
|
||||
if(!keys[e.CalendarId]) {
|
||||
keys[e.CalendarId] = e.CalendarId
|
||||
} else {
|
||||
throw(`Calendar ${e.CalendarId} is repeated for user `+ SessionStore.user.FullName);
|
||||
}
|
||||
}
|
||||
|
||||
for (let e of SessionStore.user.SharedCalendars) {
|
||||
if(!keys[e.CalendarId]) {
|
||||
keys[e.CalendarId] = e.CalendarId
|
||||
} else {
|
||||
throw(`Calendar ${e.CalendarId} is repeated for user `+ SessionStore.user.FullName);
|
||||
}
|
||||
}
|
||||
})();
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user