This commit is contained in:
Peter Maquiran
2022-05-23 14:54:40 +01:00
parent cdf921975c
commit faa2b343c0
17 changed files with 169 additions and 108 deletions
@@ -88,17 +88,17 @@ export class EventListPage implements OnInit {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.storage.get('event-to-aproveMD').then((events) => {
this.storage.get('event-to-aproveMD').then((events = []) => {
this.eventsMDGPRList = events
})
this.storage.get('event-to-aprovePR').then((events) => {
this.storage.get('event-to-aprovePR').then((events = []) => {
this.eventsPRList = events
})
} else {
this.platform.ready().then(() => {
this.sqliteservice.getListOfEventAprove('Agenda Oficial MDGPR', 'Agenda Pessoal MDGPR').then((event: any[]) => {
this.sqliteservice.getListOfEventAprove('Agenda Oficial MDGPR', 'Agenda Pessoal MDGPR').then((event: any[] = []) => {
this.eventsMDGPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
//this.eventsMDGPRList = this.eventsMDGPRList.filter(element => element.interveners != null)
@@ -161,7 +161,7 @@ export class EventListPage implements OnInit {
this.eventsMDGPRList = mdEventsOficial.concat(mdEventsPessoal);
this.eventsMDGPRList = this.sortService.sortDate(this.eventsMDGPRList, 'taskStartDate')
this.eventsMDGPRList = this.sortService.sortArrayByDate(this.eventsMDGPRList)
this.eventsMDGPRList = this.eventsMDGPRList.filter(function(item) {
this.eventsMDGPRList = ( this.eventsMDGPRList || []).filter(function(item) {
return item.activityInstanceName != 'Editar Evento'
})
@@ -176,9 +176,9 @@ export class EventListPage implements OnInit {
this.eventsPRList = prEventsOficial.concat(prEventsPessoal);
this.eventsPRList = this.sortService.sortDate(this.eventsPRList, 'taskStartDate')
this.eventsPRList = this.sortService.sortArrayByDate(this.eventsPRList)
this.eventsPRList = this.eventsPRList.filter(function(item) {
this.eventsPRList = (this.eventsPRList || []).filter(function(item) {
return item.activityInstanceName != 'Editar Evento'
})
})
this.storage.set('event-to-aprovePR',this.eventsPRList).then(() => {