-
-
-
-
-
-
-
-
- Institution
-
- Alle Institutionen
- @for (institution of dashboardInstitutions; track institution.id) {
-
- {{ institution.display_name }}
-
- }
-
-
-
+
-
-
- @if (statisticsError) {
+ @if (dashboard.statisticsError) {
Die Kennzahlen konnten nicht geladen werden.
}
-
- Institution auswählen
-
-
-
- @for (institution of dashboardInstitutions; track institution.id) {
-
- }
-
-
-
- @if (dashboardInstitutionsError) {
-
- Die Institutionen konnten nicht geladen werden.
-
- }
-
+
+
+
@if (selectedAnalyticalInstitutionId) {
- @if (
- euProjectStatusesLoading ||
- bmbfProjectStatusesLoading ||
- dfgProjectStatusesLoading ||
- euProjectStatusesError ||
- bmbfProjectStatusesError ||
- dfgProjectStatusesError ||
- (euProjectStatuses && bmbfProjectStatuses && dfgProjectStatuses)
- ) {
-
-
- @if (
- euProjectStatusesLoading ||
- bmbfProjectStatusesLoading ||
- dfgProjectStatusesLoading
- ) {
-
- } @else if (
- euProjectStatusesError &&
- bmbfProjectStatusesError &&
- dfgProjectStatusesError
- ) {
-
- Der Status der EU-, Bund- und DFG-Projekte konnte nicht geladen
- werden.
-
- } @else if (
- euProjectStatuses && bmbfProjectStatuses && dfgProjectStatuses
- ) {
- @if (
- euProjectStatusesError ||
- bmbfProjectStatusesError ||
- dfgProjectStatusesError
- ) {
-
- Projektstatusdaten für {{ failedProjectStatusSources() }} konnten
- nicht geladen werden. Die übrigen Daten werden weiterhin
- angezeigt.
-
- }
-
- }
-
- }
+
- @if (topicTreemapLoading || topicTreemapError || hasTopicTreemapData()) {
-
-
+
- @if (topicTreemapLoading) {
-
- } @else if (topicTreemapError) {
-
- Die Field-Treemap konnte nicht geladen werden.
-
- } @else {
-
-
- }
-
- }
+
- @if (dfgTopicsLoading || dfgTopicsError || dfgProjectTopics) {
-
-
+
- @if (dfgTopicsLoading) {
-
- } @else if (dfgTopicsError) {
-
- Die DFG-Topic-Treemap konnte nicht geladen werden.
-
- } @else {
-
-
- }
-
- }
-
- @if (euTopicsLoading || euTopicsError || euProjectTopics) {
-
-
-
- @if (euTopicsLoading) {
-
- } @else if (euTopicsError) {
-
- Die EU-Topic-Treemap konnte nicht geladen werden.
-
- } @else {
-
-
- }
-
- }
-
- @if (bundTopicsLoading || bundTopicsError || bundProjectTopics) {
-
-
-
- @if (bundTopicsLoading) {
-
- } @else if (bundTopicsError) {
-
- Die BUND-Topic-Treemap konnte nicht geladen werden.
-
- } @else {
-
-
- }
-
- }
-
- @if (topAuthorsLoading || topAuthorsError || hasTopAuthorData()) {
-
-
-
- @if (topAuthorsError) {
-
- Die Autorenstatistiken konnten nicht geladen werden.
-
- } @else {
-
- @for (dataset of visibleTopAuthorDatasets(); track dataset.title) {
-
-
- {{ dataset.icon }}{{ dataset.title }}
-
-
- {{ dataset.subtitle }}
-
- @for (
- entry of dataset.entries;
- track entry.id || entry.name;
- let rank = $index
- ) {
-
- } @empty {
-
- {{
- topAuthorsLoading
- ? 'Wird geladen …'
- : 'Keine Daten vorhanden.'
- }}
-
- }
-
- }
-
- }
-
- }
+
}
diff --git a/webapp/src/app/modules/dashboard/dashboard.component.scss b/webapp/src/app/modules/dashboard/dashboard.component.scss
index 448825c5..cad096da 100644
--- a/webapp/src/app/modules/dashboard/dashboard.component.scss
+++ b/webapp/src/app/modules/dashboard/dashboard.component.scss
@@ -2,467 +2,9 @@
padding: 2rem;
color: var(--sg-text);
- .dashboard-period-filter {
- display: flex;
- align-items: center;
- gap: 1rem;
- margin-bottom: 1.5rem;
- flex-wrap: wrap;
- }
-
- .dashboard-period-presets {
- display: inline-flex;
- overflow: hidden;
- flex: 0 0 auto;
- border: 1px solid var(--sg-border);
- border-radius: 6px;
- background: var(--sg-surface);
-
- button {
- padding: 0.55rem 0.8rem;
- border: 0;
- border-right: 1px solid var(--sg-border);
- background: transparent;
- color: var(--sg-text);
- cursor: pointer;
- font: inherit;
-
- &.active {
- background: var(--sg-blue-highlight);
- color: var(--sg-card-bg);
- }
- }
-
- button:last-child {
- border-right: 0;
- }
- }
-
- .dashboard-period-slider {
- width: 280px;
- max-width: 100%;
- }
-
- .dashboard-institution-filter {
- width: 280px;
- max-width: 100%;
- margin-left: auto;
- }
-
- @media (max-width: 720px) {
- .dashboard-institution-filter,
- .dashboard-period-slider {
- width: 100%;
- margin-left: 0;
- }
- }
-
- .statistics-grid {
- display: grid;
- grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
- gap: 1rem;
- margin-bottom: 2rem;
- }
-
- .statistics-card {
- display: flex;
- align-items: center;
- gap: 1rem;
- min-height: 120px;
- padding: 1.25rem;
- border: 1px solid var(--sg-border);
- border-radius: 12px;
- background: var(--sg-card-bg);
- box-shadow: var(--sg-shadow-sm);
- color: inherit;
- text-decoration: none;
- transition:
- border-color 160ms ease,
- box-shadow 160ms ease,
- transform 160ms ease;
-
- &:hover {
- border-color: var(--sg-card-hover-border);
- box-shadow: var(--sg-shadow-md);
- transform: translateY(-2px);
- }
-
- &:focus-visible {
- outline: 3px solid var(--sg-card-hover-border);
- outline-offset: 3px;
- }
-
- &.disabled {
- pointer-events: none;
- }
-
- span,
- small {
- display: block;
- color: var(--sg-text-muted);
- }
-
- strong {
- display: block;
- margin: 0.2rem 0;
- color: var(--sg-text);
- font-size: clamp(1.7rem, 3vw, 2.3rem);
- line-height: 1.1;
- }
- }
-
- .statistics-icon {
- display: grid;
- flex: 0 0 52px;
- width: 52px;
- height: 52px;
- place-items: center;
- border-radius: 12px;
- background: var(--sg-primary-soft);
- color: var(--sg-blue-highlight);
-
- &--persons {
- background: var(--sg-success-soft);
- color: var(--sg-success);
- }
-
- &--patents {
- background: var(--sg-error-soft);
- color: var(--sg-error);
- }
-
- &--eu-projects {
- background: var(--sg-primary-soft);
- color: var(--sg-blue-highlight);
- }
-
- &--bund-projects {
- background: var(--sg-warning-soft);
- color: var(--sg-warning);
- }
-
- &--dfg-projects {
- background: var(--sg-warning-soft);
- color: var(--sg-warning);
- }
- }
-
.statistics-error {
margin: -1rem 0 2rem;
color: var(--sg-error);
}
- .dashboard-institution-tabs {
- margin: -0.25rem 0 2rem;
-
- h2 {
- margin: 0 0 0.75rem;
- font-size: 1.2rem;
- line-height: 1.25;
- }
- }
-
- .dashboard-institution-tab-bar {
- display: grid;
- grid-template-columns: 40px minmax(0, 1fr) 40px;
- align-items: stretch;
- border-bottom: 1px solid var(--sg-border);
- }
-
- .dashboard-institution-tab-arrow {
- display: grid;
- width: 40px;
- height: 48px;
- padding: 0;
- place-items: center;
- border: 0;
- background: transparent;
- color: var(--sg-text-muted);
- cursor: pointer;
- transition:
- color 0.15s ease,
- background-color 0.15s ease,
- opacity 0.15s ease;
-
- &:hover:not(:disabled) {
- background: var(--sg-option-hover);
- color: var(--sg-text);
- }
-
- &:focus-visible {
- outline-offset: -3px;
- }
-
- &:disabled {
- cursor: default;
- }
-
- &.is-hidden {
- visibility: hidden;
- opacity: 0;
- }
- }
-
- .dashboard-institution-tab-list {
- display: flex;
- overflow-x: auto;
- overflow-y: hidden;
- border-bottom: 0;
- background: transparent;
- scrollbar-width: none;
-
- &::-webkit-scrollbar {
- display: none;
- }
-
- button {
- position: relative;
- flex: 0 0 auto;
- min-width: 120px;
- height: 48px;
- padding: 0 16px;
- border: 0;
- border-radius: 0;
- background: transparent;
- color: var(--sg-text-muted);
- cursor: pointer;
- font: inherit;
- font-size: 14px;
- font-weight: 600;
- line-height: 48px;
- text-align: center;
- white-space: nowrap;
- transition:
- color 0.15s ease,
- background-color 0.15s ease;
-
- &::after {
- position: absolute;
- right: 0;
- bottom: 0;
- left: 0;
- border-top: 3px solid transparent;
- background: transparent;
- content: '';
- }
-
- &:hover {
- background: var(--sg-option-hover);
- color: var(--sg-text);
- }
-
- &:focus-visible {
- outline: 3px solid var(--sg-card-hover-border);
- outline-offset: -3px;
- }
-
- &.active {
- color: var(--sg-blue-highlight);
-
- &::after {
- border-top-color: var(--sg-blue-highlight);
- }
- }
- }
- }
-
- .top-authors-section {
- margin-bottom: 2.5rem;
- }
-
- .topic-heatmap-section {
- margin-bottom: 2.5rem;
- padding: 1.25rem;
- border: 1px solid var(--sg-border);
- border-radius: 12px;
- background: var(--sg-card-bg);
- }
-
- .topic-heatmap-header {
- display: flex;
- align-items: flex-end;
- justify-content: space-between;
- gap: 1rem;
- margin-bottom: 1rem;
-
- h2,
- p {
- margin: 0;
- }
-
- p {
- margin-top: 0.35rem;
- color: var(--sg-text-muted);
- }
-
- @media (max-width: 820px) {
- align-items: flex-start;
- flex-direction: column;
- }
- }
-
- .topic-heatmap-loading {
- min-height: 25rem;
- display: grid;
- place-items: center;
- }
-
- .project-status-loading {
- min-height: 15rem;
- display: grid;
- place-items: center;
- }
-
- .project-status-summary {
- display: flex;
- flex: 0 0 auto;
- gap: 0.5rem;
-
- span {
- padding: 0.35rem 0.65rem;
- border-radius: 999px;
- background: var(--sg-surface-muted);
- color: var(--sg-text-muted);
- font-size: 0.9rem;
- font-weight: 600;
- }
- }
-
- .dfg-topic-summary {
- flex: 0 0 auto;
- color: var(--sg-text-muted);
- font-weight: 600;
- }
-
- .top-authors-header {
- display: flex;
- align-items: flex-end;
- justify-content: space-between;
- gap: 1rem;
- margin-bottom: 1rem;
-
- h2,
- p {
- margin: 0;
- }
-
- p {
- margin-top: 0.35rem;
- color: var(--sg-text-muted);
- }
-
- @media (max-width: 720px) {
- align-items: flex-start;
- flex-direction: column;
- }
- }
-
- .top-authors-grid {
- display: grid;
- grid-template-columns: repeat(2, minmax(0, 1fr));
- gap: 1rem;
-
- &.loading {
- opacity: 0.65;
- }
-
- @media (max-width: 900px) {
- grid-template-columns: 1fr;
- }
- }
-
- .top-authors-chart {
- padding: 1.25rem;
- border: 1px solid var(--sg-border);
- border-radius: 12px;
- background: var(--sg-card-bg);
-
- h3 {
- display: flex;
- align-items: center;
- gap: 0.5rem;
- margin: 0;
- color: var(--sg-text);
- }
- }
-
- .top-authors-chart-subtitle {
- margin: 0.35rem 0 1rem;
- color: var(--sg-text-muted);
- font-size: 13px;
- line-height: 1.45;
- }
-
- .author-bar-row {
- display: flex;
- align-items: center;
- gap: 0.65rem;
- margin-top: 0.7rem;
- }
-
- .author-rank {
- flex: 0 0 1.4rem;
- color: var(--sg-text-muted);
- font-size: 0.8rem;
- text-align: center;
- }
-
- .author-bar-content {
- min-width: 0;
- flex: 1;
- }
-
- .author-bar-label {
- display: flex;
- justify-content: space-between;
- gap: 0.75rem;
- margin-bottom: 0.25rem;
- font-size: 0.85rem;
-
- .author-name {
- overflow: hidden;
- color: var(--sg-blue-highlight);
- font-weight: 600;
- text-overflow: ellipsis;
- white-space: nowrap;
- }
- }
-
- .author-link {
- overflow: hidden;
- text-decoration: none;
- text-overflow: ellipsis;
- white-space: nowrap;
-
- &:hover {
- text-decoration: underline;
- }
-
- &:focus-visible {
- border-radius: 2px;
- outline: 2px solid var(--sg-card-hover-border);
- outline-offset: 2px;
- }
- }
-
- .author-bar-track {
- overflow: hidden;
- height: 7px;
- border-radius: 999px;
- background: var(--sg-border);
- }
-
- .author-bar-fill {
- display: block;
- height: 100%;
- border-radius: inherit;
- background: var(--sg-blue-highlight);
- transition: width 220ms ease;
- }
-
- .empty-chart {
- margin: 2rem 0;
- color: var(--sg-text-muted);
- text-align: center;
- }
}
diff --git a/webapp/src/app/modules/dashboard/dashboard.component.ts b/webapp/src/app/modules/dashboard/dashboard.component.ts
index 7b007625..9e75e1de 100644
--- a/webapp/src/app/modules/dashboard/dashboard.component.ts
+++ b/webapp/src/app/modules/dashboard/dashboard.component.ts
@@ -1,476 +1,62 @@
-import {
- AfterViewInit,
- Component,
- ElementRef,
- HostListener,
- OnInit,
- ViewChild,
-} from '@angular/core';
-import { DecimalPipe } from '@angular/common';
-import { MatFormFieldModule } from '@angular/material/form-field';
-import { MatIconModule } from '@angular/material/icon';
-import { MatSelectModule } from '@angular/material/select';
-import { MatTooltipModule } from '@angular/material/tooltip';
-import { Observable, finalize } from 'rxjs';
-import { ActivatedRoute, Router, RouterLink } from '@angular/router';
-import { MatDialog } from '@angular/material/dialog';
-import { ComponentTooltipDirective } from '../../directives/component-tooltip.directive';
-import { AppAuthorTooltipComponent } from '../../shared/ui/app-author-tooltip/app-author-tooltip.component';
-import {
- ACCOUNT_BALANCE_ICON,
- ACCOUNT_TREE_ICON,
- ARTICLE_ICON,
- CHEVRON_LEFT_ICON,
- CHEVRON_RIGHT_ICON,
- DESCRIPTION_ICON,
- GROUPS_ICON,
- MENU_BOOK_ICON,
- PATENT_ICON,
- PUBLIC_ICON,
- SCIENCE_ICON,
- STACKED_BAR_CHART_ICON,
-} from '../../shared/ui/icons';
-import { EuProjectStatusChartComponent } from './eu-project-status-chart/eu-project-status-chart.component';
-import { YearRangeSliderComponent } from '../../shared/ui/year-range-slider/year-range-slider.component';
-import { LoadingComponent } from '../../shared/ui/loading/loading.component';
-import { TopicTreemapComponent } from '../../shared/ui/topic-treemap/topic-treemap.component';
-import {
- TopicTreemapData,
- TopicTreemapTopicSelect,
-} from '../../shared/ui/topic-treemap/topic-treemap.models';
-import {
- TopicWordCloudDialogComponent,
- TopicWordCloudDialogData,
-} from './topic-wordcloud-dialog/topic-wordcloud-dialog.component';
-import {
- BmbfProjectStatusStatistics,
- BundProjectTopics,
- DashboardInstitution,
- DashboardPeriodBounds,
- DashboardStatisticValue,
- DashboardStatistics,
- DashboardStatisticsService,
- DfgProjectStatusStatistics,
- DfgProjectTopic,
- DfgProjectTopics,
- EuProjectStatusStatistics,
- EuProjectTopics,
- TopAuthor,
- TopAuthorStatistics,
-} from './dashboard-statistics.service';
-import {
- institutionPersonListQueryParamsForPeriod,
- PersonListQueryParams,
-} from '../../shared/person-list-query-params';
-type DashboardStatisticKey =
- | 'publications'
- | 'persons'
- | 'patents'
- | 'eu_projects'
- | 'bmbf_projects'
- | 'dfg_projects';
-type TopAuthorDataset = {
- title: string;
- subtitle: string;
- icon: string;
- entries: TopAuthor[];
- stripAuthorTitle?: boolean;
-};
-type DashboardPeriodMode =
- | 'all_time'
- | 'last_10_years'
- | 'last_5_years'
- | 'custom';
+import { Component, OnInit } from '@angular/core';
+import { ActivatedRoute, Router } from '@angular/router';
+import { DashboardPeriodBounds } from './dashboard-statistics.service';
+import { DashboardFilterComponent } from './components/dashboard-filter/dashboard-filter.component';
+import { DashboardStatisticsGridComponent } from './components/dashboard-statistics-grid/dashboard-statistics-grid.component';
+import { DashboardTopAuthorsComponent } from './components/dashboard-top-authors/dashboard-top-authors.component';
+import { ProjectTopicsComponent } from './components/project-topics/project-topics.component';
+import { DashboardProjectStatusComponent } from './components/dashboard-project-status/dashboard-project-status.component';
+import { DashboardFieldTreemapComponent } from './components/dashboard-field-treemap/dashboard-field-treemap.component';
+import { DashboardInstitutionTabsComponent } from './components/dashboard-institution-tabs/dashboard-institution-tabs.component';
+import { DashboardFacade } from './services/dashboard.facade';
+import { DashboardPeriodMode } from './dashboard.models';
+
@Component({
selector: 'dashboard',
imports: [
- DecimalPipe,
- MatFormFieldModule,
- MatIconModule,
- MatSelectModule,
- MatTooltipModule,
- ComponentTooltipDirective,
- RouterLink,
- LoadingComponent,
- EuProjectStatusChartComponent,
- TopicTreemapComponent,
- YearRangeSliderComponent,
+ DashboardFilterComponent,
+ DashboardStatisticsGridComponent,
+ DashboardTopAuthorsComponent,
+ ProjectTopicsComponent,
+ DashboardProjectStatusComponent,
+ DashboardFieldTreemapComponent,
+ DashboardInstitutionTabsComponent,
],
templateUrl: './dashboard.component.html',
styleUrl: './dashboard.component.scss',
+ providers: [DashboardFacade],
})
-export class DashboardComponent implements OnInit, AfterViewInit {
- @ViewChild('analyticalInstitutionTabList')
- private analyticalInstitutionTabList?: ElementRef