mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-18 20:47:54 +00:00
fix header
This commit is contained in:
@@ -33,6 +33,7 @@ export class HeaderPage implements OnInit {
|
||||
|
||||
production = environment.production
|
||||
environment = environment
|
||||
isProfileOpen = false
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
@@ -49,42 +50,24 @@ export class HeaderPage implements OnInit {
|
||||
this.loggeduser = SessionStore.user;
|
||||
router.events.subscribe((val) => {
|
||||
this.showSearch = false;
|
||||
//this.modalController.dismiss();
|
||||
this.isProfileOpen = false
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
async ngOnInit() {
|
||||
this.hideSearch();
|
||||
this.update()
|
||||
/* this.notificationLengthData();
|
||||
this.eventrigger.getObservable().subscribe(async (data) => {
|
||||
if (data.notification === "delete" || "recive") {
|
||||
await this.notificationLengthData();
|
||||
|
||||
|
||||
}
|
||||
|
||||
}) */
|
||||
this.update();
|
||||
|
||||
}
|
||||
|
||||
update() {
|
||||
/* setInterval(() => {
|
||||
this.notificationLengthData();
|
||||
}, 5000) */
|
||||
|
||||
}
|
||||
|
||||
/* UpdateNotificationCount() {
|
||||
this.notificationsService.registerCallback(
|
||||
'any',
|
||||
() => {
|
||||
setTimeout(()=>{
|
||||
this.notificationLengthData();
|
||||
}, 100)
|
||||
}
|
||||
)
|
||||
} */
|
||||
|
||||
async notificationLengthData() {
|
||||
await this.storageservice.get("Notifications").then((value) => {
|
||||
|
||||
@@ -189,19 +172,26 @@ export class HeaderPage implements OnInit {
|
||||
return enterAnimation(baseEl).direction('reverse');
|
||||
}
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
enterAnimation,
|
||||
leaveAnimation,
|
||||
component: ProfilePage,
|
||||
cssClass: 'model profile-modal search-submodal',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
if(this.isProfileOpen == false) {
|
||||
|
||||
this.isProfileOpen = true;
|
||||
|
||||
const modal = await this.modalController.create({
|
||||
component: ProfilePage,
|
||||
cssClass: 'model profile-modal search-submodal',
|
||||
componentProps: {
|
||||
}
|
||||
});
|
||||
await modal.present();
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.isProfileOpen = false;
|
||||
this.notificationLengthData()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
modal.onDidDismiss().then(() => {
|
||||
this.notificationLengthData()
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user