|
|
|
@ -9,9 +9,10 @@ import { TranslationService } from '../../services/translation.service';
|
|
|
|
|
import { ThemeService } from '../../services/theme.service';
|
|
|
|
|
import { TranslateModule } from '@ngx-translate/core';
|
|
|
|
|
import { ReactiveFormsModule } from '@angular/forms';
|
|
|
|
|
import { RouterLink, RouterLinkActive } from '@angular/router';
|
|
|
|
|
import { Router, RouterLink, RouterLinkActive } from '@angular/router';
|
|
|
|
|
import { NgClass, NgOptimizedImage } from '@angular/common';
|
|
|
|
|
import { WorkService } from '../../services/work.service';
|
|
|
|
|
import { Observable } from 'rxjs';
|
|
|
|
|
|
|
|
|
|
@Component({
|
|
|
|
|
selector: 'app-header',
|
|
|
|
@ -32,12 +33,18 @@ export class HeaderComponent {
|
|
|
|
|
version: string = '1.0';
|
|
|
|
|
isMenuOpen: boolean = false;
|
|
|
|
|
isCheck: boolean = false;
|
|
|
|
|
linkLastWork: string = this.workService.getIdLastWorkByUserId("");
|
|
|
|
|
|
|
|
|
|
@ViewChild('menuRef') menuRef!: ElementRef;
|
|
|
|
|
@Input() themeClass!: string;
|
|
|
|
|
@Input() themeService!: ThemeService;
|
|
|
|
|
|
|
|
|
|
// Instanciation du service pour les actions de traduction
|
|
|
|
|
constructor(private translationService: TranslationService, private workService: WorkService) { }
|
|
|
|
|
constructor(
|
|
|
|
|
private router: Router,
|
|
|
|
|
private translationService: TranslationService,
|
|
|
|
|
private workService: WorkService)
|
|
|
|
|
{ }
|
|
|
|
|
|
|
|
|
|
// Méthode pour changer la langue
|
|
|
|
|
onLanguageChange(event: Event) {
|
|
|
|
@ -65,8 +72,9 @@ export class HeaderComponent {
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
getLastWorkLink() : string {
|
|
|
|
|
return 'work/'.concat(this.workService.getIdLastWorkByUserId(""))
|
|
|
|
|
onLastWorkLink() : void {
|
|
|
|
|
const url = `/work/${this.linkLastWork}`;
|
|
|
|
|
this.router.navigateByUrl(url);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|