mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
bugs solved
This commit is contained in:
@@ -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>
|
||||
|
||||
|
||||
@@ -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(); */
|
||||
|
||||
@@ -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 = {}) {
|
||||
|
||||
@@ -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() {
|
||||
|
||||
Reference in New Issue
Block a user