From 226ab22e69bb405869fa34305531dc6f11f07bd8 Mon Sep 17 00:00:00 2001 From: genja Date: Fri, 19 Jun 2026 01:28:48 +0200 Subject: [PATCH] some layout adjustments --- .../bund-details/bund-details.component.html | 228 ++++++++++-------- .../bund-details/bund-details.component.scss | 2 +- .../bund-details/bund-details.component.ts | 93 ++++--- 3 files changed, 190 insertions(+), 133 deletions(-) diff --git a/webapp/src/app/modules/person-projects/bund-details/bund-details.component.html b/webapp/src/app/modules/person-projects/bund-details/bund-details.component.html index f3770441..b98a231d 100644 --- a/webapp/src/app/modules/person-projects/bund-details/bund-details.component.html +++ b/webapp/src/app/modules/person-projects/bund-details/bund-details.component.html @@ -12,7 +12,9 @@
Bund Projekt - ID: {{ bundProject.funding_reference }} + ID: {{ bundProject.funding_reference }} @@ -38,19 +40,21 @@ } -->
- +
calendar_today
- {{ bundProject.funding_start_date || 'N/A' }} + {{ getStartDate() || 'N/A' }} Startdatum
event_busy
- {{ getFundingStatus(bundProject.funding_end_date) }} + {{ + getFundingStatus(getEndDate()) + }} Enddatum
@@ -93,7 +97,9 @@
people

Beteiligte Personen

