created single BUND project component
This commit is contained in:
@@ -0,0 +1,357 @@
|
||||
<div class="detail-page">
|
||||
<div class="page-header">
|
||||
<div class="breadcrumb">
|
||||
<span>Bund Projekte</span>
|
||||
<mat-icon>chevron_right</mat-icon>
|
||||
<span>Projektdetails</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (bundProject) {
|
||||
<div class="project-hero">
|
||||
<div class="hero-content">
|
||||
<div class="eyebrow">
|
||||
<span class="project-badge">Bund Projekt</span>
|
||||
<span class="project-id">ID: {{ bundProject.funding_reference }}</span>
|
||||
<!-- @if (isNewProject()) {
|
||||
<span class="new-badge">Neu</span>
|
||||
} -->
|
||||
</div>
|
||||
<h1>{{ bundProject.title || 'Ohne Titel' }}</h1>
|
||||
@if (bundProject.funding_reference) {
|
||||
<p class="project-reference">
|
||||
<strong>{{ bundProject.funding_type }}</strong>
|
||||
</p>
|
||||
}
|
||||
<div class="hero-actions">
|
||||
<!-- @if (bundProject.project_agency) {
|
||||
<div class="agency-info" (click)="searchForAgency(bundProject.project_agency)">
|
||||
<mat-icon>account_balance</mat-icon>
|
||||
<span>{{ bundProject.project_agency_fullname || bundProject.project_agency }}</span>
|
||||
</div>
|
||||
} -->
|
||||
<!-- @if (bundProject.funding_type) {
|
||||
<div class="funding-type-info" (click)="searchForFundingType(bundProject.funding_type)">
|
||||
<mat-icon>category</mat-icon>
|
||||
<span>{{ bundProject.funding_type }}</span>
|
||||
</div>
|
||||
} -->
|
||||
</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>
|
||||
<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>
|
||||
<span>Enddatum</span>
|
||||
</div>
|
||||
</div>
|
||||
@if (bundProject.funding_amount) {
|
||||
<div class="metric-item">
|
||||
<mat-icon>paid</mat-icon>
|
||||
<div class="metric-content">
|
||||
<strong>{{ getFundingAmountDisplay() }}</strong>
|
||||
<span>Fördersumme</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.funding_profile) {
|
||||
<div class="metric-item">
|
||||
<mat-icon>assignment</mat-icon>
|
||||
<div class="metric-content">
|
||||
<strong>{{ bundProject.funding_profile }}</strong>
|
||||
<span>Förderprofil</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (bundProject.description) {
|
||||
<mat-card appearance="outlined" class="card description-card">
|
||||
<div class="section-header">
|
||||
<mat-icon>description</mat-icon>
|
||||
<h2>Beschreibung</h2>
|
||||
</div>
|
||||
<p class="description-text">{{ bundProject.description }}</p>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<div class="content-grid">
|
||||
<main class="main-content">
|
||||
<!-- Beteiligte Personen -->
|
||||
@if (getAssociatedPersons().length > 0) {
|
||||
<mat-card appearance="outlined" class="card">
|
||||
<div class="section-header">
|
||||
<mat-icon>people</mat-icon>
|
||||
<h2>Beteiligte Personen</h2>
|
||||
<span class="count-badge">{{ getAssociatedPersons().length }}</span>
|
||||
</div>
|
||||
<div class="person-grid">
|
||||
@for (person of getAssociatedPersons(); track person) {
|
||||
<div class="person-item" (click)="searchForPersonName(person)">
|
||||
<div class="avatar">{{ getInitials(person) }}</div>
|
||||
<div class="person-name">{{ person }}</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<!-- Beteiligte Institutionen -->
|
||||
@if (getInstitutions().length > 0) {
|
||||
<mat-card appearance="outlined" class="card">
|
||||
<div class="section-header">
|
||||
<mat-icon>business</mat-icon>
|
||||
<h2>Beteiligte Institutionen</h2>
|
||||
<span class="count-badge">{{ getInstitutions().length }}</span>
|
||||
</div>
|
||||
<div class="institution-grid">
|
||||
@for (institution of getInstitutions(); track institution) {
|
||||
<div class="institution-item" (click)="searchForInstitutionName(institution)">
|
||||
<mat-icon>apartment</mat-icon>
|
||||
<span>{{ institution }}</span>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<!-- Joint Project Information -->
|
||||
@if (bundProject.joint_project) {
|
||||
<mat-card appearance="outlined" class="card">
|
||||
<div class="section-header">
|
||||
<mat-icon>groups</mat-icon>
|
||||
<h2>Gemeinschaftsprojekt</h2>
|
||||
</div>
|
||||
<div class="joint-project-content">
|
||||
<mat-icon>link</mat-icon>
|
||||
<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) {
|
||||
<mat-card appearance="outlined" class="card">
|
||||
<div class="section-header">
|
||||
<mat-icon>organization</mat-icon>
|
||||
<h2>Organisation</h2>
|
||||
</div>
|
||||
<dl class="details-list">
|
||||
@if (bundProject.executing_agency) {
|
||||
<div class="detail-row">
|
||||
<dt>Ausführende Stelle</dt>
|
||||
<dd class="clickable" (click)="searchForAgency(bundProject.executing_agency)">
|
||||
{{ bundProject.executing_agency }}
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.funding_recipient) {
|
||||
<div class="detail-row">
|
||||
<dt>Förderempfänger</dt>
|
||||
<dd>{{ bundProject.funding_recipient }}</dd>
|
||||
</div>
|
||||
}
|
||||
@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>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.department) {
|
||||
<div class="detail-row">
|
||||
<dt>Abteilung</dt>
|
||||
<dd>{{ bundProject.department_fullname || bundProject.department }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.division) {
|
||||
<div class="detail-row">
|
||||
<dt>Division</dt>
|
||||
<dd>{{ bundProject.division }}</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<!-- Standort -->
|
||||
@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>
|
||||
<h2>Standort</h2>
|
||||
</div>
|
||||
<dl class="details-list">
|
||||
@if (bundProject.location) {
|
||||
<div class="detail-row">
|
||||
<dt>Standort</dt>
|
||||
<dd class="clickable" (click)="searchForLocation(bundProject.location)">
|
||||
{{ bundProject.location }}
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.municipality) {
|
||||
<div class="detail-row">
|
||||
<dt>Gemeinde</dt>
|
||||
<dd>{{ bundProject.municipality }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.state) {
|
||||
<div class="detail-row">
|
||||
<dt>Bundesland</dt>
|
||||
<dd class="clickable" (click)="searchForState(bundProject.state)">
|
||||
{{ bundProject.state }}
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.country) {
|
||||
<div class="detail-row">
|
||||
<dt>Land</dt>
|
||||
<dd>{{ bundProject.country }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.municipality_code) {
|
||||
<div class="detail-row">
|
||||
<dt>Gemeindeschlüssel</dt>
|
||||
<dd>{{ bundProject.municipality_code }}</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<!-- Zusätzliche Informationen -->
|
||||
@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>
|
||||
<h2>Weitere Informationen</h2>
|
||||
</div>
|
||||
<dl class="details-list">
|
||||
@if (bundProject.performance_plan_code) {
|
||||
<div class="detail-row">
|
||||
<dt>Leistungsplancode</dt>
|
||||
<dd>{{ bundProject.performance_plan_code }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.performance_plan_fullname) {
|
||||
<div class="detail-row">
|
||||
<dt>Leistungsplan</dt>
|
||||
<dd>{{ bundProject.performance_plan_fullname }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.publication_date) {
|
||||
<div class="detail-row">
|
||||
<dt>Veröffentlichungsdatum</dt>
|
||||
<dd>{{ bundProject.publication_date }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (bundProject.record_date) {
|
||||
<div class="detail-row">
|
||||
<dt>Datensatzdatum</dt>
|
||||
<dd>{{ bundProject.record_date }}</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</mat-card>
|
||||
}
|
||||
</aside>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="error-container">
|
||||
<div class="error-state">
|
||||
<mat-icon>error_outline</mat-icon>
|
||||
<p>Bund Projekt nicht gefunden.</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,527 @@
|
||||
// Complete SCSS with all styles including clickable elements
|
||||
|
||||
.detail-page {
|
||||
padding: 28px 32px 42px;
|
||||
max-width: 100%;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
gap: 18px;
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.back-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
color: var(--sg-text);
|
||||
cursor: pointer;
|
||||
font-size: 14px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.back-link:hover {
|
||||
background: #f5f7fa;
|
||||
border-color: #b8c5d6;
|
||||
}
|
||||
|
||||
.back-link mat-icon {
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.breadcrumb {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.breadcrumb mat-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.breadcrumb span:last-child {
|
||||
color: var(--sg-text);
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.project-hero {
|
||||
background: #f8fafc;
|
||||
border: 1px solid #d9e2f0;
|
||||
border-radius: var(--sg-radius-md);
|
||||
padding: 28px 32px;
|
||||
margin-bottom: 28px;
|
||||
}
|
||||
|
||||
.hero-content {
|
||||
margin-bottom: 24px;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
margin-bottom: 12px;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.project-badge {
|
||||
display: inline-block;
|
||||
padding: 4px 12px;
|
||||
background: #e8edf5;
|
||||
color: var(--sg-text);
|
||||
border-radius: var(--sg-radius-sm);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
.project-id {
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.new-badge {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
background: #27ae60;
|
||||
color: #fff;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.5px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 26px;
|
||||
line-height: 1.3;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.project-reference {
|
||||
margin: 0 0 16px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.agency-info,
|
||||
.funding-type-info {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 16px;
|
||||
background: #fff;
|
||||
border: 1px solid #d9e2f0;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: var(--sg-text);
|
||||
font-size: 14px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.agency-info:hover,
|
||||
.funding-type-info:hover {
|
||||
background: #f5f7fa;
|
||||
border-color: #b8c5d6;
|
||||
}
|
||||
|
||||
.agency-info mat-icon,
|
||||
.funding-type-info mat-icon {
|
||||
color: var(--sg-text-muted);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 20px;
|
||||
}
|
||||
|
||||
.metrics-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
|
||||
gap: 16px;
|
||||
padding-top: 20px;
|
||||
border-top: 1px solid #d9e2f0;
|
||||
}
|
||||
|
||||
.metric-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.metric-item mat-icon {
|
||||
color: var(--sg-text-muted);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
font-size: 24px;
|
||||
}
|
||||
|
||||
.metric-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.metric-content strong {
|
||||
font-size: 15px;
|
||||
color: var(--sg-text);
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.metric-content span {
|
||||
font-size: 12px;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.card {
|
||||
margin-bottom: 24px;
|
||||
border-color: #d9e2f0 !important;
|
||||
border-radius: var(--sg-radius-md) !important;
|
||||
}
|
||||
|
||||
.card ::ng-deep .mat-mdc-card-content {
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
.section-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 16px 20px 12px;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
}
|
||||
|
||||
.section-header mat-icon {
|
||||
color: var(--sg-text-muted);
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.section-header h2 {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
font-weight: 600;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.count-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-width: 24px;
|
||||
height: 24px;
|
||||
padding: 0 8px;
|
||||
margin-left: auto;
|
||||
background: #e8edf5;
|
||||
border-radius: 12px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.description-text {
|
||||
padding: 16px 20px 20px;
|
||||
margin: 0;
|
||||
color: var(--sg-text);
|
||||
font-size: 14px;
|
||||
line-height: 1.6;
|
||||
}
|
||||
|
||||
.content-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 2fr 1fr;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.main-content {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.sidebar {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 24px;
|
||||
}
|
||||
|
||||
.person-grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
|
||||
gap: 12px;
|
||||
padding: 16px 20px 20px;
|
||||
}
|
||||
|
||||
.person-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.person-item:hover {
|
||||
background: #f8fafc;
|
||||
border-color: #b8c5d6;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.avatar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
border-radius: 50%;
|
||||
background: #e8edf5;
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
font-weight: 600;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.person-name {
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.institution-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 8px;
|
||||
padding: 16px 20px 20px;
|
||||
}
|
||||
|
||||
.institution-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 10px;
|
||||
padding: 8px 12px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
font-size: 13px;
|
||||
color: var(--sg-text);
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.institution-item:hover {
|
||||
background: #f8fafc;
|
||||
border-color: #b8c5d6;
|
||||
}
|
||||
|
||||
.institution-item mat-icon {
|
||||
color: var(--sg-text-muted);
|
||||
width: 20px;
|
||||
height: 20px;
|
||||
font-size: 20px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.joint-project-content {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 16px 20px 20px;
|
||||
color: var(--sg-text);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.joint-project-content mat-icon {
|
||||
color: var(--sg-text-muted);
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
font-size: 24px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.details-list {
|
||||
margin: 0;
|
||||
padding: 16px 20px 20px;
|
||||
}
|
||||
|
||||
.detail-row {
|
||||
display: grid;
|
||||
grid-template-columns: 140px 1fr;
|
||||
gap: 12px;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid #f0f2f5;
|
||||
}
|
||||
|
||||
.detail-row:last-child {
|
||||
border-bottom: none;
|
||||
}
|
||||
|
||||
.detail-row dt {
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.detail-row dd {
|
||||
margin: 0;
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
word-break: break-word;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.detail-row dd.clickable {
|
||||
cursor: pointer;
|
||||
transition: color 0.2s;
|
||||
}
|
||||
|
||||
.detail-row dd.clickable:hover {
|
||||
color: var(--sg-primary, #0066cc);
|
||||
}
|
||||
|
||||
.detail-row dd.clickable:hover .search-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.search-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
font-size: 16px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.detail-row dd:hover .search-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.empty-state {
|
||||
padding: 20px;
|
||||
text-align: center;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.error-container {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
min-height: 400px;
|
||||
}
|
||||
|
||||
.error-state {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
color: var(--sg-text-muted);
|
||||
}
|
||||
|
||||
.error-state mat-icon {
|
||||
width: 48px;
|
||||
height: 48px;
|
||||
font-size: 48px;
|
||||
color: #e74c3c;
|
||||
}
|
||||
|
||||
.error-state p {
|
||||
margin: 0;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
// Clickable external link styling
|
||||
.external-link {
|
||||
color: var(--sg-primary, #0066cc);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
.external-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.content-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 20px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 768px) {
|
||||
.detail-page {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.page-header {
|
||||
flex-direction: column;
|
||||
align-items: flex-start;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
.project-hero {
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.metrics-grid {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 12px;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.detail-row {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 4px;
|
||||
}
|
||||
|
||||
.person-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
gap: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.metrics-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.agency-info,
|
||||
.funding-type-info {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,140 @@
|
||||
import { Component, OnInit, inject } from '@angular/core';
|
||||
import { ActivatedRoute } from '@angular/router';
|
||||
import { CommonModule } from '@angular/common';
|
||||
import { MatCardModule } from '@angular/material/card';
|
||||
import { MatIconModule } from '@angular/material/icon';
|
||||
import { BundProjectDetails } from '../../../api/model/bundProjectDetails';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-bund-details',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatCardModule, MatIconModule],
|
||||
templateUrl: './bund-details.component.html',
|
||||
styleUrl: './bund-details.component.scss',
|
||||
})
|
||||
export class BundDetailsComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
bundProject: BundProjectDetails | undefined;
|
||||
|
||||
constructor(private router: Router) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.data.subscribe(({ bundSingleProject }) => {
|
||||
console.log('Bund Project:', bundSingleProject);
|
||||
this.bundProject = bundSingleProject;
|
||||
});
|
||||
}
|
||||
|
||||
getInitials(name: string | null | undefined): string {
|
||||
if (!name) return '';
|
||||
const parts = name.trim().split(/\s+/);
|
||||
if (parts.length > 1) {
|
||||
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
||||
}
|
||||
return parts[0][0].toUpperCase();
|
||||
}
|
||||
|
||||
getFundingStatus(fundingEndDate: string | null | undefined): string {
|
||||
if (!fundingEndDate) return 'N/A';
|
||||
if (fundingEndDate === '2999') return 'laufend';
|
||||
const year = parseInt(fundingEndDate, 10);
|
||||
if (isNaN(year)) return fundingEndDate;
|
||||
return year >= new Date().getFullYear()
|
||||
? `${fundingEndDate} (laufend)`
|
||||
: `${fundingEndDate} (abgeschlossen)`;
|
||||
}
|
||||
|
||||
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
|
||||
}).format(amount);
|
||||
}
|
||||
|
||||
searchForPersonName(personName: string): void {
|
||||
this.router.navigate(['/persons'], {
|
||||
queryParams: {
|
||||
query: personName
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchForInstitutionName(institutionName: string): void {
|
||||
this.router.navigate(['/institutions'], {
|
||||
queryParams: {
|
||||
search: institutionName
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchForLocation(location: string): void {
|
||||
this.router.navigate(['/bund-projects'], {
|
||||
queryParams: {
|
||||
location: location
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchForState(state: string): void {
|
||||
this.router.navigate(['/bund-projects'], {
|
||||
queryParams: {
|
||||
state: state
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchForFundingType(fundingType: string): void {
|
||||
this.router.navigate(['/bund-projects'], {
|
||||
queryParams: {
|
||||
fundingType: fundingType
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchForAgency(agency: string): void {
|
||||
this.router.navigate(['/bund-projects'], {
|
||||
queryParams: {
|
||||
agency: agency
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* All associated persons as a simple list.
|
||||
*/
|
||||
getAssociatedPersons(): string[] {
|
||||
return this.bundProject?.associated_persons || [];
|
||||
}
|
||||
|
||||
/**
|
||||
* All institutions as a simple list.
|
||||
*/
|
||||
getInstitutions(): string[] {
|
||||
return this.bundProject?.institutions || [];
|
||||
}
|
||||
|
||||
/**
|
||||
* Check if project is new
|
||||
*/
|
||||
isNewProject(): boolean {
|
||||
return this.bundProject?.is_new === true;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get display name for funding amount
|
||||
*/
|
||||
getFundingAmountDisplay(): string {
|
||||
if (!this.bundProject?.funding_amount) return 'N/A';
|
||||
return this.formatCurrency(this.bundProject.funding_amount);
|
||||
}
|
||||
|
||||
goBack(): void {
|
||||
window.history.back();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user