diff --git a/src/app/pages/agenda/agenda.page.html b/src/app/pages/agenda/agenda.page.html
index f728f63fa..a5ecf9510 100644
--- a/src/app/pages/agenda/agenda.page.html
+++ b/src/app/pages/agenda/agenda.page.html
@@ -196,7 +196,7 @@
- Todos...
+ Todos
Pessoais
diff --git a/src/app/shared/header/header.page.ts b/src/app/shared/header/header.page.ts
index 3584eae8c..040e778cb 100644
--- a/src/app/shared/header/header.page.ts
+++ b/src/app/shared/header/header.page.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit } from '@angular/core';
+import { Component, OnInit, ChangeDetectorRef } from '@angular/core';
import { AnimationController, ModalController, Platform } from '@ionic/angular';
import { SearchPage } from 'src/app/pages/search/search.page';
import { Router } from '@angular/router';
@@ -38,7 +38,7 @@ export class HeaderPage implements OnInit {
showProfileModal = false
permissionList = new PermissionList();
notificationCount: number = 0;
-
+
constructor(
private router: Router,
@@ -51,7 +51,8 @@ export class HeaderPage implements OnInit {
public p: PermissionService,
private eventTriger: EventTrigger,
public ActiveTabService: ActiveTabService,
- private notificationService: NotificationsService
+ private notificationService: NotificationsService,
+ private cdRef: ChangeDetectorRef
) {
this.loggeduser = SessionStore.user;
router.events.subscribe((val) => {
@@ -61,48 +62,52 @@ export class HeaderPage implements OnInit {
this.showProfileModal = false
});
- this.eventTriger.getObservable().subscribe((event) => {
- if(event.notification == "recive") {
- console.log('header', event.notification)
- this.notificationLength++
-
- if(window['headerupdate']) {
- window['headerupdate']()
- }
-
- } else if(event.notification == "deleted") {
- console.log('header', event.notification)
- this.notificationLength--
- if(window['headerupdate']) {
- window['headerupdate']()
- }
- }
- });
+ this.updateReciveNotification();
+ this.updateDeleteNotification();
/* this.notificationService.notificationReceived.subscribe(() => {
console.log('header', 'event.notification')
this.notificationLengthData()
}); */
-
+
}
async ngOnInit() {
this.hideSearch();
this.notificationLengthData();
-
+
+ }
+
+ updateReciveNotification() {
+ this.eventTriger.getObservable().subscribe((event) => {
+ if (event.notification == "recive") {
+ console.log('header', event.notification)
+ this.notificationLength++
+ }
+ });
+
+ }
+
+ updateDeleteNotification() {
+ this.eventTriger.getObservable().subscribe((event) => {
+ if (event.notification == "deleted") {
+ console.log('header', event.notification)
+ this.notificationLength--
+ }
+ });
}
async notificationLengthData() {
await this.storageservice.get("Notifications").then((value) => {
-
+
/* var data = JSON.parse(value); */
this.notificationLength = value.length;
-
+
}).catch((error) => {
- if(!error) {
+ if (!error) {
this.notificationLength = 0;
} else {
console.error('header storage get notification', error)
@@ -139,9 +144,9 @@ export class HeaderPage implements OnInit {
type = "AccoesPresidenciais"
}
- if(this.canOpenSearch) {
+ if (this.canOpenSearch) {
this.canOpenSearch = false
-
+
const modal = await this.modalController.create({
component: SearchPage,
cssClass: classs,
@@ -152,7 +157,7 @@ export class HeaderPage implements OnInit {
}
});
-
+
modal.onDidDismiss().then(() => {
@@ -194,7 +199,7 @@ export class HeaderPage implements OnInit {
return enterAnimation(baseEl).direction('reverse');
}
- if(!this.showProfileModal) {
+ if (!this.showProfileModal) {
this.showProfileModal = true
const modal = await this.modalController.create({
component: ProfilePage,
@@ -202,8 +207,8 @@ export class HeaderPage implements OnInit {
componentProps: {
}
});
-
-
+
+
modal.onDidDismiss().then(() => {
this.notificationLengthData()
this.showProfileModal = false
@@ -211,15 +216,15 @@ export class HeaderPage implements OnInit {
await modal.present();
}
-
+
}
async dynamicSearch() {
- if(window['dynamicSearch']) {
+ if (window['dynamicSearch']) {
window['dynamicSearch'](this.searchSubject)
} else {
- setTimeout(()=>{
+ setTimeout(() => {
this.dynamicSearch()
}, 100)
}
@@ -239,11 +244,11 @@ export class HeaderPage implements OnInit {
}
async basicSearch() {
-
- if(window['searchTriger']) {
+
+ if (window['searchTriger']) {
window['searchTriger']()
} else {
- setTimeout(()=>{
+ setTimeout(() => {
this.basicSearch()
}, 100)
}
diff --git a/version/git-version.ts b/version/git-version.ts
index fac0631c8..1e8e98f96 100644
--- a/version/git-version.ts
+++ b/version/git-version.ts
@@ -1,12 +1,12 @@
export let versionData = {
- "shortSHA": "5e069a378",
- "SHA": "5e069a37836cfedeceda2b740adb35f388e42189",
+ "shortSHA": "e8adb78b5",
+ "SHA": "e8adb78b56cf4a0ac7b11d736d3fe37b35b783e5",
"branch": "developer-prod",
"lastCommitAuthor": "'Peter Maquiran'",
- "lastCommitTime": "'Tue Aug 22 09:18:52 2023 +0100'",
+ "lastCommitTime": "'Tue Aug 22 09:22:08 2023 +0100'",
"lastCommitMessage": "merge",
- "lastCommitNumber": "5198",
+ "lastCommitNumber": "5199",
"change": "",
- "changeStatus": "On branch developer-prod\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/shared/header/header.page.ts",
- "changeAuthor": "peter.maquiran"
+ "changeStatus": "On branch developer-prod\nYour branch is behind 'origin/developer-prod' by 1 commit, and can be fast-forwarded.\n (use \"git pull\" to update your local branch)\n\nChanges to be committed:\n (use \"git restore --staged ...\" to unstage)\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/shared/header/header.page.ts",
+ "changeAuthor": "eudes.inacio"
}
\ No newline at end of file