Skip to content

Commit 3069ca6

Browse files
author
Allan Asp Christensen
committed
adding route to organisation change
1 parent 7e281f7 commit 3069ca6

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/app/navbar/organisation-dropdown/organisation-dropdown.component.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { AfterContentInit, AfterViewChecked, Component, DoCheck, OnChanges, OnInit } from '@angular/core';
2+
import { Router } from '@angular/router';
23
import { Organisation } from '@app/admin/organisation/organisation.model';
34
import { UserResponse } from '@app/admin/users/user.model';
45
import { AuthService } from '@app/auth/auth.service';
@@ -24,7 +25,8 @@ export class OrganisationDropdownComponent implements OnInit {
2425
constructor(
2526
private authService: AuthService,
2627
public translate: TranslateService,
27-
private sharedVariable: SharedVariableService
28+
private sharedVariable: SharedVariableService,
29+
private route: Router,
2830
) { }
2931

3032
ngOnInit(): void {
@@ -55,7 +57,9 @@ export class OrganisationDropdownComponent implements OnInit {
5557
public onChange(value) {
5658
this.setSelectedOrganisation(value);
5759
this.sharedVariable.setValue(value);
60+
this.route.navigateByUrl('/my-applications');
5861
}
62+
5963
setSelectedOrganisation(value) {
6064
this.sharedVariable.setSelectedOrganisationId(value);
6165
}

0 commit comments

Comments
 (0)