mirror of
https://code.equilibrium.co.ao/ITO/doneit-web.git
synced 2026-04-20 05:16:07 +00:00
fix notification
This commit is contained in:
@@ -75,9 +75,9 @@
|
||||
|
||||
|
||||
|
||||
<div class="profile-text">
|
||||
<div *ngIf="NotificationHolderService.notificationList.length > 0" class="icon-badge" style="right: -6px;top: 38px;top: -6px;">
|
||||
{{NotificationHolderService.notificationList.length}} </div>
|
||||
<div class="profile-text" *ngIf="(notificationCount$ | async) as notificationCount ">
|
||||
<div *ngIf="notificationCount > 0" class="icon-badge" style="right: -6px;top: 38px;top: -6px;">
|
||||
{{notificationCount}} </div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -243,9 +243,10 @@
|
||||
<img class="profile-image font-45-em image-prety" src={{profilePicture}}>
|
||||
</div>
|
||||
|
||||
<div class="profile-text">
|
||||
<div *ngIf="NotificationHolderService.notificationList.length > 0" class="icon-badge" style="right: -6px;top: 38px;top: -6px;">
|
||||
{{NotificationHolderService.notificationList.length}} </div>
|
||||
<div class="profile-text" *ngIf="(notificationCount$ | async) as notificationCount ">
|
||||
|
||||
<div *ngIf="notificationCount > 0" class="icon-badge" style="right: -6px;top: 38px;top: -6px;">
|
||||
{{notificationCount}} </div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -19,6 +19,8 @@ import { NotificationHolderService } from 'src/app/store/notification-holder.ser
|
||||
import { HeaderSettingsService } from "src/app/services/header-settings.service"
|
||||
import { PublicationHolderService } from 'src/app/services/publication/publication-holder.service'
|
||||
import { Cy } from 'cypress/enum'
|
||||
import { NotificationRepositoryService } from 'src/app/module/notification/data/notification-repository.service';
|
||||
import { Observable } from 'rxjs';
|
||||
@Component({
|
||||
selector: 'app-header',
|
||||
templateUrl: './header.page.html',
|
||||
@@ -56,6 +58,8 @@ export class HeaderPage implements OnInit {
|
||||
|
||||
Cy = Cy
|
||||
|
||||
notificationCount$: Observable<number>
|
||||
|
||||
constructor(
|
||||
private router: Router,
|
||||
private modalController: ModalController,
|
||||
@@ -74,8 +78,16 @@ export class HeaderPage implements OnInit {
|
||||
private attachmentService: AttachmentsService,
|
||||
public NotificationHolderService: NotificationHolderService,
|
||||
public HeaderSettingsService: HeaderSettingsService,
|
||||
public PublicationHolderService: PublicationHolderService
|
||||
public PublicationHolderService: PublicationHolderService,
|
||||
private notificationRepositoryService: NotificationRepositoryService
|
||||
) {
|
||||
|
||||
this.notificationCount$ = this.notificationRepositoryService.getNotificationLiveCount()
|
||||
|
||||
this.notificationCount$.subscribe(count => {
|
||||
console.log('Notification Count:', count);
|
||||
});
|
||||
|
||||
this.loggeduser = SessionStore.user;
|
||||
router.events.subscribe((val) => {
|
||||
this.hideSearch();
|
||||
|
||||
Reference in New Issue
Block a user