mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 21:06:06 +00:00
fix publication
This commit is contained in:
@@ -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) {
|
||||
|
||||
@@ -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