mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
29 lines
613 B
TypeScript
29 lines
613 B
TypeScript
import { SessionStore } from 'src/app/store/session.service';
|
|
|
|
export class AgendaPermission{
|
|
private hasOwnCalendar = false
|
|
private hasSharedCalendar = false
|
|
|
|
constructor() {
|
|
if(SessionStore.exist) {
|
|
for (let calendar of SessionStore?.user?.OwnerCalendars) {
|
|
this.hasOwnCalendar = true
|
|
}
|
|
|
|
for (let sharedCalendar of SessionStore?.user?.SharedCalendars) {
|
|
this.hasSharedCalendar = true
|
|
}
|
|
}
|
|
}
|
|
get access () {
|
|
return 530
|
|
|
|
if(this.hasOwnCalendar || this.hasSharedCalendar) {
|
|
return 530
|
|
} else {
|
|
return null
|
|
}
|
|
|
|
}
|
|
}
|