Set default institution tab

This commit is contained in:
spsaefan
2026-08-17 11:50:21 +02:00
parent c733442300
commit 77095c8549
@@ -135,7 +135,8 @@ export class DashboardComponent implements OnInit {
dashboardToYear = this.topicTreemapMaxYear;
dashboardInstitutions: DashboardInstitution[] = [];
selectedDashboardInstitutionId = 'all';
selectedAnalyticalInstitutionId = 'all';
readonly defaultAnalyticalInstitutionId = 'I62318514';
selectedAnalyticalInstitutionId = this.defaultAnalyticalInstitutionId;
dashboardInstitutionsLoading = false;
dashboardInstitutionsError = false;
selectedTopicTreemapNode?: string;
@@ -189,12 +190,12 @@ export class DashboardComponent implements OnInit {
}
const requestedAnalyticalInstitution =
this.route.snapshot.queryParamMap.get('analyticalInstitution') ??
'all';
this.defaultAnalyticalInstitutionId;
const restoredAnalyticalInstitution = institutions.some(
(institution) => institution.id === requestedAnalyticalInstitution,
)
? requestedAnalyticalInstitution
: 'all';
: this.defaultAnalyticalInstitutionId;
if (
restoredAnalyticalInstitution !== this.selectedAnalyticalInstitutionId
) {