bugs solved

This commit is contained in:
Eudes Inácio
2023-01-04 15:03:29 +01:00
parent 01b438b9f6
commit c8bdcfce8e
6 changed files with 25 additions and 21 deletions
+1 -2
View File
@@ -51,8 +51,7 @@
</ion-buttons>
</div>
<div class="line"></div>
<ion-label (click)="asyncNotification()" *ngIf="notificationdata">{{notificationdata.length}} novas notificações</ion-label>
<ion-label (click)="asyncNotification()" *ngIf="!notificationdata">0 novas notificações</ion-label>
<ion-label (click)="asyncNotification()" *ngIf="notificationdata">{{notificationStatus}}</ion-label>
</div>
</ion-header>
+6 -1
View File
@@ -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(); */
+6 -1
View File
@@ -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)
}
});
}
@@ -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 = {}) {
+6 -2
View File
@@ -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() {
+6 -6
View File
@@ -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