temrporart adjusted bund projects table at the institutes component for the new BUND proejct page model

This commit is contained in:
2026-07-24 02:02:33 +02:00
parent 1a0d45f118
commit 10ceb60dce
@@ -9,12 +9,12 @@ import {
} from '@angular/core';
import { ActivatedRoute, Router, RouterModule } from '@angular/router';
import {
BundProject,
BundProjectPage,
EuOrganizationProjectSummary,
EuOrganizationProjectSummaryPage,
EuCordisProjectSearchPage,
InstitutionFunderSummary,
EuCordisProjectSummary,
} from '../../api';
import { BundProjectSummary } from '../../api/model/bundProjectSummary';
import { MatCardModule } from '@angular/material/card';
import { MatFormFieldModule } from '@angular/material/form-field';
import { MatTabChangeEvent, MatTabsModule } from '@angular/material/tabs';
@@ -77,12 +77,13 @@ export class InstitutionProjectsComponent implements OnInit {
fundingEndTmp = viewChild.required<TemplateRef<any>>('fundingEndTmp');
fundingAmountTmp = viewChild.required<TemplateRef<any>>('fundingAmountTmp');
cordisEuProjectPage = input.required<EuOrganizationProjectSummaryPage>();
cordisEuProjectPage = input.required<EuCordisProjectSearchPage>();
euProjectColumns: GenericColumn<EuProjectRow>[] = [];
euProjectData: EuProjectRow[] = [];
euProjectActionsTmp = viewChild.required<TemplateRef<any>>(
'euProjectActionsTmp',
);
acronymTmp = viewChild.required<TemplateRef<any>>('acronymTmp');
bundProjectPage = input.required<BundProjectPage>();
bundProjectColumns: GenericColumn<BundProjectRow>[] = [];
@@ -165,6 +166,7 @@ export class InstitutionProjectsComponent implements OnInit {
type: 'accessor',
accessorKey: 'topic',
},
{
id: 'funding_start',
header: 'Förderbeginn',
@@ -181,7 +183,7 @@ export class InstitutionProjectsComponent implements OnInit {
},
{
id: 'funding_amount',
header: 'Fördersumme',
header: 'Fördersumme (EC)',
type: 'accessor',
accessorKey: 'funding_amount',
cellTemplate: this.fundingAmountTmp(),
@@ -230,19 +232,19 @@ export class InstitutionProjectsComponent implements OnInit {
];
}
transformEuRow(project: EuOrganizationProjectSummary): EuProjectRow {
transformEuRow(project: EuCordisProjectSummary): EuProjectRow {
return {
id: project.project_id,
id: project.id,
topic: project.title || '',
funding_start: project.start_date
? new Date(project.start_date)
: new Date(0),
funding_end: project.end_date ? new Date(project.end_date) : new Date(0),
funding_amount: Number(project.ec_contribution) || 0,
funding_amount: Number(project.ec_max_contribution) || 0,
};
}
transformBundRow(project: BundProject): BundProjectRow {
transformBundRow(project: BundProjectSummary): BundProjectRow {
return {
id: project.funding_code || '',
topic: project.topic || '',