From d9eea2605a8842a51d8d4d6a1eff821a1431aee2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Eudes=20In=C3=A1cio?= Date: Tue, 26 Apr 2022 15:19:48 +0100 Subject: [PATCH] Persistent bug on console log solved --- .../app/src/main/assets/capacitor.config.json | 3 ++ src/app/pages/agenda/agenda.page.ts | 47 ++++++++++--------- src/app/shared/header/header.page.ts | 4 +- src/environments/environment.ts | 12 ++--- 4 files changed, 35 insertions(+), 31 deletions(-) diff --git a/android/app/src/main/assets/capacitor.config.json b/android/app/src/main/assets/capacitor.config.json index 2399c4927..2a189f2f1 100644 --- a/android/app/src/main/assets/capacitor.config.json +++ b/android/app/src/main/assets/capacitor.config.json @@ -16,5 +16,8 @@ "sound" ] } + }, + "server": { + "url": "http://192.168.137.1:8100" } } diff --git a/src/app/pages/agenda/agenda.page.ts b/src/app/pages/agenda/agenda.page.ts index 66410a949..3b6cd21e5 100644 --- a/src/app/pages/agenda/agenda.page.ts +++ b/src/app/pages/agenda/agenda.page.ts @@ -252,31 +252,32 @@ export class AgendaPage implements OnInit { //this.getFromDB(); - const pathname = window.location.pathname - let realoadCounter = 0 - this.router.events.forEach((event) => { - if (event instanceof NavigationEnd && event.url == pathname) { - if (this.segment == null) { - this.segment = "Combinado"; + setTimeout(() =>{ + const pathname = window.location.pathname + let realoadCounter = 0 + this.router.events.forEach((event) => { + if (event instanceof NavigationEnd && event.url == pathname) { + if (this.segment == null) { + this.segment = "Combinado"; + } + if (realoadCounter != 0) { + this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); + } + realoadCounter++; } - if (realoadCounter != 0) { - this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); + }); + + this.backgroundservice.registerBackService('Online', () => { + //this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); + }); + + window.onresize = (event) => { + // if not table remove all component + if (window.innerWidth <= 1024) { + this.cloneAllmobileComponent(); } - realoadCounter++; - } - }); - - this.backgroundservice.registerBackService('Online', () => { - //this.loadRangeEvents(this.rangeStartDate, this.rangeEndDate); - }); - - window.onresize = (event) => { - // if not table remove all component - if (window.innerWidth <= 1024) { - this.cloneAllmobileComponent(); - } - }; - + }; + }, 1000) } //Go to the next view of the calendar month/week/day diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts index e61de5c6c..facbf0fcf 100644 --- a/src/app/shared/header/header.page.ts +++ b/src/app/shared/header/header.page.ts @@ -68,9 +68,9 @@ export class HeaderPage implements OnInit { } update() { - setInterval(() => { + /* setInterval(() => { this.notificationLengthData(); - }, 5000) + }, 5000) */ } diff --git a/src/environments/environment.ts b/src/environments/environment.ts index 7e7f4b472..ee8e98126 100644 --- a/src/environments/environment.ts +++ b/src/environments/environment.ts @@ -21,12 +21,12 @@ export const environment = { production: false, - apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', - //apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', - apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', - apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket', - //apiChatUrl: 'https://www.tabularium.pt/api/v1/', - //apiWsChatUrl: 'wss://www.tabularium.pt/websocket', + //apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/', + apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/', + //apiChatUrl: 'https://gabinetedigitalchat.dyndns.info/api/v1/', + //apiWsChatUrl: 'wss://gabinetedigitalchat.dyndns.info/websocket', + apiChatUrl: 'https://www.tabularium.pt/api/v1/', + apiWsChatUrl: 'wss://www.tabularium.pt/websocket', domain: 'gabinetedigital.local', //gabinetedigital.local defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto paulo.pinto@gabinetedigital.local defaultuserpwd: 'tabteste@006', //tabteste@006,