fix ownertype and category type

This commit is contained in:
Peter Maquiran
2024-06-21 23:33:29 +01:00
parent 558810ab83
commit 0c14b9be97
13 changed files with 90 additions and 531 deletions
+5 -11
View File
@@ -320,19 +320,13 @@ export class TaskService {
// PR dont have event to approve
/* if(this.SessionStore.user.Profile != 'PR') { */
try {
for(let calendar of this.eventService.calendarNamesAry) {
let userId;
const list = await this.AgendaDataRepositoryService.geCalendars()
if(calendar == 'Meu calendario') {
userId = SessionStore.user.UserId
} else {
userId = calendar.OwnerUserId
}
for(let calendar of list) {
let allEvents = await this.AgendaDataRepositoryService.eventToApproveList({
userId,
userId: calendar.wxUserId,
status: EEventFilterStatus.Pending
}, tracing)
@@ -342,9 +336,9 @@ export class TaskService {
let eventsList = []
if(allEvents.value.length >= 1) {
eventsList = this.sortService.sortArrayByDate(allEvents.value).reverse();
this.eventoaprovacaostore.save(userId, eventsList)
this.eventoaprovacaostore.save(calendar.wxUserId as any, eventsList)
} else {
this.eventoaprovacaostore.save(userId, [])
this.eventoaprovacaostore.save(calendar.wxUserId as any, [])
}
} else {