From 30a50db52e51778720d88ff68a6e1109bc6ec591 Mon Sep 17 00:00:00 2001 From: Sofia Papacharalampous Date: Thu, 9 May 2024 14:13:05 +0300 Subject: [PATCH] added role information for description-overview authors --- .../overview/description-overview.component.html | 6 +++++- .../overview/description-overview.component.scss | 2 +- .../overview/description-overview.component.ts | 8 ++++++++ dmp-frontend/src/assets/i18n/en.json | 5 ++++- 4 files changed, 18 insertions(+), 3 deletions(-) diff --git a/dmp-frontend/src/app/ui/description/overview/description-overview.component.html b/dmp-frontend/src/app/ui/description/overview/description-overview.component.html index a709e8417..829b204ff 100644 --- a/dmp-frontend/src/app/ui/description/overview/description-overview.component.html +++ b/dmp-frontend/src/app/ui/description/overview/description-overview.component.html @@ -190,7 +190,11 @@

{{ dmpUser.user?.name }} ({{ 'DESCRIPTION-OVERVIEW.YOU' | translate }})

-

{{ enumUtils.toDmpUserRoleString(dmpUser.role) }}

+

+ {{ enumUtils.toDmpUserRoleString(dmpUser.role) }} - + {{ 'DESCRIPTION-OVERVIEW.ROLES.ALL-SECTIONS' | translate}} + {{ getSectionNameById(dmpUser.sectionId) }} +

diff --git a/dmp-frontend/src/app/ui/description/overview/description-overview.component.scss b/dmp-frontend/src/app/ui/description/overview/description-overview.component.scss index d940eb054..a92144305 100644 --- a/dmp-frontend/src/app/ui/description/overview/description-overview.component.scss +++ b/dmp-frontend/src/app/ui/description/overview/description-overview.component.scss @@ -267,7 +267,7 @@ .authors-role { font-size: 0.875em; color: #a8a8a8; - height: 1.4em; + // height: 1.4em; margin-bottom: 0px; } diff --git a/dmp-frontend/src/app/ui/description/overview/description-overview.component.ts b/dmp-frontend/src/app/ui/description/overview/description-overview.component.ts index 91048c53c..2a92989dd 100644 --- a/dmp-frontend/src/app/ui/description/overview/description-overview.component.ts +++ b/dmp-frontend/src/app/ui/description/overview/description-overview.component.ts @@ -311,6 +311,13 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni return path + reference; } + getSectionNameById(sectionId: Guid): string { + if (sectionId == null) return ''; + + let sections: DmpBlueprintDefinitionSection[] = this.description?.dmp?.blueprint?.definition?.sections?.filter((section:DmpBlueprintDefinitionSection) => sectionId===section.id); + + return sections == null ? '' : sections[0].label; + } // downloadPDF(id: string) { // this.descriptionService.downloadPDF(id) // .pipe(takeUntil(this._destroyed)) @@ -501,6 +508,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni [nameof(x => x.dmp), nameof(x => x.blueprint), nameof(x => x.definition), nameof(x => x.sections), nameof(x => x.id)].join('.'), [nameof(x => x.dmp), nameof(x => x.blueprint), nameof(x => x.definition), nameof(x => x.sections), nameof(x => x.label)].join('.'), [nameof(x => x.dmp), nameof(x => x.dmpUsers), nameof(x => x.id)].join('.'), + [nameof(x => x.dmp), nameof(x => x.dmpUsers), nameof(x => x.sectionId)].join('.'), [nameof(x => x.dmp), nameof(x => x.dmpUsers), nameof(x => x.user.id)].join('.'), [nameof(x => x.dmp), nameof(x => x.dmpUsers), nameof(x => x.user.name)].join('.'), [nameof(x => x.dmp), nameof(x => x.dmpUsers), nameof(x => x.role)].join('.'), diff --git a/dmp-frontend/src/assets/i18n/en.json b/dmp-frontend/src/assets/i18n/en.json index 4cba28036..26f39838b 100644 --- a/dmp-frontend/src/assets/i18n/en.json +++ b/dmp-frontend/src/assets/i18n/en.json @@ -739,7 +739,10 @@ "TITLE": "Description is locked", "MESSAGE": "Somebody else is modifying the description at this moment. If you would like to modify or view it, please come back later." }, - "FINALISE-POPUP": {} + "FINALISE-POPUP": {}, + "ROLES": { + "ALL-SECTIONS": "All Sections" + } }, "DESCRIPTION-LISTING": { "TITLE": "My Descriptions",