mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
fix publication
This commit is contained in:
@@ -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;
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user