added signle EU project details page component to frontend
This commit is contained in:
@@ -21,6 +21,8 @@ import { BundProjectDetails } from '../model/bundProjectDetails';
|
||||
// @ts-ignore
|
||||
import { BundProjectPage } from '../model/bundProjectPage';
|
||||
// @ts-ignore
|
||||
import { CordisEuProject } from '../model/cordisEuProject';
|
||||
// @ts-ignore
|
||||
import { CordisEuProjectPage } from '../model/cordisEuProjectPage';
|
||||
// @ts-ignore
|
||||
import { DfgProjectDetails } from '../model/dfgProjectDetails';
|
||||
@@ -425,6 +427,62 @@ export class ProjectsService extends BaseService {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get a single EU Cordis project.
|
||||
* Returns a single EU Cordis project based on its ID.
|
||||
* @endpoint get /api/projects/eu/{id}
|
||||
* @param id The ID of the EU Cordis project to retrieve.
|
||||
* @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
|
||||
* @param reportProgress flag to report request and response progress.
|
||||
*/
|
||||
public getSingleEuCordisProject(id: string, observe?: 'body', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<CordisEuProject>;
|
||||
public getSingleEuCordisProject(id: string, observe?: 'response', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpResponse<CordisEuProject>>;
|
||||
public getSingleEuCordisProject(id: string, observe?: 'events', reportProgress?: boolean, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<HttpEvent<CordisEuProject>>;
|
||||
public getSingleEuCordisProject(id: string, observe: any = 'body', reportProgress: boolean = false, options?: {httpHeaderAccept?: 'application/json', context?: HttpContext, transferCache?: boolean}): Observable<any> {
|
||||
if (id === null || id === undefined) {
|
||||
throw new Error('Required parameter id was null or undefined when calling getSingleEuCordisProject.');
|
||||
}
|
||||
|
||||
let localVarHeaders = this.defaultHeaders;
|
||||
|
||||
const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept([
|
||||
'application/json'
|
||||
]);
|
||||
if (localVarHttpHeaderAcceptSelected !== undefined) {
|
||||
localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
|
||||
}
|
||||
|
||||
const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();
|
||||
|
||||
const localVarTransferCache: boolean = options?.transferCache ?? true;
|
||||
|
||||
|
||||
let responseType_: 'text' | 'json' | 'blob' = 'json';
|
||||
if (localVarHttpHeaderAcceptSelected) {
|
||||
if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
|
||||
responseType_ = 'text';
|
||||
} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
|
||||
responseType_ = 'json';
|
||||
} else {
|
||||
responseType_ = 'blob';
|
||||
}
|
||||
}
|
||||
|
||||
let localVarPath = `/api/projects/eu/${this.configuration.encodeParam({name: "id", value: id, in: "path", style: "simple", explode: false, dataType: "string", dataFormat: undefined})}`;
|
||||
const { basePath, withCredentials } = this.configuration;
|
||||
return this.httpClient.request<CordisEuProject>('get', `${basePath}${localVarPath}`,
|
||||
{
|
||||
context: localVarHttpContext,
|
||||
responseType: <any>responseType_,
|
||||
...(withCredentials ? { withCredentials } : {}),
|
||||
headers: localVarHeaders,
|
||||
observe: observe,
|
||||
...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
|
||||
reportProgress: reportProgress
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get bund projects.
|
||||
* Returns a page of bund projects based on the provided pagination parameters and optional institution filter.
|
||||
|
||||
@@ -16,6 +16,7 @@ import { cordisEuProjectPageResolver } from './resolvers/cordis-eu-project-page.
|
||||
import { cordisEuProjectsFundingResolver } from './resolvers/cordis-eu-projects-funding.resolver';
|
||||
import { fundingProjectPageResolver } from './resolvers/funding-project-page.resolver';
|
||||
import { personCordisEuProjectPageResolver } from './resolvers/person-cordis-eu-project-page.resolver';
|
||||
import { euSingleProjectResolver } from './resolvers/eu-single-project-resolver';
|
||||
|
||||
export const routes: Routes = [
|
||||
{
|
||||
@@ -111,7 +112,7 @@ export const routes: Routes = [
|
||||
canActivate: [userGuard],
|
||||
pathMatch: 'full',
|
||||
loadComponent: () =>
|
||||
import('./modules/person-projects/dfg-details/dfg-details.component').then(
|
||||
import('./modules/projects/dfg-details/dfg-details.component').then(
|
||||
(mod) => mod.DfgDetailsComponent,
|
||||
),
|
||||
resolve: {
|
||||
@@ -123,12 +124,24 @@ export const routes: Routes = [
|
||||
canActivate: [userGuard],
|
||||
pathMatch: 'full',
|
||||
loadComponent: () =>
|
||||
import('./modules/person-projects/bund-details/bund-details.component').then(
|
||||
import('./modules/projects/bund-details/bund-details.component').then(
|
||||
(mod) => mod.BundDetailsComponent,
|
||||
),
|
||||
resolve: {
|
||||
bundSingleProject: bundSingleProjectResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'projects/eu/:id',
|
||||
canActivate: [userGuard],
|
||||
pathMatch: 'full',
|
||||
loadComponent: () =>
|
||||
import('./modules/projects/eu-cordis-details/eu-details.component').then(
|
||||
(mod) => mod.EuDetailsComponent,
|
||||
),
|
||||
resolve: {
|
||||
euSingleProject: euSingleProjectResolver,
|
||||
},
|
||||
},
|
||||
{
|
||||
path: 'person/:id',
|
||||
|
||||
@@ -0,0 +1,296 @@
|
||||
<div class="detail-page">
|
||||
<div class="page-header">
|
||||
<div class="breadcrumb">
|
||||
<span>EU Projekte</span>
|
||||
<mat-icon>chevron_right</mat-icon>
|
||||
<span>Projektdetails</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (euProject) {
|
||||
<div class="project-hero">
|
||||
<div class="hero-content">
|
||||
<div class="eyebrow">
|
||||
<span class="project-badge">EU Projekt</span>
|
||||
<span class="project-id">ID: {{ euProject.id }}</span>
|
||||
@if (euProject.rcn) {
|
||||
<span class="project-rcn">RCN: {{ euProject.rcn }}</span>
|
||||
}
|
||||
@if (euProject.acronym) {
|
||||
<span class="project-acronym">{{ euProject.acronym }}</span>
|
||||
}
|
||||
</div>
|
||||
<h1>{{ euProject.title || 'Ohne Titel' }}</h1>
|
||||
@if (euProject.frameworkProgramme) {
|
||||
<p class="project-framework">
|
||||
<strong>Rahmenprogramm:</strong>
|
||||
<span class="framework-tag" (click)="searchByFramework(euProject.frameworkProgramme)">
|
||||
{{ getFrameworkDisplay(euProject.frameworkProgramme) }}
|
||||
</span>
|
||||
</p>
|
||||
}
|
||||
<div class="hero-actions">
|
||||
@if (euProject.status) {
|
||||
<div class="status-badge" [style.background-color]="getStatusColor(euProject.status)" (click)="searchByStatus(euProject.status)">
|
||||
<mat-icon>circle</mat-icon>
|
||||
<span>{{ getStatusDisplay(euProject.status) }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.fundingScheme) {
|
||||
<div class="scheme-info" (click)="searchByFundingScheme(euProject.fundingScheme)">
|
||||
<mat-icon>assignment</mat-icon>
|
||||
<span>{{ getFundingSchemeDisplay(euProject.fundingScheme) }}</span>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.grantDoi) {
|
||||
<a [href]="'https://doi.org/' + euProject.grantDoi" target="_blank" class="doi-link">
|
||||
<mat-icon>link</mat-icon>
|
||||
<span>DOI: {{ euProject.grantDoi }}</span>
|
||||
</a>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="metrics-grid">
|
||||
<div class="metric-item">
|
||||
<mat-icon>calendar_today</mat-icon>
|
||||
<div class="metric-content">
|
||||
<strong>{{ euProject.startDate || 'N/A' }}</strong>
|
||||
<span>Startdatum</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="metric-item">
|
||||
<mat-icon>event_busy</mat-icon>
|
||||
<div class="metric-content">
|
||||
<strong>{{ euProject.endDate || 'N/A' }}</strong>
|
||||
<span>Enddatum</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="metric-item">
|
||||
<mat-icon>access_time</mat-icon>
|
||||
<div class="metric-content">
|
||||
<strong>{{ getFundingStatus(euProject.endDate) }}</strong>
|
||||
<span>Status</span>
|
||||
</div>
|
||||
</div>
|
||||
@if (euProject.ecMaxContribution) {
|
||||
<div class="metric-item">
|
||||
<mat-icon>euro_symbol</mat-icon>
|
||||
<div class="metric-content">
|
||||
<strong>{{ formatCurrency(euProject.ecMaxContribution) }}</strong>
|
||||
<span>EU-Beitrag</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.totalCost) {
|
||||
<div class="metric-item">
|
||||
<mat-icon>attach_money</mat-icon>
|
||||
<div class="metric-content">
|
||||
<strong>{{ formatCurrency(euProject.totalCost) }}</strong>
|
||||
<span>Gesamtkosten</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.masterCall) {
|
||||
<div class="metric-item">
|
||||
<mat-icon>call_split</mat-icon>
|
||||
<div class="metric-content">
|
||||
<strong>{{ euProject.masterCall }}</strong>
|
||||
<span>Master Call</span>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@if (euProject.objective) {
|
||||
<mat-card appearance="outlined" class="card description-card">
|
||||
<div class="section-header">
|
||||
<mat-icon>description</mat-icon>
|
||||
<h2>Projektziel</h2>
|
||||
</div>
|
||||
<p class="description-text">{{ euProject.objective }}</p>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<div class="content-grid">
|
||||
<main class="main-content">
|
||||
<!-- Topics -->
|
||||
@if (euProject.topics) {
|
||||
<mat-card appearance="outlined" class="card">
|
||||
<div class="section-header">
|
||||
<mat-icon>topic</mat-icon>
|
||||
<h2>Themen</h2>
|
||||
<span class="count-badge">{{ getFormattedTopics(euProject.topics).length }}</span>
|
||||
</div>
|
||||
<div class="topics-grid">
|
||||
@for (topic of getFormattedTopics(euProject.topics); track topic) {
|
||||
<div class="topic-item" (click)="searchByTopic(topic)">
|
||||
<span class="topic-value">{{ topic }}</span>
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
</mat-card>
|
||||
}
|
||||
|
||||
<!-- Keywords -->
|
||||
@if (getKeywords(euProject.keywords).length > 0) {
|
||||
<mat-card appearance="outlined" class="card">
|
||||
<div class="section-header">
|
||||
<mat-icon>tag</mat-icon>
|
||||
<h2>Schlüsselwörter</h2>
|
||||
<span class="count-badge">{{ getKeywords(euProject.keywords).length }}</span>
|
||||
</div>
|
||||
<div class="keywords-grid">
|
||||
@for (keyword of getKeywords(euProject.keywords); track keyword) {
|
||||
<div class="keyword-item" (click)="searchByKeyword(keyword)">
|
||||
<span class="keyword-value">{{ keyword }}</span>
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
</div>
|
||||
}
|
||||
</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>{{ euProject.id || 'N/A' }}</dd>
|
||||
</div>
|
||||
@if (euProject.rcn) {
|
||||
<div class="detail-row">
|
||||
<dt>RCN</dt>
|
||||
<dd>{{ euProject.rcn }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.acronym) {
|
||||
<div class="detail-row">
|
||||
<dt>Akronym</dt>
|
||||
<dd>{{ euProject.acronym }}</dd>
|
||||
</div>
|
||||
}
|
||||
<div class="detail-row">
|
||||
<dt>Titel</dt>
|
||||
<dd>{{ euProject.title || 'N/A' }}</dd>
|
||||
</div>
|
||||
@if (euProject.frameworkProgramme) {
|
||||
<div class="detail-row">
|
||||
<dt>Rahmenprogramm</dt>
|
||||
<dd class="clickable" (click)="searchByFramework(euProject.frameworkProgramme)">
|
||||
{{ getFrameworkDisplay(euProject.frameworkProgramme) }}
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.fundingScheme) {
|
||||
<div class="detail-row">
|
||||
<dt>Förderprogramm</dt>
|
||||
<dd class="clickable" (click)="searchByFundingScheme(euProject.fundingScheme)">
|
||||
{{ getFundingSchemeDisplay(euProject.fundingScheme) }}
|
||||
<mat-icon class="search-icon">search</mat-icon>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.masterCall) {
|
||||
<div class="detail-row">
|
||||
<dt>Master Call</dt>
|
||||
<dd>{{ euProject.masterCall }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.subCall) {
|
||||
<div class="detail-row">
|
||||
<dt>Sub Call</dt>
|
||||
<dd>{{ euProject.subCall }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.status) {
|
||||
<div class="detail-row">
|
||||
<dt>Status</dt>
|
||||
<dd>
|
||||
<span class="status-indicator" [style.background-color]="getStatusColor(euProject.status)" (click)="searchByStatus(euProject.status)">
|
||||
{{ getStatusDisplay(euProject.status) }}
|
||||
</span>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.ecMaxContribution) {
|
||||
<div class="detail-row">
|
||||
<dt>Max. EU-Beitrag</dt>
|
||||
<dd>{{ formatCurrency(euProject.ecMaxContribution) }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.totalCost) {
|
||||
<div class="detail-row">
|
||||
<dt>Gesamtkosten</dt>
|
||||
<dd>{{ formatCurrency(euProject.totalCost) }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.ecSignatureDate) {
|
||||
<div class="detail-row">
|
||||
<dt>EU-Unterzeichnung</dt>
|
||||
<dd>{{ euProject.ecSignatureDate }}</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</mat-card>
|
||||
|
||||
<!-- Zeitliche Informationen -->
|
||||
<mat-card appearance="outlined" class="card">
|
||||
<div class="section-header">
|
||||
<mat-icon>schedule</mat-icon>
|
||||
<h2>Zeitliche Übersicht</h2>
|
||||
</div>
|
||||
<dl class="details-list">
|
||||
<div class="detail-row">
|
||||
<dt>Startdatum</dt>
|
||||
<dd>{{ euProject.startDate || 'N/A' }}</dd>
|
||||
</div>
|
||||
<div class="detail-row">
|
||||
<dt>Enddatum</dt>
|
||||
<dd>{{ euProject.endDate || 'N/A' }}</dd>
|
||||
</div>
|
||||
@if (euProject.ecSignatureDate) {
|
||||
<div class="detail-row">
|
||||
<dt>EU-Unterzeichnung</dt>
|
||||
<dd>{{ euProject.ecSignatureDate }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.contentUpdateDate) {
|
||||
<div class="detail-row">
|
||||
<dt>Letzte Aktualisierung</dt>
|
||||
<dd>{{ euProject.contentUpdateDate }}</dd>
|
||||
</div>
|
||||
}
|
||||
@if (euProject.grantDoi) {
|
||||
<div class="detail-row">
|
||||
<dt>Grant DOI</dt>
|
||||
<dd>
|
||||
<a [href]="'https://doi.org/' + euProject.grantDoi" target="_blank" class="external-link">
|
||||
{{ euProject.grantDoi }}
|
||||
<mat-icon class="external-icon">open_in_new</mat-icon>
|
||||
</a>
|
||||
</dd>
|
||||
</div>
|
||||
}
|
||||
</dl>
|
||||
</mat-card>
|
||||
</aside>
|
||||
</div>
|
||||
} @else {
|
||||
<div class="error-container">
|
||||
<div class="error-state">
|
||||
<mat-icon>error_outline</mat-icon>
|
||||
<p>EU Projekt nicht gefunden.</p>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
@@ -0,0 +1,619 @@
|
||||
// Complete SCSS with all styles
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.project-rcn {
|
||||
display: inline-block;
|
||||
padding: 4px 10px;
|
||||
background: #e8f0fe;
|
||||
color: #1a73e8;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
}
|
||||
|
||||
.project-acronym {
|
||||
display: inline-block;
|
||||
padding: 4px 10px;
|
||||
background: #fff3e0;
|
||||
color: #e65100;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
}
|
||||
|
||||
h1 {
|
||||
margin: 0 0 8px;
|
||||
font-size: 26px;
|
||||
line-height: 1.3;
|
||||
font-weight: 700;
|
||||
color: var(--sg-text);
|
||||
}
|
||||
|
||||
.project-framework {
|
||||
margin: 0 0 16px;
|
||||
color: var(--sg-text-muted);
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.framework-tag {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
background: #e8edf5;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: var(--sg-text);
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.framework-tag:hover {
|
||||
background: #d5dde8;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 10px;
|
||||
}
|
||||
|
||||
.status-badge {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 14px;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #fff;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.status-badge:hover {
|
||||
transform: translateY(-1px);
|
||||
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
||||
}
|
||||
|
||||
.status-badge mat-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.scheme-info {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 6px 14px;
|
||||
background: #fff;
|
||||
border: 1px solid #d9e2f0;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.scheme-info:hover {
|
||||
background: #f5f7fa;
|
||||
border-color: #b8c5d6;
|
||||
}
|
||||
|
||||
.scheme-info mat-icon {
|
||||
color: var(--sg-text-muted);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.doi-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 14px;
|
||||
background: #e8f0fe;
|
||||
border: 1px solid #c5d8f0;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #1a73e8;
|
||||
text-decoration: none;
|
||||
font-size: 13px;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.doi-link:hover {
|
||||
background: #d5e3fa;
|
||||
}
|
||||
|
||||
.doi-link mat-icon {
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.topics-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr;
|
||||
gap: 10px;
|
||||
padding: 16px 20px 20px;
|
||||
}
|
||||
|
||||
.topic-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 14px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.topic-item:hover {
|
||||
background: #f8fafc;
|
||||
border-color: #b8c5d6;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.topic-value {
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.topic-item .search-icon {
|
||||
color: var(--sg-text-muted);
|
||||
width: 18px;
|
||||
height: 18px;
|
||||
font-size: 18px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.topic-item:hover .search-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.keywords-grid {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 10px;
|
||||
padding: 16px 20px 20px;
|
||||
}
|
||||
|
||||
.keyword-item {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 10px 14px;
|
||||
border: 1px solid #d9e2f0;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
background: #fff;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.keyword-item:hover {
|
||||
background: #f8fafc;
|
||||
border-color: #b8c5d6;
|
||||
transform: translateY(-1px);
|
||||
}
|
||||
|
||||
.keyword-value {
|
||||
color: var(--sg-text);
|
||||
font-size: 13px;
|
||||
word-break: break-word;
|
||||
}
|
||||
|
||||
.keyword-item .search-icon {
|
||||
color: var(--sg-text-muted);
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
font-size: 16px;
|
||||
opacity: 0;
|
||||
transition: opacity 0.2s;
|
||||
}
|
||||
|
||||
.keyword-item:hover .search-icon {
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
.status-indicator {
|
||||
display: inline-block;
|
||||
padding: 2px 10px;
|
||||
border-radius: var(--sg-radius-sm);
|
||||
color: #fff;
|
||||
font-size: 12px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
}
|
||||
|
||||
.status-indicator:hover {
|
||||
transform: scale(1.05);
|
||||
}
|
||||
|
||||
.external-link {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 4px;
|
||||
color: var(--sg-primary, #0066cc);
|
||||
text-decoration: none;
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
.external-link:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
.external-link .external-icon {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.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;
|
||||
}
|
||||
|
||||
// Utility function for date formatting
|
||||
.format-date {
|
||||
// Handled in component
|
||||
}
|
||||
|
||||
@media (max-width: 992px) {
|
||||
.content-grid {
|
||||
grid-template-columns: 1fr;
|
||||
gap: 20px;
|
||||
}
|
||||
|
||||
.keywords-grid {
|
||||
grid-template-columns: 1fr 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@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;
|
||||
}
|
||||
|
||||
.eyebrow {
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.topics-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.keywords-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.metrics-grid {
|
||||
grid-template-columns: 1fr;
|
||||
}
|
||||
|
||||
.hero-actions {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.status-badge,
|
||||
.scheme-info,
|
||||
.doi-link {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,180 @@
|
||||
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 { MatChipsModule } from '@angular/material/chips';
|
||||
import { Router } from '@angular/router';
|
||||
|
||||
@Component({
|
||||
selector: 'app-eu-details',
|
||||
standalone: true,
|
||||
imports: [CommonModule, MatCardModule, MatIconModule, MatChipsModule],
|
||||
templateUrl: './eu-details.component.html',
|
||||
styleUrl: './eu-details.component.scss',
|
||||
})
|
||||
export class EuDetailsComponent implements OnInit {
|
||||
private route = inject(ActivatedRoute);
|
||||
euProject: any | undefined;
|
||||
|
||||
constructor(private router: Router) {}
|
||||
|
||||
ngOnInit(): void {
|
||||
this.route.data.subscribe(({ euSingleProject }) => {
|
||||
console.log('EU Project:', euSingleProject);
|
||||
this.euProject = euSingleProject;
|
||||
});
|
||||
}
|
||||
|
||||
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(endDate: string | null | undefined): string {
|
||||
if (!endDate) return 'N/A';
|
||||
const end = new Date(endDate);
|
||||
const now = new Date();
|
||||
|
||||
if (isNaN(end.getTime())) return endDate;
|
||||
|
||||
return end >= now ? 'Laufend' : 'Abgeschlossen';
|
||||
}
|
||||
|
||||
formatCurrency(amount: number | null | undefined): string {
|
||||
if (amount === null || amount === undefined) return 'N/A';
|
||||
|
||||
return new Intl.NumberFormat('de-DE', {
|
||||
style: 'currency',
|
||||
currency: 'EUR',
|
||||
minimumFractionDigits: 0,
|
||||
maximumFractionDigits: 0
|
||||
}).format(amount);
|
||||
}
|
||||
|
||||
getStatusColor(status: string | null | undefined): string {
|
||||
if (!status) return '#95a5a6';
|
||||
|
||||
const statusUpper = status.toUpperCase();
|
||||
if (statusUpper.includes('CLOSED') || statusUpper.includes('COMPLETED')) {
|
||||
return '#27ae60';
|
||||
} else if (statusUpper.includes('ONGOING') || statusUpper.includes('ACTIVE')) {
|
||||
return '#f39c12';
|
||||
} else if (statusUpper.includes('SIGNED')) {
|
||||
return '#3498db';
|
||||
} else if (statusUpper.includes('CANCELLED')) {
|
||||
return '#e74c3c';
|
||||
} else {
|
||||
return '#95a5a6';
|
||||
}
|
||||
}
|
||||
|
||||
getStatusDisplay(status: string | null | undefined): string {
|
||||
if (!status) return 'N/A';
|
||||
|
||||
const statusMap: { [key: string]: string } = {
|
||||
'CLOSED': 'Abgeschlossen',
|
||||
'COMPLETED': 'Abgeschlossen',
|
||||
'ONGOING': 'Laufend',
|
||||
'ACTIVE': 'Aktiv',
|
||||
'SIGNED': 'Unterzeichnet',
|
||||
'CANCELLED': 'Abgebrochen',
|
||||
'SUSPENDED': 'Unterbrochen'
|
||||
};
|
||||
|
||||
const statusUpper = status.toUpperCase();
|
||||
return statusMap[statusUpper] || status;
|
||||
}
|
||||
|
||||
getFrameworkDisplay(framework: string | null | undefined): string {
|
||||
if (!framework) return 'N/A';
|
||||
|
||||
const frameworkMap: { [key: string]: string } = {
|
||||
'H2020': 'Horizon 2020',
|
||||
'FP7': '7. Rahmenprogramm',
|
||||
'FP6': '6. Rahmenprogramm',
|
||||
'HE': 'Horizon Europe'
|
||||
};
|
||||
|
||||
return frameworkMap[framework] || framework;
|
||||
}
|
||||
|
||||
getFundingSchemeDisplay(scheme: string | null | undefined): string {
|
||||
if (!scheme) return 'N/A';
|
||||
|
||||
const schemeMap: { [key: string]: string } = {
|
||||
'MSCA-IF-EF-SE': 'MSCA Individual Fellowship - European Fellowship - Standard',
|
||||
'MSCA-IF-EF': 'MSCA Individual Fellowship - European Fellowship',
|
||||
'MSCA-IF-GF': 'MSCA Individual Fellowship - Global Fellowship',
|
||||
'MSCA-IF': 'MSCA Individual Fellowship',
|
||||
'MSCA-ITN': 'MSCA Innovative Training Networks',
|
||||
'MSCA-RISE': 'MSCA Research and Innovation Staff Exchange',
|
||||
'MSCA-COFUND': 'MSCA Co-funding of Regional, National and International Programmes'
|
||||
};
|
||||
|
||||
return schemeMap[scheme] || scheme;
|
||||
}
|
||||
|
||||
getFormattedTopics(topics: string | null | undefined): string[] {
|
||||
if (!topics) return [];
|
||||
return topics.split(',').map(t => t.trim());
|
||||
}
|
||||
|
||||
getKeywords(keywords: string | null | undefined): string[] {
|
||||
if (!keywords) return [];
|
||||
if (keywords === 'false') return [];
|
||||
// If keywords is a string with comma-separated values
|
||||
if (typeof keywords === 'string') {
|
||||
return keywords.split(',').map(k => k.trim()).filter(k => k && k !== 'false');
|
||||
}
|
||||
return [];
|
||||
}
|
||||
|
||||
searchByTopic(topic: string): void {
|
||||
this.router.navigate(['/eu-projects'], {
|
||||
queryParams: {
|
||||
topic: topic
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchByKeyword(keyword: string): void {
|
||||
this.router.navigate(['/eu-projects'], {
|
||||
queryParams: {
|
||||
keyword: keyword
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchByFramework(framework: string): void {
|
||||
this.router.navigate(['/eu-projects'], {
|
||||
queryParams: {
|
||||
framework: framework
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchByFundingScheme(scheme: string): void {
|
||||
this.router.navigate(['/eu-projects'], {
|
||||
queryParams: {
|
||||
fundingScheme: scheme
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
searchByStatus(status: string): void {
|
||||
this.router.navigate(['/eu-projects'], {
|
||||
queryParams: {
|
||||
status: status
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
goBack(): void {
|
||||
window.history.back();
|
||||
}
|
||||
}
|
||||
@@ -122,8 +122,9 @@ export class ProjectsComponent {
|
||||
return '/projects/bund/' + encodedId;
|
||||
} else if (fundingProject.type === 'dfg') {
|
||||
return '/projects/dfg/' + fundingProject.id;
|
||||
} else {
|
||||
} else if (fundingProject.type === 'eu') {
|
||||
return '/projects/eu/' + fundingProject.id;
|
||||
} else
|
||||
return null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user