- {{ getAssociatedPersons().length }} + {{ + getAssociatedPersons().length + }}
@for (person of getAssociatedPersons(); track person) { @@ -116,7 +122,9 @@
@for (institution of getInstitutions(); track institution) { -
+
apartment {{ institution }}
@@ -125,7 +133,7 @@ } - + - -
- info -

Projektdetails

-
-
-
-
Projekt ID
-
{{ bundProject.funding_reference|| 'N/A' }}
-
- - - @if (bundProject.funding_type) { -
-
Förderart
-
- {{ bundProject.funding_type }} - search -
-
- } - @if (bundProject.funding_profile) { -
-
Förderprofil
-
{{ bundProject.funding_profile }}
-
- } - @if (bundProject.funding_amount) { -
-
Fördersumme
-
{{ getFundingAmountDisplay() }}
-
- } - @if (bundProject.funding_amount) { -
-
Agency
-
{{ bundProject.project_agency_fullname || bundProject.project_agency }}
-
- } - -
-
Startdatum
-
{{ bundProject.funding_start_date || 'N/A' }}
-
-
-
Enddatum
-
{{ getFundingStatus(bundProject.funding_end_date) }}
-
- @if (bundProject.duration) { -
-
Laufzeit
-
{{ bundProject.duration }}
-
- } - @if (bundProject.joint_project) { -
-
Gemeinschaftsprojekt
-
{{ bundProject.joint_project }}
-
- } -
-
- + } --> - @if (bundProject.executing_agency || bundProject.funding_recipient || bundProject.project_agency || bundProject.department || bundProject.division) { + @if ( + bundProject.executing_agency || + bundProject.funding_recipient || + bundProject.project_agency || + bundProject.department || + bundProject.division + ) {
organization @@ -224,9 +163,9 @@ @if (bundProject.executing_agency) {
Ausführende Stelle
-
+
{{ bundProject.executing_agency }} - search +
} @@ -239,16 +178,23 @@ @if (bundProject.project_agency) {
Projektagentur
-
- {{ bundProject.project_agency_fullname || bundProject.project_agency }} - search +
+ {{ + bundProject.project_agency_fullname || + bundProject.project_agency + }} +
} @if (bundProject.department) {
Abteilung
-
{{ bundProject.department_fullname || bundProject.department }}
+
+ {{ + bundProject.department_fullname || bundProject.department + }} +
} @if (bundProject.division) { @@ -262,7 +208,12 @@ } - @if (bundProject.location || bundProject.municipality || bundProject.state || bundProject.country) { + @if ( + bundProject.location || + bundProject.municipality || + bundProject.state || + bundProject.country + ) {
location_on @@ -272,9 +223,9 @@ @if (bundProject.location) {
Standort
-
+
{{ bundProject.location }} - search +
} @@ -287,9 +238,8 @@ @if (bundProject.state) {
Bundesland
-
+
{{ bundProject.state }} - search
} @@ -310,7 +260,12 @@ } - @if (bundProject.performance_plan_code || bundProject.performance_plan_fullname || bundProject.publication_date || bundProject.record_date) { + @if ( + bundProject.performance_plan_code || + bundProject.performance_plan_fullname || + bundProject.publication_date || + bundProject.record_date + ) {
more_info @@ -344,6 +299,85 @@ } + + +
} @else { @@ -354,4 +388,4 @@
} -
\ No newline at end of file +
diff --git a/webapp/src/app/modules/person-projects/bund-details/bund-details.component.scss b/webapp/src/app/modules/person-projects/bund-details/bund-details.component.scss index 933a8aa7..1cc4e13f 100644 --- a/webapp/src/app/modules/person-projects/bund-details/bund-details.component.scss +++ b/webapp/src/app/modules/person-projects/bund-details/bund-details.component.scss @@ -370,7 +370,7 @@ h1 { .detail-row { display: grid; grid-template-columns: 140px 1fr; - gap: 12px; + gap: 24px; padding: 8px 0; border-bottom: 1px solid #f0f2f5; } diff --git a/webapp/src/app/modules/person-projects/bund-details/bund-details.component.ts b/webapp/src/app/modules/person-projects/bund-details/bund-details.component.ts index 09469b39..5ad9007b 100644 --- a/webapp/src/app/modules/person-projects/bund-details/bund-details.component.ts +++ b/webapp/src/app/modules/person-projects/bund-details/bund-details.component.ts @@ -47,71 +47,94 @@ export class BundDetailsComponent implements OnInit { formatCurrency(amount: number | null | undefined): string { if (amount === null || amount === undefined) return 'N/A'; - + // Format as Euro with thousands separators return new Intl.NumberFormat('de-DE', { style: 'currency', currency: 'EUR', minimumFractionDigits: 0, - maximumFractionDigits: 0 + maximumFractionDigits: 0, }).format(amount); } searchForPersonName(personName: string): void { this.router.navigate(['/persons'], { queryParams: { - query: personName - } + query: personName, + }, }); } searchForInstitutionName(institutionName: string): void { this.router.navigate(['/institutions'], { queryParams: { - search: institutionName - } + search: institutionName, + }, }); } - searchForLocation(location: string): void { - this.router.navigate(['/bund-projects'], { - queryParams: { - location: location - } - }); - } + // searchForLocation(location: string): void { + // this.router.navigate(['/bund-projects'], { + // queryParams: { + // location: location + // } + // }); + // } - searchForState(state: string): void { - this.router.navigate(['/bund-projects'], { - queryParams: { - state: state - } - }); - } + // searchForState(state: string): void { + // this.router.navigate(['/bund-projects'], { + // queryParams: { + // state: state + // } + // }); + // } - searchForFundingType(fundingType: string): void { - this.router.navigate(['/bund-projects'], { - queryParams: { - fundingType: fundingType - } - }); - } + // searchForFundingType(fundingType: string): void { + // this.router.navigate(['/bund-projects'], { + // queryParams: { + // fundingType: fundingType + // } + // }); + // } - searchForAgency(agency: string): void { - this.router.navigate(['/bund-projects'], { - queryParams: { - agency: agency - } - }); - } + // searchForAgency(agency: string): void { + // this.router.navigate(['/bund-projects'], { + // queryParams: { + // agency: agency + // } + // }); + // } + private formatGermanDate(dateString: string): string { + if (!dateString) return ''; + return new Intl.DateTimeFormat('de-DE', { + day: 'numeric', + month: 'long', + year: 'numeric', + }).format(new Date(dateString)); + } /** * All associated persons as a simple list. */ getAssociatedPersons(): string[] { return this.bundProject?.associated_persons || []; } + getStartDate(): string { + return this.formatGermanDate(this.bundProject?.funding_start_date ?? ''); + } + getEndDate(): string { + return this.formatGermanDate(this.bundProject?.funding_end_date ?? ''); + } + + getDuration(): string { + const start = this.bundProject?.funding_start_date; + const end = this.bundProject?.funding_end_date; + + if (!start || !end) return ''; + + return `von ${this.formatGermanDate(start)} bis ${this.formatGermanDate(end)}`; + } /** * All institutions as a simple list. */ @@ -137,4 +160,4 @@ export class BundDetailsComponent implements OnInit { goBack(): void { window.history.back(); } -} \ No newline at end of file +}