|
|
|
|
@ -1,4 +1,4 @@
|
|
|
|
|
import { Component, HostListener, Inject, PLATFORM_ID } from '@angular/core';
|
|
|
|
|
import { Component, HostListener, Inject, OnInit, PLATFORM_ID } from '@angular/core';
|
|
|
|
|
import { ActivatedRoute, Router } from '@angular/router';
|
|
|
|
|
import { SidebarService } from '../../../services/sidebar.service';
|
|
|
|
|
import { TranslateModule, TranslateService } from '@ngx-translate/core';
|
|
|
|
|
@ -12,7 +12,7 @@ import { AuthenticationService } from '../../../services/authenticate.service';
|
|
|
|
|
templateUrl: './header.component.html',
|
|
|
|
|
styleUrl: './header.component.scss'
|
|
|
|
|
})
|
|
|
|
|
export class HeaderComponent {
|
|
|
|
|
export class HeaderComponent implements OnInit{
|
|
|
|
|
isDropdownVisible: boolean;
|
|
|
|
|
isVacDropdownVisible: boolean;
|
|
|
|
|
isNotificationsVisible: boolean;
|
|
|
|
|
@ -25,9 +25,9 @@ export class HeaderComponent {
|
|
|
|
|
},
|
|
|
|
|
];
|
|
|
|
|
direction: string = 'ltr';
|
|
|
|
|
userString;
|
|
|
|
|
user;
|
|
|
|
|
username;
|
|
|
|
|
user: any;
|
|
|
|
|
userObj: any;
|
|
|
|
|
username : string = '';
|
|
|
|
|
mismatchedDates: string = "";
|
|
|
|
|
dateColor = "black";
|
|
|
|
|
date: any;
|
|
|
|
|
@ -42,9 +42,6 @@ export class HeaderComponent {
|
|
|
|
|
this.isDropdownVisible = false;
|
|
|
|
|
this.isVacDropdownVisible = false;
|
|
|
|
|
this.isNotificationsVisible = false;
|
|
|
|
|
this.userString = this.storageService.getItem('user');
|
|
|
|
|
this.user = JSON.parse(this.userString as string);
|
|
|
|
|
this.username = this.user?.username;
|
|
|
|
|
this.date = new Date().toISOString().split('T')[0];
|
|
|
|
|
}
|
|
|
|
|
ngOnInit(): void {
|
|
|
|
|
@ -57,6 +54,8 @@ export class HeaderComponent {
|
|
|
|
|
this.storageService.setItem('sidebarState', isCollapsed ? 'expanded' : 'collapsed');
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
this.userObj = JSON.parse(this.storageService.getItem('user') || '{}');
|
|
|
|
|
this.username = this.userObj?.user?.userFullname ?? '';
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
ngAfterViewInit(): void {
|
|
|
|
|
|