fix publication

This commit is contained in:
Peter Maquiran
2023-02-27 19:52:30 +01:00
parent 75e6a62695
commit d289f377b5
12 changed files with 44 additions and 41 deletions
+1 -1
View File
@@ -1333,7 +1333,7 @@ export class AgendaPage implements OnInit {
async viewEventsToApprove() {
await this.cloneAllmobileComponent();
if (window.innerWidth <= 801) {
if (window.innerWidth <= 1023) {
this.router.navigate(['/home/agenda/event-list']);
} else {
// hide all components
@@ -171,7 +171,7 @@ export class EventListPage implements OnInit {
this.color = 'mdgpr'
}
let genericEvents = await this.processes.GetTasksList('Agendar Evento', false).toPromise();
let genericEvents = await this.processes.eventsToApprove(SessionStore.user.UserId,'mobile agenda').toPromise()
try {
this.eventsList = this.sortService.sortArrayByDate(genericEvents).reverse();
} catch (error) {
+19 -23
View File
@@ -83,10 +83,9 @@ export class PublicationsPage implements OnInit {
this.router.events.forEach((event) => {
if (event instanceof NavigationEnd && event.url == pathname) {
this.getActions();
}
});
this.hideRefreshButton();
this.getFromDB()
@@ -141,32 +140,29 @@ export class PublicationsPage implements OnInit {
getActions() {
if(this.showLoader == false) {
this.showLoader = false
this.publications.GetPublicationFolderList().subscribe(async res => {
this.showLoader = true;
this.publications.GetPublicationFolderList().subscribe(async res => {
const folders: PublicationFolder[] = this.getPublicationFolderMap(res)
const folders: PublicationFolder[] = this.getPublicationFolderMap(res)
this.publicationsEventFolderList = folders.filter((e)=>e.ActionType == 'Evento')
this.publicationsTravelFolderList = folders.filter((e)=>e.ActionType != 'Evento')
this.publicationsEventFolderList = folders.filter((e)=>e.ActionType == 'Evento')
this.publicationsTravelFolderList = folders.filter((e)=>e.ActionType != 'Evento')
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
await this.storage.set('actionsEvents', this.publicationsEventFolderList);
await this.storage.set('actionsViagens', this.publicationsTravelFolderList);
} else {
folders.forEach((folder)=> {
this.addActionToDB(folder);
})
}
this.showLoader = false;
}, (error) => {
this.showLoader = false;
});
}
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
await this.storage.set('actionsEvents', this.publicationsEventFolderList);
await this.storage.set('actionsViagens', this.publicationsTravelFolderList);
} else {
folders.forEach((folder)=> {
this.addActionToDB(folder);
})
}
this.showLoader = false;
}, (error) => {
this.showLoader = false;
});
}