mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
add either pattern
This commit is contained in:
@@ -637,48 +637,55 @@ export class AgendaPage implements OnInit {
|
||||
let load = 0;
|
||||
for (const selectedCalendar of selectedCalendarIds) {
|
||||
|
||||
this.AgendaDataRepositoryService.EventList({userId: selectedCalendar.OwnerUserId, calendarOwnerName: selectedCalendar['FullName'] }).subscribe( response => {
|
||||
(async () => {
|
||||
|
||||
let label;
|
||||
|
||||
if (SessionStore.user.Profile == 'PR') {
|
||||
label = "pr"
|
||||
} else if (SessionStore.user.OwnerCalendars.find(e => e.CalendarId == selectedCalendar.CalendarId)) {
|
||||
label = 'md'
|
||||
const response = await this.AgendaDataRepositoryService.EventList({userId: selectedCalendar.OwnerUserId, calendarOwnerName: selectedCalendar['FullName'] })
|
||||
|
||||
if(response.isOk()) {
|
||||
let label;
|
||||
|
||||
if (SessionStore.user.Profile == 'PR') {
|
||||
label = "pr"
|
||||
} else if (SessionStore.user.OwnerCalendars.find(e => e.CalendarId == selectedCalendar.CalendarId)) {
|
||||
label = 'md'
|
||||
} else {
|
||||
label = "pr"
|
||||
}
|
||||
|
||||
let eventsList = response.value;
|
||||
this.CalendarStore.pushEvent(eventsList, label);
|
||||
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
|
||||
|
||||
this.showTimelinePR = true;
|
||||
|
||||
load++
|
||||
if (load == selectedCalendarIds.length) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
this.updateEventListBox()
|
||||
} else {
|
||||
label = "pr"
|
||||
load++
|
||||
if (load == selectedCalendarIds.length) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
console.log('111b')
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
this.updateEventListBox()
|
||||
}
|
||||
|
||||
let eventsList = response;
|
||||
this.CalendarStore.pushEvent(eventsList, label);
|
||||
})()
|
||||
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
this.updateEventListBox()
|
||||
|
||||
this.showTimelinePR = true;
|
||||
|
||||
load++
|
||||
if (load == selectedCalendarIds.length) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
this.updateEventListBox()
|
||||
}, () => {
|
||||
|
||||
load++
|
||||
if (load == selectedCalendarIds.length) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
console.log('111b')
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
this.updateEventListBox()
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user