diff --git a/src/app/modals/profile/profile.page.ts b/src/app/modals/profile/profile.page.ts
index 0dbb39fe9..256fd7574 100644
--- a/src/app/modals/profile/profile.page.ts
+++ b/src/app/modals/profile/profile.page.ts
@@ -42,7 +42,18 @@ export class ProfilePage implements OnInit {
}
ngOnInit() {
-
+ this.getNotificationData();
+
+ }
+
+ close() {
+ this.modalController.dismiss();
+ }
+
+ notImplemented() { }
+
+ async getNotificationData(){
+
this.storageservice.get("Notifications").then((value) => {
console.log("Init get store", value)
@@ -91,17 +102,11 @@ export class ProfilePage implements OnInit {
console.log("Notificaaa", this.notificationdata)
})
console.log("Notificaaa", this.notificationdata)
-
-
-
+ /* await new Promise(resolve => setTimeout(resolve, 1000));
+ await this.getNotificationData(); */
+ console.log('Timer badge count')
}
- close() {
- this.modalController.dismiss();
- }
-
- notImplemented() { }
-
notificatinsRoutes = (index, Service, Object, IdObject, FolderId) => {
if (Service === "agenda") {
this.zone.run(() => this.router.navigate(['/home/agenda', IdObject, 'agenda']));
diff --git a/src/app/shared/header/header.page.html b/src/app/shared/header/header.page.html
index a8292744c..789ba42ad 100644
--- a/src/app/shared/header/header.page.html
+++ b/src/app/shared/header/header.page.html
@@ -11,6 +11,7 @@
+
0" class="icon-badge" >{{this.notificationLength}}
{{loggeduser.Profile}}
diff --git a/src/app/shared/header/header.page.scss b/src/app/shared/header/header.page.scss
index af78e2e72..0d9330924 100644
--- a/src/app/shared/header/header.page.scss
+++ b/src/app/shared/header/header.page.scss
@@ -39,6 +39,19 @@
border: none !important;
}
+ .icon-badge {
+ background-color: red;
+ font-size: 12px;
+ color: white;
+ text-align: center;
+ width:20px;
+ height:20px;
+ border-radius: 35%;
+ position: absolute; /* changed */
+ top: 5px; /* changed */
+ right: 27px; /* changed */
+}
+
.profile-text{
font-size: 20px;
font-weight: 300;
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts
index 66dedaef5..ccc77e877 100644
--- a/src/app/shared/header/header.page.ts
+++ b/src/app/shared/header/header.page.ts
@@ -6,6 +6,8 @@ import { ProfileComponent } from '../headers/header-no-search/profile/profile.pa
import { AuthService } from 'src/app/services/auth.service';
import { User } from 'src/app/models/user.model';
import { ProfilePage } from 'src/app/modals/profile/profile.page';
+import { StorageService } from '../../services/storage.service';
+import { NotificationsService } from '../../services/notifications.service'
@Component({
selector: 'app-header',
@@ -15,29 +17,51 @@ import { ProfilePage } from 'src/app/modals/profile/profile.page';
export class HeaderPage implements OnInit {
searchSubject: string = '';
- showSearch=false;
+ showSearch = false;
loggeduser: User;
- hideSearchBtn:boolean = false;
+ hideSearchBtn: boolean = false;
+ notificationdata: any[] = [];
+ DataArray: Array