fix betreft afspraken
This commit is contained in:
@@ -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"
|
||||
|
||||
@@ -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];
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user