From 22c0d1f83d096d08d022cd3eddd64c63542ace85 Mon Sep 17 00:00:00 2001 From: genja Date: Tue, 10 Nov 2026 02:22:36 +0100 Subject: [PATCH] add more card variatns to dashboard statistic card --- .../dashboard-statistic-card.component.html | 39 +++++++++++++------ .../dashboard-statistic-card.component.scss | 23 ++++++++++- .../dashboard-statistic-card.component.ts | 15 +++++-- 3 files changed, 62 insertions(+), 15 deletions(-) diff --git a/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.html b/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.html index e7407bf5..50299c96 100644 --- a/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.html +++ b/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.html @@ -1,13 +1,4 @@ - +
{{ icon() }}
@@ -15,4 +6,30 @@ {{ label() }} {{ loading() ? '…' : ((value() | number) ?? '–') }} -
+ + +@if (link()) { + + + +} @else { +
+ +
+} diff --git a/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.scss b/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.scss index 37852979..45379a1e 100644 --- a/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.scss +++ b/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.scss @@ -34,6 +34,16 @@ pointer-events: none; } + &--static { + cursor: default; + + &:hover { + border-color: var(--sg-border); + box-shadow: var(--sg-shadow-sm); + transform: none; + } + } + span { display: block; color: var(--sg-text-muted); @@ -69,8 +79,19 @@ } &--bund-projects, - &--dfg-projects { + &--dfg-projects, + &--shortlist { background: var(--sg-warning-soft); color: var(--sg-warning); } + + &--founders { + background: var(--sg-primary-soft); + color: var(--sg-blue-highlight); + } + + &--quality { + background: var(--sg-success-soft); + color: var(--sg-success); + } } diff --git a/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.ts b/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.ts index 16f8758f..e2ddfc07 100644 --- a/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.ts +++ b/webapp/src/app/modules/dashboard/components/dashboard-statistic-card/dashboard-statistic-card.component.ts @@ -1,4 +1,4 @@ -import { DecimalPipe } from '@angular/common'; +import { DecimalPipe, NgTemplateOutlet } from '@angular/common'; import { Component, input } from '@angular/core'; import { MatIconModule } from '@angular/material/icon'; import { MatTooltipModule } from '@angular/material/tooltip'; @@ -10,11 +10,20 @@ export type DashboardStatisticCardVariant = | 'patents' | 'eu-projects' | 'bund-projects' - | 'dfg-projects'; + | 'dfg-projects' + | 'founders' + | 'quality' + | 'shortlist'; @Component({ selector: 'app-dashboard-statistic-card', - imports: [DecimalPipe, MatIconModule, MatTooltipModule, RouterLink], + imports: [ + DecimalPipe, + NgTemplateOutlet, + MatIconModule, + MatTooltipModule, + RouterLink, + ], templateUrl: './dashboard-statistic-card.component.html', styleUrl: './dashboard-statistic-card.component.scss', })