[develop | DONE | CHANGED]: funders.component: Added shortName field in "fundersMap" and set it funder shortName or (if short name not available) with stakeholder alias.

This commit is contained in:
Konstantina Galouni 2024-07-18 15:41:05 +03:00
parent 16838a3d51
commit 8bed072023
2 changed files with 12 additions and 7 deletions

View File

@ -75,7 +75,7 @@
</ng-container>
<ng-container *ngIf="!showLoading && funders?.length">
<div class="uk-container uk-container-large">
<div id="target" class="uk-section uk-padding-remove-top uk-margin-top" uk-height-match="target: .alias;">
<div id="target" class="uk-section uk-padding-remove-top uk-margin-top" uk-height-match="target: .shortName;">
<div>
<div *ngIf="funders" class="uk-padding-small uk-padding-remove-vertical uk-margin-medium-bottom uk-flex uk-flex-wrap uk-flex-middle uk-flex-between">
<div class="uk-flex uk-flex-wrap uk-flex-middle uk-flex-between uk-width-auto@m uk-width-1-1 uk-margin-top">
@ -145,10 +145,10 @@
</ng-template>
</div>
<div class="uk-padding-small uk-padding-remove-vertical uk-padding-remove-left uk-margin-medium-left">
<!-- alias -->
<div class="alias uk-text-uppercase uk-text-small uk-margin-top type">
<ng-container *ngIf="funder.alias">
{{funder.alias}}
<!-- shortName -->
<div class="shortName uk-text-uppercase uk-text-small uk-margin-top type">
<ng-container *ngIf="funder.shortName">
{{funder.shortName}}
</ng-container>
</div>
<div class="uk-flex">
@ -243,9 +243,9 @@
<ng-container *ngIf="funder.name">
<span>{{funder.name}}</span>
</ng-container>
<ng-container *ngIf="funder.alias" >
<ng-container *ngIf="funder.shortName" >
<span class="uk-text-uppercase">
({{funder.alias}})
({{funder.shortName}})
</span>
</ng-container>
</div>

View File

@ -54,6 +54,7 @@ export class FundersComponent implements OnInit {
fundersMap = new Map<string, {
"id": string,
"name": string,
"shortName": string,
"alias": string,
"researchProducts": number,
"openAccessResearchProducts": number,
@ -160,6 +161,7 @@ export class FundersComponent implements OnInit {
let funder = {
"id": id,
"name": this.removePartAfterCharacters(queriedFunder.name, "||"),
"shortName": queriedFunder.shortName,
"alias": '',
"researchProducts": +queriedFunder.results,
"openAccessResearchProducts": +queriedFunder.openResults,
@ -180,6 +182,9 @@ export class FundersComponent implements OnInit {
if(queriedFunder.stakeholder) {
let stakeholder = queriedFunder.stakeholder;
funder.alias = stakeholder.alias;
if(!funder.shortName) {
funder.shortName = stakeholder.alias;
}
funder.monitorDashboard = stakeholder.alias;
funder.monitorDashboardStatus = stakeholder.visibility;
if(stakeholder.logoUrl) {