agenda text change again

This commit is contained in:
Eudes Inácio
2023-08-22 11:52:16 +01:00
parent e8adb78b56
commit cb95084c10
3 changed files with 49 additions and 44 deletions
+1 -1
View File
@@ -196,7 +196,7 @@
</ion-row> </ion-row>
<div style="padding-right: 50px" class="font-16-em text-black align-center cursor-pointer" (click)="changeSegment('Combinado')" [class.active]="segment == 'Combinado' "> <div style="padding-right: 50px" class="font-16-em text-black align-center cursor-pointer" (click)="changeSegment('Combinado')" [class.active]="segment == 'Combinado' ">
Todos... Todos
</div> </div>
<div style="padding-right: 50px" class="font-16-em text-black align-center cursor-pointer" (click)="changeSegment('Pessoal')" [class.active]="segment == 'Pessoal' "> <div style="padding-right: 50px" class="font-16-em text-black align-center cursor-pointer" (click)="changeSegment('Pessoal')" [class.active]="segment == 'Pessoal' ">
Pessoais Pessoais
+42 -37
View File
@@ -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 { AnimationController, ModalController, Platform } from '@ionic/angular';
import { SearchPage } from 'src/app/pages/search/search.page'; import { SearchPage } from 'src/app/pages/search/search.page';
import { Router } from '@angular/router'; import { Router } from '@angular/router';
@@ -38,7 +38,7 @@ export class HeaderPage implements OnInit {
showProfileModal = false showProfileModal = false
permissionList = new PermissionList(); permissionList = new PermissionList();
notificationCount: number = 0; notificationCount: number = 0;
constructor( constructor(
private router: Router, private router: Router,
@@ -51,7 +51,8 @@ export class HeaderPage implements OnInit {
public p: PermissionService, public p: PermissionService,
private eventTriger: EventTrigger, private eventTriger: EventTrigger,
public ActiveTabService: ActiveTabService, public ActiveTabService: ActiveTabService,
private notificationService: NotificationsService private notificationService: NotificationsService,
private cdRef: ChangeDetectorRef
) { ) {
this.loggeduser = SessionStore.user; this.loggeduser = SessionStore.user;
router.events.subscribe((val) => { router.events.subscribe((val) => {
@@ -61,48 +62,52 @@ export class HeaderPage implements OnInit {
this.showProfileModal = false this.showProfileModal = false
}); });
this.eventTriger.getObservable().subscribe((event) => { this.updateReciveNotification();
if(event.notification == "recive") { this.updateDeleteNotification();
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.notificationService.notificationReceived.subscribe(() => { /* this.notificationService.notificationReceived.subscribe(() => {
console.log('header', 'event.notification') console.log('header', 'event.notification')
this.notificationLengthData() this.notificationLengthData()
}); */ }); */
} }
async ngOnInit() { async ngOnInit() {
this.hideSearch(); this.hideSearch();
this.notificationLengthData(); 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() { async notificationLengthData() {
await this.storageservice.get("Notifications").then((value) => { await this.storageservice.get("Notifications").then((value) => {
/* var data = JSON.parse(value); */ /* var data = JSON.parse(value); */
this.notificationLength = value.length; this.notificationLength = value.length;
}).catch((error) => { }).catch((error) => {
if(!error) { if (!error) {
this.notificationLength = 0; this.notificationLength = 0;
} else { } else {
console.error('header storage get notification', error) console.error('header storage get notification', error)
@@ -139,9 +144,9 @@ export class HeaderPage implements OnInit {
type = "AccoesPresidenciais" type = "AccoesPresidenciais"
} }
if(this.canOpenSearch) { if (this.canOpenSearch) {
this.canOpenSearch = false this.canOpenSearch = false
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: SearchPage, component: SearchPage,
cssClass: classs, cssClass: classs,
@@ -152,7 +157,7 @@ export class HeaderPage implements OnInit {
} }
}); });
modal.onDidDismiss().then(() => { modal.onDidDismiss().then(() => {
@@ -194,7 +199,7 @@ export class HeaderPage implements OnInit {
return enterAnimation(baseEl).direction('reverse'); return enterAnimation(baseEl).direction('reverse');
} }
if(!this.showProfileModal) { if (!this.showProfileModal) {
this.showProfileModal = true this.showProfileModal = true
const modal = await this.modalController.create({ const modal = await this.modalController.create({
component: ProfilePage, component: ProfilePage,
@@ -202,8 +207,8 @@ export class HeaderPage implements OnInit {
componentProps: { componentProps: {
} }
}); });
modal.onDidDismiss().then(() => { modal.onDidDismiss().then(() => {
this.notificationLengthData() this.notificationLengthData()
this.showProfileModal = false this.showProfileModal = false
@@ -211,15 +216,15 @@ export class HeaderPage implements OnInit {
await modal.present(); await modal.present();
} }
} }
async dynamicSearch() { async dynamicSearch() {
if(window['dynamicSearch']) { if (window['dynamicSearch']) {
window['dynamicSearch'](this.searchSubject) window['dynamicSearch'](this.searchSubject)
} else { } else {
setTimeout(()=>{ setTimeout(() => {
this.dynamicSearch() this.dynamicSearch()
}, 100) }, 100)
} }
@@ -239,11 +244,11 @@ export class HeaderPage implements OnInit {
} }
async basicSearch() { async basicSearch() {
if(window['searchTriger']) { if (window['searchTriger']) {
window['searchTriger']() window['searchTriger']()
} else { } else {
setTimeout(()=>{ setTimeout(() => {
this.basicSearch() this.basicSearch()
}, 100) }, 100)
} }
+6 -6
View File
@@ -1,12 +1,12 @@
export let versionData = { export let versionData = {
"shortSHA": "5e069a378", "shortSHA": "e8adb78b5",
"SHA": "5e069a37836cfedeceda2b740adb35f388e42189", "SHA": "e8adb78b56cf4a0ac7b11d736d3fe37b35b783e5",
"branch": "developer-prod", "branch": "developer-prod",
"lastCommitAuthor": "'Peter Maquiran'", "lastCommitAuthor": "'Peter Maquiran'",
"lastCommitTime": "'Tue Aug 22 09:18:52 2023 +0100'", "lastCommitTime": "'Tue Aug 22 09:22:08 2023 +0100'",
"lastCommitMessage": "merge", "lastCommitMessage": "merge",
"lastCommitNumber": "5198", "lastCommitNumber": "5199",
"change": "", "change": "",
"changeStatus": "On branch developer-prod\nChanges to be committed:\n (use \"git restore --staged <file>...\" to unstage)\n\tmodified: src/app/shared/header/header.page.ts", "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 <file>...\" to unstage)\n\tmodified: src/app/pages/agenda/agenda.page.html\n\tmodified: src/app/shared/header/header.page.ts",
"changeAuthor": "peter.maquiran" "changeAuthor": "eudes.inacio"
} }