fix betreft afspraken
All checks were successful
Docker Image CI / build-and-push (push) Successful in 1m4s
Docker Image CI / deploy (push) Successful in 30s
Docker Image CI / notify-failure (push) Has been skipped

This commit is contained in:
2025-04-18 23:30:16 +02:00
parent 781723fddf
commit 524aa879de
9 changed files with 50 additions and 33 deletions

View File

@@ -28,7 +28,7 @@
<ng-template #dropdownContent>
<div class="dropdown">
<h3>{{ fullName }}</h3>
<h4>{{ currentCompany.name }}</h4>
<h4>{{ userService.currentCompany.name }}</h4>
<button
size="m"

View File

@@ -6,7 +6,6 @@ import {AuthService} from '../../services/auth.service';
import {TuiButton, TuiDropdown} from '@taiga-ui/core';
import {TuiActiveZone, TuiObscured} from '@taiga-ui/cdk';
import {environment} from '../../../environments/environment';
import {Company} from '../../models/company';
import {TuiSelectModule} from '@taiga-ui/legacy';
import {UserService} from '../../services/user.service';
import {AppUserDto, CompanyDTO} from '../../models/app-user-dto';
@@ -21,7 +20,6 @@ export class HomeComponent implements OnInit {
user: AppUserDto;
fullName: string
companies: CompanyDTO[];
currentCompany: CompanyDTO;
getInitials(): string {
this.user = this.userService.userValue
@@ -45,7 +43,7 @@ export class HomeComponent implements OnInit {
this.open = active && this.open;
}
constructor(private authService: AuthService, private router: Router, private userService: UserService) {
constructor(private authService: AuthService, private router: Router, protected userService: UserService) {
}
ngOnInit(): void {
@@ -53,7 +51,7 @@ export class HomeComponent implements OnInit {
this.router.navigate(['login']);
} else {
this.companies = this.userService.userValue.companies.map(a => a.company)
this.currentCompany = this.companies[0];
this.userService.currentCompany = this.companies[0];
}
}