mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 21:35:50 +00:00
change calendarid by userid
This commit is contained in:
@@ -611,7 +611,7 @@ export class AgendaPage implements OnInit {
|
||||
delete this.loadRequest[index]
|
||||
}
|
||||
|
||||
loadRangeEventRun(startTime: Date, endTime: Date) {
|
||||
async loadRangeEventRun(startTime: Date, endTime: Date) {
|
||||
|
||||
if (SessionStore.user.OwnerCalendars.length == 0 && SessionStore.user.SharedCalendars.length == 0) {
|
||||
return false
|
||||
@@ -630,60 +630,53 @@ export class AgendaPage implements OnInit {
|
||||
try {
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
} catch (error) {
|
||||
|
||||
}
|
||||
} catch (error) {}
|
||||
|
||||
let load = 0;
|
||||
for (const selectedCalendar of selectedCalendarIds) {
|
||||
|
||||
(async () => {
|
||||
const response = await this.AgendaDataRepositoryService.EventList({userId: selectedCalendar.OwnerUserId, calendarOwnerName: selectedCalendar['FullName'] })
|
||||
|
||||
if(response.isOk()) {
|
||||
let label;
|
||||
|
||||
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()
|
||||
if (SessionStore.user.Profile == 'PR') {
|
||||
label = "pr"
|
||||
} else if (SessionStore.user.OwnerCalendars.find(e => e.CalendarId == selectedCalendar.CalendarId)) {
|
||||
label = 'md'
|
||||
} else {
|
||||
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()
|
||||
label = "pr"
|
||||
}
|
||||
|
||||
})()
|
||||
|
||||
this.CalendarStore.removeRangeForCalendar(startTime, endTime, null , selectedCalendar.OwnerUserId as any)
|
||||
|
||||
let eventsList = response.value;
|
||||
this.CalendarStore.pushEvent(eventsList, label, selectedCalendar.OwnerUserId);
|
||||
|
||||
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 {
|
||||
load++
|
||||
if (load == selectedCalendarIds.length) {
|
||||
this.showLoader = false;
|
||||
}
|
||||
|
||||
this.myCal.update();
|
||||
this.myCal.loadEvents();
|
||||
|
||||
this.listToPresent = this.CalendarStore.getEventsByCalendarIds(selectedCalendarIds)
|
||||
this.updateEventListBox()
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -695,9 +688,13 @@ export class AgendaPage implements OnInit {
|
||||
|
||||
if (this.CalendarName == 'PR+MDGPR') {
|
||||
|
||||
const pr = this.SessionStore.user.SharedCalendars.filter(e => e.CalendarRoleId == this.RoleIdService.PRES.toString())
|
||||
|
||||
return[{
|
||||
...this.eventService.calendarNamesType['Meu calendario'],
|
||||
OwnerUserId: this.SessionStore.user.UserId
|
||||
}, {
|
||||
...pr[0]
|
||||
}]
|
||||
|
||||
} else {
|
||||
|
||||
Reference in New Issue
Block a user