diff --git a/src/app/modals/profile/profile.page.html b/src/app/modals/profile/profile.page.html
index 748cc3ee3..18f0967c8 100644
--- a/src/app/modals/profile/profile.page.html
+++ b/src/app/modals/profile/profile.page.html
@@ -51,8 +51,7 @@
- {{notificationdata.length}} novas notificações
- 0 novas notificações
+ {{notificationStatus}}
diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts
index bf6599285..11c007eb3 100644
--- a/src/app/modals/profile/profile.page.ts
+++ b/src/app/modals/profile/profile.page.ts
@@ -31,6 +31,7 @@ export class ProfilePage implements OnInit {
location: "Gabinete";
isProfileOpen = false
hideImage = false
+ notificationStatus = '';
constructor(private modalController: ModalController,
private authService: AuthService,
@@ -117,7 +118,11 @@ export class ProfilePage implements OnInit {
});
this.notificationdata = this.DataArray
}).catch((error) => {
- console.error('storage getnotification: ',error)
+ if(!error) {
+ this.notificationStatus = this.notificationdata.length + " novas notificações";
+ } else {
+ console.error('storage getnotification: ',error)
+ }
})
/* await new Promise(resolve => setTimeout(resolve, 1000));
await this.getNotificationData(); */
diff --git a/src/app/services/auth.service.ts b/src/app/services/auth.service.ts
index f063abba5..1a34a3900 100644
--- a/src/app/services/auth.service.ts
+++ b/src/app/services/auth.service.ts
@@ -225,7 +225,12 @@ export class AuthService {
this.storageService.get(AuthConnstants.AUTH).then(res=>{
this.userData$.next(res);
}).catch((error) => {
- console.error('storage getuserdata',error)
+ if(!error) {
+
+ } else {
+ console.error('storage getuserdata',error)
+ }
+
});
}
diff --git a/src/app/services/notifications.service.ts b/src/app/services/notifications.service.ts
index f929eb788..113818b1a 100644
--- a/src/app/services/notifications.service.ts
+++ b/src/app/services/notifications.service.ts
@@ -48,15 +48,6 @@ export class NotificationsService {
/* private eventTriger: Events, */
/* private fcm: FCM */) {
- this.storageService.get("Notifications").then((value) => {
-
- }).catch((error)=>{
- console.error('storage getnotification',error)
- }).catch(() => {
-
- this.storageService.store("Notifications", [])
- })
-
}
registerCallback(type: string, funx: Function, object: any = {}) {
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts
index 89a71c923..a207e431e 100644
--- a/src/app/shared/header/header.page.ts
+++ b/src/app/shared/header/header.page.ts
@@ -80,9 +80,13 @@ export class HeaderPage implements OnInit {
/* var data = JSON.parse(value); */
this.notificationLength = value.length;
+ }).catch((error) => {
+ if(!error) {
+ this.notificationLength = 0;
+ } else {
+ console.error('header storage get notification', error)
+ }
})
-
-
}
hideSearch() {
diff --git a/src/environments/environment.ts b/src/environments/environment.ts
index 56998ebab..38917556a 100644
--- a/src/environments/environment.ts
+++ b/src/environments/environment.ts
@@ -1,15 +1,15 @@
import { versionData } from '../../version/git-version'
export const environment = {
// apiURL: 'https://gabinetedigital.dyndns.info/GabineteDigital.Services/V5/api/',
- //apiURL: 'https://gd-api.oapr.gov.ao/api/',
- apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
+ apiURL: 'https://gd-api.oapr.gov.ao/api/',
+ //apiURL: 'https://gdapi-dev.dyndns.info/GabineteDigital.Services/V5/api/',
// apiURL: 'http://gpr-dev-01.gabinetedigital.local/GabineteDigital.Services/V5/api/',
// apiChatUrl: 'http://192.168.0.29:3000/api/v1/',
// apiWsChatUrl: 'wss://192.168.0.29:3000/websocket',
- //apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
- //apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
- apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
- apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket',
+ apiChatUrl: 'https://gd-chat.oapr.gov.ao/api/v1/',
+ apiWsChatUrl: 'wss://gd-chat.oapr.gov.ao/websocket',
+ /* apiChatUrl: 'https://gdchat-dev.dyndns.info/api/v1/',
+ apiWsChatUrl: 'wss://gdchat-dev.dyndns.info/websocket', */
production: true,
domain: 'paulo.pinto@gabinetedigital.local',
defaultuser: 'paulo.pinto@gabinetedigital.local',//paulo.pinto@gabinetedigital.local