fix view event in some component

This commit is contained in:
Peter Maquiran
2024-05-31 13:59:51 +01:00
parent 2159692018
commit a89b9dd4b6
5 changed files with 60 additions and 71 deletions
+17 -8
View File
@@ -233,18 +233,27 @@ export class EventsPage implements OnInit {
let end = date.getFullYear() + "-" + month + "-" + date.getDate() + " 23:59:59";
if(SessionStore.user) {
let onwEvent:any = await this.eventService.getAllOwnEvents(start, end).catch((error) => {
this.showLoader = false;
this.showAgendaLoader = false;
console.error(error)
const response = await this.AgendaDataRepositoryService.EventList({
userId: SessionStore.user.UserId,
calendarOwnerName: SessionStore.user.FullName,
startDate: date.toISOString(),
endDate: new Date(end).toISOString()
})
this.listToPresent = onwEvent;
if(onwEvent?.length) {
this.totalEvent = onwEvent.length;
if(response.isOk()) {
this.listToPresent = response.value;
if(response.value?.length) {
this.totalEvent = response.value.length;
}
} else {
}
this.storage.set('events', this.listToPresent)
this.showLoader = false;
this.showAgendaLoader = false;
this.storage.set('events', this.listToPresent)
}
this.showLoader = false;