inserted generic project tables to institute component
This commit is contained in:
@@ -2,94 +2,89 @@
|
||||
<h3>Projekte</h3>
|
||||
|
||||
<div class="funding-area">
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-content>
|
||||
<app-query-param-input
|
||||
label="Suche nach Themen"
|
||||
queryParamKey="search" />
|
||||
<div class="person-projects">
|
||||
<nav mat-tab-nav-bar [tabPanel]="resultTabPanel" class="result-nav">
|
||||
@for (route of childRoutes; track route.path) {
|
||||
<a
|
||||
matTabLink
|
||||
[routerLink]="[route.path]"
|
||||
queryParamsHandling="merge"
|
||||
routerLinkActive
|
||||
#rla="routerLinkActive"
|
||||
[active]="rla.isActive">
|
||||
{{ route.label }}
|
||||
</a>
|
||||
}
|
||||
</nav>
|
||||
|
||||
<mat-tab-group
|
||||
[selectedIndex]="tabIndex()"
|
||||
(selectedTabChange)="selectedTabChange($event)">
|
||||
<mat-tab label="EU">
|
||||
<app-data-table
|
||||
[data]="euProjectData"
|
||||
[columns]="euProjectColumns"
|
||||
queryParamSortKey="sort_by"
|
||||
queryParamSortDirectionKey="sort_direction" />
|
||||
</mat-tab>
|
||||
<mat-tab label="Bund">
|
||||
<app-data-table
|
||||
[data]="bundProjectData"
|
||||
[columns]="bundProjectColumns"
|
||||
queryParamSortKey="sort_by"
|
||||
queryParamSortDirectionKey="sort_direction" />
|
||||
</mat-tab>
|
||||
</mat-tab-group>
|
||||
<app-query-param-paginator
|
||||
[total]="pageTotal()"
|
||||
[pageSizeOptions]="[10, 20, 50]" />
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<div class="funding-info-section">
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Förderung über Zeit</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<app-institution-projects-funding-graph
|
||||
[fundings]="[bundProjectsFunding(), cordisEuProjectsFunding()]" />
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
<mat-tab-nav-panel #resultTabPanel>
|
||||
<router-outlet />
|
||||
</mat-tab-nav-panel>
|
||||
<div class="funding-info-section">
|
||||
<mat-card appearance="outlined">
|
||||
<mat-card-header>
|
||||
<mat-card-title>Förderung über Zeit</mat-card-title>
|
||||
</mat-card-header>
|
||||
<mat-card-content>
|
||||
<app-institution-projects-funding-graph
|
||||
[fundings]="[bundProjectsFunding(), cordisEuProjectsFunding()]" />
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
|
||||
<div class="funding-info-cards">
|
||||
<app-info-card
|
||||
[description]="'Gesamte Förderung durch Bund'"
|
||||
[value]="
|
||||
(bundTotalFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Durchschnittliche jährliche Förderung durch Bund'"
|
||||
[value]="
|
||||
(bundAverageAnnualFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Gesamte Förderung durch die Europäische Union'"
|
||||
[value]="
|
||||
(euTotalFunding() | currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ??
|
||||
undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Durchschnittliche jährliche Förderung durch die Europäische Union'"
|
||||
[value]="
|
||||
(euAverageAnnualFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<div class="funding-info-cards">
|
||||
<app-info-card
|
||||
[description]="'Gesamte Förderung durch Bund'"
|
||||
[value]="
|
||||
(bundTotalFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Durchschnittliche jährliche Förderung durch Bund'"
|
||||
[value]="
|
||||
(bundAverageAnnualFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="'Gesamte Förderung durch die Europäische Union'"
|
||||
[value]="
|
||||
(euTotalFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
<app-info-card
|
||||
[description]="
|
||||
'Durchschnittliche jährliche Förderung durch die Europäische Union'
|
||||
"
|
||||
[value]="
|
||||
(euAverageAnnualFunding()
|
||||
| currency: 'EUR' : 'symbol' : '1.0-0' : 'de') ?? undefined
|
||||
" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<ng-template #fundingStartTmp let-row>
|
||||
{{ row.funding_start | date: 'dd.MM.yyyy' }}
|
||||
</ng-template>
|
||||
<ng-template #fundingEndTmp let-row>
|
||||
{{ row.funding_end | date: 'dd.MM.yyyy' }}
|
||||
</ng-template>
|
||||
<ng-template #fundingAmountTmp let-row>
|
||||
{{ row.funding_amount | currency: 'EUR' : 'symbol' : '1.0-0' : 'de' }}
|
||||
</ng-template>
|
||||
|
||||
<ng-template #euProjectActionsTmp let-row>
|
||||
<a mat-icon-button color="primary" [routerLink]="['/projects/eu', row.id]">
|
||||
<mat-icon>open_in_new</mat-icon>
|
||||
</a></ng-template
|
||||
>
|
||||
|
||||
<ng-template #bundProjectActionsTmp let-row>
|
||||
<a
|
||||
mat-icon-button
|
||||
color="primary"
|
||||
[routerLink]="['/projects/bund', row.id]">
|
||||
<mat-icon>open_in_new</mat-icon>
|
||||
</a>
|
||||
</ng-template>
|
||||
</div>
|
||||
|
||||
<ng-template #fundingStartTmp let-row>
|
||||
{{ row.funding_start | date: 'dd.MM.yyyy' }}
|
||||
</ng-template>
|
||||
<ng-template #fundingEndTmp let-row>
|
||||
{{ row.funding_end | date: 'dd.MM.yyyy' }}
|
||||
</ng-template>
|
||||
<ng-template #fundingAmountTmp let-row>
|
||||
{{ row.funding_amount | currency: 'EUR' : 'symbol' : '1.0-0' : 'de' }}
|
||||
</ng-template>
|
||||
|
||||
<ng-template #euProjectActionsTmp let-row>
|
||||
<a mat-icon-button color="primary" [routerLink]="['/projects/eu', row.id]">
|
||||
<mat-icon>open_in_new</mat-icon>
|
||||
</a></ng-template
|
||||
>
|
||||
|
||||
<ng-template #bundProjectActionsTmp let-row>
|
||||
<a mat-icon-button color="primary" [routerLink]="['/projects/bund', row.id]">
|
||||
<mat-icon>open_in_new</mat-icon>
|
||||
</a>
|
||||
</ng-template>
|
||||
|
||||
@@ -116,6 +116,20 @@ export class InstitutionProjectsComponent implements OnInit {
|
||||
return funding.annual_average_over_period ?? 0;
|
||||
});
|
||||
|
||||
readonly childRoutes = [
|
||||
{
|
||||
path: 'dfg',
|
||||
label: 'DFG-Projekte',
|
||||
},
|
||||
{
|
||||
path: 'eu',
|
||||
label: 'EU-Projekte',
|
||||
},
|
||||
{
|
||||
path: 'bund',
|
||||
label: 'BUND-Projekte',
|
||||
},
|
||||
];
|
||||
constructor(
|
||||
private readonly activatedRoute: ActivatedRoute,
|
||||
private readonly router: Router,
|
||||
|
||||
Reference in New Issue
Block a user