agendas order

This commit is contained in:
Peter Maquiran
2023-08-22 11:25:13 +01:00
parent e8adb78b56
commit 6f9eb09b1c
9 changed files with 73 additions and 20 deletions
+26
View File
@@ -51,6 +51,8 @@ export class EventsService {
calendarNamesAry = []
calendarNamesAryNoPr = []
calendarNamesAryNoPrNMD = []
calendarNamesAryOnlyMD = []
calendarNamesAryReverse = []
calendarNamesAryPR = []
@@ -60,6 +62,8 @@ export class EventsService {
myCalendarNames = {}
hasAnyCalendar = false
HasMdGPR = false
onCalendarFinishLoad = new Subscribe({execute : false, deleteOnExecute: true})
@@ -108,6 +112,10 @@ export class EventsService {
this.calendarNamesAryNoPr = []
this.calendarNamesAryPR = []
this.calendarNamesAryNoPrNMD = []
this.calendarNamesAryOnlyMD = []
this.hasSharedCalendar = false
this.hasSharedOficial = false
this.hasSharedPessoal = false
@@ -115,6 +123,8 @@ export class EventsService {
this.hasOwnCalendar = false
this.hasOwnOficial = false
this.hasOwnPessoal = false
this.HasMdGPR = false
if (SessionStore.user) {
if (SessionStore.user.Profile == 'MDGPR') {
@@ -308,6 +318,22 @@ export class EventsService {
}
this.calendarNamesAryNoPrNMD = this.calendarNamesAryNoPr.filter((e)=> {
return e.Role != 'Ministro e Director do Gabinete do PR' && e.Role != 'Presidente da República'
})
this.calendarNamesAryOnlyMD = this.calendarNamesAryNoPr.filter((e)=> {
return e.Role == 'Ministro e Director do Gabinete do PR'
})
this.HasMdGPR = this.calendarNamesAryNoPr.find( (e)=> {
if(e.Role == 'Ministro e Director do Gabinete do PR') {
return true
}
return false
})
if(SessionStore.user.OwnerCalendars.length == 0 && SessionStore.user.SharedCalendars.length == 0) {
this.hasAnyCalendar = false