This commit is contained in:
tiago.kayaya
2022-02-16 15:49:08 +01:00
parent 170c5395a4
commit cdf15a37fb
3 changed files with 16 additions and 12 deletions
@@ -27,8 +27,8 @@ export class EventListPage implements OnInit {
profile: string;
segment: string;
showLoader: boolean;
eventsPRList: any = []
eventsMDGPRList: any = []
eventsPRList: any = [];
eventsMDGPRList: any = [];
eventPerson: EventPerson;
eventBody: EventBody;
categories: string[];
@@ -76,7 +76,7 @@ export class EventListPage implements OnInit {
window.onresize = (event) => {
// if not mobile remove all component
if (window.innerWidth <= 800) {
if (window.innerWidth < 701) {
this.modalController.dismiss();
}
};
@@ -85,13 +85,13 @@ export class EventListPage implements OnInit {
getEventToAproveFromDB() {
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
this.storage.get('event-to-aproveMD').then((events) => {
this.eventsMDGPRList = events
})
this.storage.get('event-to-aprovePR').then((events) => {
this.eventsPRList = events
})
@@ -99,17 +99,17 @@ export class EventListPage implements OnInit {
this.platform.ready().then(() => {
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)
console.log('MD event to aprove', this.eventsMDGPRList)
})
this.sqliteservice.getListOfEventAprove('Agenda Oficial PR', 'Agenda Pessoal PR').then((event: any[]) => {
this.eventsPRList = this.sortService.sortDate(this.transformaDataDB(event), 'taskStartDate')
console.log('PR event to aprove', this.eventsPRList)
})
})
+4
View File
@@ -34,7 +34,11 @@ export class RouteService {
* @param option [Object] some options to the url
*/
goBack(url = null, option: object = {}) {
console.log(url);
if(this.history.length >= 2) {
console.log(this.history);
this.history.pop();
const goTo = this.history.pop();
this.isGoBack = true;
@@ -18,8 +18,8 @@ import { Storage } from '@ionic/storage';
export class EventsToApprovePage implements OnInit {
showLoader: boolean;
eventsPRList: any;
eventsMDGPRList: any;
eventsPRList: any[] = [];
eventsMDGPRList: any[] = [];
eventPerson: EventPerson;
eventBody: EventBody;
categories: string[];
@@ -84,7 +84,7 @@ export class EventsToApprovePage implements OnInit {
let prEventsPessoal = await this.processes.GetTasksList('Agenda Pessoal PR', false).toPromise();
this.eventsPRList = prEventsOficial.concat(prEventsPessoal);
this.eventsPRList = this.sortService.sortArrayByDate(this.eventsPRList)
this.storage.set('event-to-aprovePR',this.eventsPRList).then(() => {
console.log(' EVENTPR TO APROVE SAVED')
})