Files
smartguide/webapp/src/app/modules/dashboard/dashboard.component.html
T
farajollahi d9e91eebe3
LocationBasedServices/smartguide/pipeline/head This commit looks good
LocationBasedServices/smartguide/pipeline/pr-dev Build started...
Merge branch 'dev' into fix-analyses-dashboard
# Conflicts:
#	webapp/src/app/modules/dashboard/dashboard.component.ts
2026-07-24 20:58:53 +02:00

348 lines
11 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
<div class="dashboard-wrapper">
<section class="statistics-grid" aria-label="Kennzahlen">
<a
class="statistics-card"
[routerLink]="['/institution', institutionRouteId(), 'publications']"
[class.disabled]="!institutionRouteId()"
[attr.aria-disabled]="!institutionRouteId()"
[attr.aria-label]="
'Publikationen von ' + organizationName() + ' anzeigen'
">
<div class="statistics-icon statistics-icon--publications">
<mat-icon>menu_book</mat-icon>
</div>
<div>
<span>Publikationen</span>
<strong>
{{
isStatisticLoading('publications')
? '…'
: ((statistics?.publications | number) ?? '–')
}}
</strong>
</div>
</a>
<a
class="statistics-card"
[routerLink]="['/institution', institutionRouteId(), 'patents']"
[class.disabled]="!institutionRouteId()"
[attr.aria-disabled]="!institutionRouteId()"
[attr.aria-label]="'Patente von ' + organizationName() + ' anzeigen'">
<div class="statistics-icon statistics-icon--patents">
<mat-icon>description</mat-icon>
</div>
<div>
<span>Patente</span>
<strong>
{{
isStatisticLoading('patents')
? '…'
: ((statistics?.patents | number) ?? '–')
}}
</strong>
</div>
</a>
<a
class="statistics-card"
routerLink="/persons"
[queryParams]="personListQueryParams()"
[attr.aria-label]="'Personen von ' + organizationName() + ' anzeigen'">
<div class="statistics-icon statistics-icon--persons">
<mat-icon>groups</mat-icon>
</div>
<div>
<span>Personen</span>
<strong>
{{
isStatisticLoading('persons')
? '…'
: ((statistics?.persons | number) ?? '–')
}}
</strong>
</div>
</a>
<a
class="statistics-card"
routerLink="/projects"
[queryParams]="{ selected_project_types: 'eu' }"
aria-label="EU-Projekte anzeigen">
<div class="statistics-icon statistics-icon--eu-projects">
<mat-icon>public</mat-icon>
</div>
<div>
<span>EU-Projekte</span>
<strong>
{{
isStatisticLoading('eu_projects')
? '…'
: ((statistics?.eu_projects | number) ?? '–')
}}
</strong>
</div>
</a>
<a
class="statistics-card"
routerLink="/projects"
[queryParams]="{ selected_project_types: 'bund' }"
aria-label="Bund-Projekte anzeigen">
<div class="statistics-icon statistics-icon--bund-projects">
<mat-icon>account_balance</mat-icon>
</div>
<div>
<span>Bund-Projekte</span>
<strong>
{{
isStatisticLoading('bmbf_projects')
? '…'
: ((statistics?.bmbf_projects | number) ?? '–')
}}
</strong>
</div>
</a>
<a
class="statistics-card"
routerLink="/projects"
[queryParams]="{ selected_project_types: 'dfg' }"
aria-label="DFG-Projekte anzeigen">
<div class="statistics-icon statistics-icon--dfg-projects">
<mat-icon>science</mat-icon>
</div>
<div>
<span>DFG-Projekte</span>
<strong>
{{
isStatisticLoading('dfg_projects')
? '…'
: ((statistics?.dfg_projects | number) ?? '–')
}}
</strong>
</div>
</a>
</section>
@if (statisticsError) {
<p class="statistics-error">Die Kennzahlen konnten nicht geladen werden.</p>
}
@if (
euProjectStatusesLoading ||
bmbfProjectStatusesLoading ||
euProjectStatusesError ||
bmbfProjectStatusesError ||
(euProjectStatuses && bmbfProjectStatuses)
) {
<section class="topic-heatmap-section">
<header class="topic-heatmap-header">
<div>
<h2>Projektstatus nach Fördergeber</h2>
<p>
Laufende, kommende und abgeschlossene EU- und Bund-Projekte Ihrer Organisation.
</p>
</div>
@if (euProjectStatuses && bmbfProjectStatuses) {
<div class="project-status-summary">
<span>
EU:
{{
euProjectStatuses.ongoing +
euProjectStatuses.upcoming +
euProjectStatuses.completed | number
}}
</span>
<span>
Bund:
{{
bmbfProjectStatuses.ongoing +
bmbfProjectStatuses.upcoming +
bmbfProjectStatuses.completed | number
}}
</span>
</div>
}
</header>
@if (euProjectStatusesLoading || bmbfProjectStatusesLoading) {
<div class="project-status-loading" role="status" aria-live="polite">
<app-loading
text="Projektstatus wird geladen …"
icon="stacked_bar_chart"
size="64"
diameter="64"></app-loading>
</div>
} @else if (euProjectStatusesError || bmbfProjectStatusesError) {
<p class="statistics-error">
Der Status der EU- und Bund-Projekte konnte nicht geladen werden.
</p>
} @else if (euProjectStatuses && bmbfProjectStatuses) {
<app-eu-project-status-chart
[statuses]="euProjectStatuses"
[bmbfStatuses]="bmbfProjectStatuses"></app-eu-project-status-chart>
}
</section>
}
@if (topicTreemapLoading || topicTreemapError || hasTopicTreemapData()) {
<section class="topic-heatmap-section">
<header class="topic-heatmap-header">
<div>
<h2>Field Treemap</h2>
<p>Publikationen Ihrer Organisation nach Field.</p>
</div>
<div class="topic-treemap-year-slider">
<app-year-range-slider
[minYear]="topicTreemapMinYear"
[maxYear]="topicTreemapMaxYear"
[(startYear)]="topicTreemapFromYear"
[(endYear)]="topicTreemapToYear"
(startYearChange)="onTopicTreemapRangeChange()"
(endYearChange)="onTopicTreemapRangeChange()">
</app-year-range-slider>
</div>
</header>
@if (topicTreemapLoading) {
<div class="topic-heatmap-loading" role="status" aria-live="polite">
<app-loading
text="Treemap-Daten für den gewählten Zeitraum werden geladen …"
icon="account_tree"
size="72"
diameter="72"></app-loading>
</div>
} @else if (topicTreemapError) {
<p class="statistics-error">
Die Field-Treemap konnte nicht geladen werden.
</p>
} @else {
<app-topic-treemap
[data]="topicTreemap"
[selectedNodeId]="selectedTopicTreemapNode"
(selectedNodeIdChange)="onTopicTreemapNodeChange($event)"
(topicSelect)="onTopicTreemapTopicSelect($event)">
</app-topic-treemap>
}
</section>
}
@if (dfgTopicsLoading || dfgTopicsError || dfgProjectTopics) {
<section class="topic-heatmap-section">
<header class="topic-heatmap-header">
<div>
<h2>DFG-Projekt-Topics</h2>
<p>
Verteilung der gematchten Topics aus den DFG-Projekten Ihrer Organisation.
</p>
</div>
@if (dfgProjectTopics) {
<p class="dfg-topic-summary">
{{ dfgProjectTopics.matched_project_count | number }} von
{{ dfgProjectTopics.project_count | number }} Projekten gematcht
</p>
}
</header>
@if (dfgTopicsLoading) {
<div class="topic-heatmap-loading" role="status" aria-live="polite">
<app-loading
text="DFG-Topics werden geladen …"
icon="account_tree"
size="72"
diameter="72"></app-loading>
</div>
} @else if (dfgTopicsError) {
<p class="statistics-error">
Das DFG-Topic-Diagramm konnte nicht geladen werden.
</p>
} @else {
<app-dfg-topic-donut
[topics]="dfgProjectTopics?.topics ?? []"></app-dfg-topic-donut>
}
</section>
}
@if (topAuthorsLoading || topAuthorsError || hasTopAuthorData()) {
<section class="top-authors-section">
<header class="top-authors-header">
<div>
<h2>Top 10 Personen aller Zeiten</h2>
<p>Nach Anzahl der Works, Patente und News Ihrer Organisation.</p>
</div>
<div class="top-authors-period-toggle" aria-label="Works-Zeitraum">
<button
type="button"
[class.active]="topAuthorsWorksPeriod === 'all_time'"
(click)="setTopAuthorsWorksPeriod('all_time')">
Alle Zeiten
</button>
<button
type="button"
[class.active]="topAuthorsWorksPeriod === 'last_5_years'"
(click)="setTopAuthorsWorksPeriod('last_5_years')">
Letzte 5 Jahre
</button>
</div>
</header>
@if (topAuthorsError) {
<p class="statistics-error">
Die Autorenstatistiken konnten nicht geladen werden.
</p>
} @else {
<div class="top-authors-grid" [class.loading]="topAuthorsLoading">
@for (dataset of visibleTopAuthorDatasets(); track dataset.title) {
<article class="top-authors-chart">
<h3>
<mat-icon>{{ dataset.icon }}</mat-icon
>{{ dataset.title }}
</h3>
@for (
entry of dataset.entries;
track entry.id || entry.name;
let rank = $index
) {
<div class="author-bar-row">
<span class="author-rank">{{ rank + 1 }}</span>
<div class="author-bar-content">
<div class="author-bar-label">
@if (entry.id) {
<a
class="author-link"
[routerLink]="['/person', entry.id, 'overview']"
[title]="entry.name">
{{ entry.name }}
</a>
} @else {
<span [title]="entry.name">{{ entry.name }}</span>
}
<strong>{{ entry.count | number }}</strong>
</div>
<div class="author-bar-track">
<span
class="author-bar-fill"
[style.width.%]="
authorBarWidth(dataset.entries, entry.count)
"></span>
</div>
</div>
</div>
} @empty {
<p class="empty-chart">
{{
topAuthorsLoading
? 'Wird geladen …'
: 'Keine Daten vorhanden.'
}}
</p>
}
</article>
}
</div>
}
</section>
}
</div>