mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-21 05:45:50 +00:00
fix view event in some component
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user