some layout adjustments
LocationBasedServices/smartguide/pipeline/head This commit looks good

This commit is contained in:
2026-06-19 01:28:48 +02:00
parent 8d4045d428
commit 226ab22e69
3 changed files with 190 additions and 133 deletions
@@ -12,7 +12,9 @@
<div class="hero-content">
<div class="eyebrow">
<span class="project-badge">Bund Projekt</span>
<span class="project-id">ID: {{ bundProject.funding_reference }}</span>
<span class="project-id"
>ID: {{ bundProject.funding_reference }}</span
>
<!-- @if (isNewProject()) {
<span class="new-badge">Neu</span>
} -->
@@ -38,19 +40,21 @@
} -->
</div>
</div>
<div class="metrics-grid">
<div class="metric-item">
<mat-icon>calendar_today</mat-icon>
<div class="metric-content">
<strong>{{ bundProject.funding_start_date || 'N/A' }}</strong>
<strong>{{ getStartDate() || 'N/A' }}</strong>
<span>Startdatum</span>
</div>
</div>
<div class="metric-item">
<mat-icon>event_busy</mat-icon>
<div class="metric-content">
<strong>{{ getFundingStatus(bundProject.funding_end_date) }}</strong>
<strong>{{
getFundingStatus(getEndDate())
}}</strong>
<span>Enddatum</span>
</div>
</div>
@@ -93,7 +97,9 @@
<div class="section-header">
<mat-icon>people</mat-icon>
<h2>Beteiligte Personen</h2>
<span class="count-badge">{{ getAssociatedPersons().length }}</span>
<span class="count-badge">{{
getAssociatedPersons().length
}}</span>
</div>
<div class="person-grid">
@for (person of getAssociatedPersons(); track person) {
@@ -116,7 +122,9 @@
</div>
<div class="institution-grid">
@for (institution of getInstitutions(); track institution) {
<div class="institution-item" (click)="searchForInstitutionName(institution)">
<div
class="institution-item"
(click)="searchForInstitutionName(institution)">
<mat-icon>apartment</mat-icon>
<span>{{ institution }}</span>
</div>
@@ -125,7 +133,7 @@
</mat-card>
}
<!-- Joint Project Information -->
<!-- Joint Project Information
@if (bundProject.joint_project) {
<mat-card appearance="outlined" class="card">
<div class="section-header">
@@ -137,84 +145,15 @@
<span>{{ bundProject.joint_project }}</span>
</div>
</mat-card>
}
</main>
<aside class="sidebar">
<!-- Projektdetails -->
<mat-card appearance="outlined" class="card details-card">
<div class="section-header">
<mat-icon>info</mat-icon>
<h2>Projektdetails</h2>
</div>
<dl class="details-list">
<div class="detail-row">
<dt>Projekt ID</dt>
<dd>{{ bundProject.funding_reference|| 'N/A' }}</dd>
</div>
<!-- <div class="detail-row">
<dt>Titel</dt>
<dd>{{ bundProject.title || 'N/A' }}</dd>
</div> -->
<!-- @if (bundProject.funding_reference) {
<div class="detail-row">
<dt>Förderreferenz</dt>
<dd>{{ bundProject.funding_reference }}</dd>
</div>
} -->
@if (bundProject.funding_type) {
<div class="detail-row">
<dt>Förderart</dt>
<dd class="clickable" (click)="searchForFundingType(bundProject.funding_type)">
{{ bundProject.funding_type }}
<mat-icon class="search-icon">search</mat-icon>
</dd>
</div>
}
@if (bundProject.funding_profile) {
<div class="detail-row">
<dt>Förderprofil</dt>
<dd>{{ bundProject.funding_profile }}</dd>
</div>
}
@if (bundProject.funding_amount) {
<div class="detail-row">
<dt>Fördersumme</dt>
<dd>{{ getFundingAmountDisplay() }}</dd>
</div>
}
@if (bundProject.funding_amount) {
<div class="detail-row">
<dt>Agency</dt>
<dd> {{ bundProject.project_agency_fullname || bundProject.project_agency }}</dd>
</div>
}
<div class="detail-row">
<dt>Startdatum</dt>
<dd>{{ bundProject.funding_start_date || 'N/A' }}</dd>
</div>
<div class="detail-row">
<dt>Enddatum</dt>
<dd>{{ getFundingStatus(bundProject.funding_end_date) }}</dd>
</div>
@if (bundProject.duration) {
<div class="detail-row">
<dt>Laufzeit</dt>
<dd>{{ bundProject.duration }}</dd>
</div>
}
@if (bundProject.joint_project) {
<div class="detail-row">
<dt>Gemeinschaftsprojekt</dt>
<dd>{{ bundProject.joint_project }}</dd>
</div>
}
</dl>
</mat-card>
} -->
<!-- Organisatorische Details -->
@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
) {
<mat-card appearance="outlined" class="card">
<div class="section-header">
<mat-icon>organization</mat-icon>
@@ -224,9 +163,9 @@
@if (bundProject.executing_agency) {
<div class="detail-row">
<dt>Ausführende Stelle</dt>
<dd class="clickable" (click)="searchForAgency(bundProject.executing_agency)">
<dd>
{{ bundProject.executing_agency }}
<mat-icon class="search-icon">search</mat-icon>
</dd>
</div>
}
@@ -239,16 +178,23 @@
@if (bundProject.project_agency) {
<div class="detail-row">
<dt>Projektagentur</dt>
<dd class="clickable" (click)="searchForAgency(bundProject.project_agency)">
{{ bundProject.project_agency_fullname || bundProject.project_agency }}
<mat-icon class="search-icon">search</mat-icon>
<dd>
{{
bundProject.project_agency_fullname ||
bundProject.project_agency
}}
</dd>
</div>
}
@if (bundProject.department) {
<div class="detail-row">
<dt>Abteilung</dt>
<dd>{{ bundProject.department_fullname || bundProject.department }}</dd>
<dd>
{{
bundProject.department_fullname || bundProject.department
}}
</dd>
</div>
}
@if (bundProject.division) {
@@ -262,7 +208,12 @@
}
<!-- Standort -->
@if (bundProject.location || bundProject.municipality || bundProject.state || bundProject.country) {
@if (
bundProject.location ||
bundProject.municipality ||
bundProject.state ||
bundProject.country
) {
<mat-card appearance="outlined" class="card">
<div class="section-header">
<mat-icon>location_on</mat-icon>
@@ -272,9 +223,9 @@
@if (bundProject.location) {
<div class="detail-row">
<dt>Standort</dt>
<dd class="clickable" (click)="searchForLocation(bundProject.location)">
<dd>
{{ bundProject.location }}
<mat-icon class="search-icon">search</mat-icon>
</dd>
</div>
}
@@ -287,9 +238,8 @@
@if (bundProject.state) {
<div class="detail-row">
<dt>Bundesland</dt>
<dd class="clickable" (click)="searchForState(bundProject.state)">
<dd>
{{ bundProject.state }}
<mat-icon class="search-icon">search</mat-icon>
</dd>
</div>
}
@@ -310,7 +260,12 @@
}
<!-- Zusätzliche Informationen -->
@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
) {
<mat-card appearance="outlined" class="card">
<div class="section-header">
<mat-icon>more_info</mat-icon>
@@ -344,6 +299,85 @@
</dl>
</mat-card>
}
</main>
<aside class="sidebar">
<!-- Projektdetails -->
<mat-card appearance="outlined" class="card details-card">
<div class="section-header">
<mat-icon>info</mat-icon>
<h2>Projektdetails</h2>
</div>
<dl class="details-list">
<div class="detail-row">
<dt>Projekt ID</dt>
<dd>{{ bundProject.funding_reference || 'N/A' }}</dd>
</div>
<!-- <div class="detail-row">
<dt>Titel</dt>
<dd>{{ bundProject.title || 'N/A' }}</dd>
</div> -->
<!-- @if (bundProject.funding_reference) {
<div class="detail-row">
<dt>Förderreferenz</dt>
<dd>{{ bundProject.funding_reference }}</dd>
</div>
} -->
@if (bundProject.funding_type) {
<div class="detail-row">
<dt>Förderart</dt>
<dd>
{{ bundProject.funding_type }}
</dd>
</div>
}
@if (bundProject.funding_profile) {
<div class="detail-row">
<dt>Förderprofil</dt>
<dd>{{ bundProject.funding_profile }}</dd>
</div>
}
@if (bundProject.funding_amount) {
<div class="detail-row">
<dt>Fördersumme</dt>
<dd>{{ getFundingAmountDisplay() }}</dd>
</div>
}
@if (bundProject.funding_amount) {
<div class="detail-row">
<dt>Agency</dt>
<dd>
{{
bundProject.project_agency_fullname ||
bundProject.project_agency
}}
</dd>
</div>
}
<!-- <div class="detail-row">
<dt>Startdatum</dt>
<dd>{{ getStartDate() || 'N/A' }}</dd>
</div>
<div class="detail-row">
<dt>Enddatum</dt>
<dd>{{ getFundingStatus(getEndDate()) }}</dd>
</div> -->
@if (getDuration()) {
<div class="detail-row">
<dt>Laufzeit</dt>
<dd>{{ getDuration() }}</dd>
</div>
}
@if (bundProject.joint_project) {
<div class="detail-row">
<dt>Gemeinschaftsprojekt</dt>
<dd>{{ bundProject.joint_project }}</dd>
</div>
}
</dl>
</mat-card>
</aside>
</div>
} @else {
@@ -354,4 +388,4 @@
</div>
</div>
}
</div>
</div>
@@ -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;
}
@@ -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();
}
}
}