2022-12-20 17:14:23 +01:00
|
|
|
import { SessionStore } from 'src/app/store/session.service';
|
|
|
|
|
|
2022-03-30 15:08:23 +01:00
|
|
|
export class AgendaPermission{
|
2022-12-20 17:14:23 +01:00
|
|
|
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 () {
|
2022-12-21 12:26:43 +01:00
|
|
|
return 530
|
|
|
|
|
|
2022-12-20 17:14:23 +01:00
|
|
|
if(this.hasOwnCalendar || this.hasSharedCalendar) {
|
|
|
|
|
return 530
|
|
|
|
|
} else {
|
|
|
|
|
return null
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
}
|
2024-06-14 15:15:50 +01:00
|
|
|
|
|
|
|
|
get creatEvent () {
|
|
|
|
|
return 504
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get listAprovalEvents () {
|
|
|
|
|
return 507
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
get contactManager() {
|
|
|
|
|
return 548
|
|
|
|
|
}
|
2022-03-30 15:08:23 +01:00
|
|
|
}
|