This commit is contained in:
Peter Maquiran
2022-06-06 16:09:20 +01:00
parent 13c77ff2ef
commit 6723d95aa3
3 changed files with 34 additions and 32 deletions
+33 -27
View File
@@ -214,37 +214,43 @@ export class PublicationsPage implements OnInit {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.publicationsEventFolderList = new Array();
this.publicationsTravelFolderList = new Array();
this.storage.get('actionsEvents').then((events) => {
this.storage.get('actionsEvents').then((events = []) => {
events.forEach(data => {
let folder: PublicationFolder = {
ProcessId: data.ProcessId,
Description: data.Description,
Detail: data.Detail,
DateBegin: data.DateBegin,
DateEnd: data.DateEnd,
ActionType: data.ActionType,
}
if(Array.isArray(events)) {
events.forEach(data => {
let folder: PublicationFolder = {
ProcessId: data.ProcessId,
Description: data.Description,
Detail: data.Detail,
DateBegin: data.DateBegin,
DateEnd: data.DateEnd,
ActionType: data.ActionType,
}
this.publicationsEventFolderList.push(folder);
this.showLoader = false;
});
}
this.publicationsEventFolderList.push(folder);
this.showLoader = false;
});
});
this.storage.get('actionsViagens').then((viagens = []) => {
viagens.forEach(data => {
let folder: PublicationFolder = {
ProcessId: data.ProcessId,
Description: data.Description,
Detail: data.Detail,
DateBegin: data.DateBegin,
DateEnd: data.DateEnd,
ActionType: data.ActionType,
}
this.publicationsTravelFolderList.push(folder);
this.showLoader = false;
});
if(Array.isArray(viagens)) {
viagens.forEach(data => {
let folder: PublicationFolder = {
ProcessId: data.ProcessId,
Description: data.Description,
Detail: data.Detail,
DateBegin: data.DateBegin,
DateEnd: data.DateEnd,
ActionType: data.ActionType,
}
this.publicationsTravelFolderList.push(folder);
this.showLoader = false;
});
}
});
} else {
this.sqliteservice.getAllActions().then((actions: any[]) => {
@@ -311,7 +317,7 @@ export class PublicationsPage implements OnInit {
this.closeDesktopComponent();
this.idSelected = '';
if (window.innerWidth < 701) {
const modal = await this.modalController.create({