mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-19 04:57:52 +00:00
Merge branch 'developer' of https://bitbucket.org/equilibriumito/gabinete-digital into developer
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
|
||||
<div class="profile-text">
|
||||
<ion-label>{{profileLabel(loggeduser.Profile)}}</ion-label>
|
||||
<div *ngIf="this.notificationLength > 0 && !production" class="icon-badge" style="right: -18px;top: -9px;" >{{this.notificationLength}}</div>
|
||||
<div *ngIf="this.notificationLength > 0 && !production" class="icon-badge" style="right: -18px;top: -9px;" >{{notificationLength}}</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -44,19 +44,24 @@ export class HeaderPage implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
this.hideSearch();
|
||||
this.notificationLengthData();
|
||||
|
||||
if (this.platform.is('desktop') || this.platform.is('mobileweb')) {
|
||||
console.log('Notifications not supported')
|
||||
this.UpdateNotificationCount();
|
||||
} else {
|
||||
this.UpdateNotificationCount();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
UpdateNotificationCount() {
|
||||
this.notificationsService.registerCallback(
|
||||
'any',
|
||||
() => {
|
||||
this.notificationLengthData();
|
||||
setTimeout(()=>{
|
||||
this.notificationLengthData();
|
||||
}, 100)
|
||||
}
|
||||
)
|
||||
}
|
||||
@@ -65,6 +70,8 @@ export class HeaderPage implements OnInit {
|
||||
this.storageservice.get("Notifications").then((value) => {
|
||||
console.log("Init get store", value)
|
||||
|
||||
if(value == 'ée') return false
|
||||
|
||||
/* var data = JSON.parse(value); */
|
||||
this.notificationLength = value.length;
|
||||
})
|
||||
@@ -146,7 +153,6 @@ export class HeaderPage implements OnInit {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
@@ -156,6 +162,10 @@ export class HeaderPage implements OnInit {
|
||||
}
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(()=>{
|
||||
this.notificationLengthData()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user