fix(8702): refreshing organization report page does not display the refreshed page (#8713)

This commit is contained in:
Anas 2024-05-07 05:21:19 +02:00 committed by GitHub
parent 0fb352d8ed
commit c051412d41
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 2 deletions

View File

@ -23,8 +23,8 @@ export class ReportsHomeComponent implements OnInit {
ngOnInit() {
this.homepage$ = this.router.events.pipe(
filter((event) => event instanceof NavigationEnd),
map((event) => (event as NavigationEnd).urlAfterRedirects.endsWith("/reports")),
startWith(true),
map((event) => this.isReportsHomepageRouteUrl((event as NavigationEnd).urlAfterRedirects)),
startWith(this.isReportsHomepageRouteUrl(this.router.url)),
);
this.reports$ = this.route.params.pipe(
@ -61,4 +61,8 @@ export class ReportsHomeComponent implements OnInit {
},
];
}
private isReportsHomepageRouteUrl(url: string): boolean {
return url.endsWith("/reports");
}
}