added role information for description-overview authors

This commit is contained in:
Sofia Papacharalampous 2024-05-09 14:13:05 +03:00
parent accb6fc772
commit 30a50db52e
4 changed files with 18 additions and 3 deletions

View File

@ -190,7 +190,11 @@
</button> </button>
<div> <div>
<p class="authors-label">{{ dmpUser.user?.name }} <span *ngIf="isUserAuthor(dmpUser.user?.id)">({{ 'DESCRIPTION-OVERVIEW.YOU' | translate }})</span></p> <p class="authors-label">{{ dmpUser.user?.name }} <span *ngIf="isUserAuthor(dmpUser.user?.id)">({{ 'DESCRIPTION-OVERVIEW.YOU' | translate }})</span></p>
<p class="authors-role">{{ enumUtils.toDmpUserRoleString(dmpUser.role) }}</p> <p class="authors-role">
<span>{{ enumUtils.toDmpUserRoleString(dmpUser.role) }} - </span>
<span *ngIf="!dmpUser.sectionId">{{ 'DESCRIPTION-OVERVIEW.ROLES.ALL-SECTIONS' | translate}}</span>
<span *ngIf="dmpUser.sectionId">{{ getSectionNameById(dmpUser.sectionId) }}</span>
</p>
</div> </div>
</div> </div>
<div class="col-12" *ngIf="canInviteDmpUsers && description.dmp?.status === dmpStatusEnum.Draft && dmpUser.role != dmpUserRoleEnum.Owner" > <div class="col-12" *ngIf="canInviteDmpUsers && description.dmp?.status === dmpStatusEnum.Draft && dmpUser.role != dmpUserRoleEnum.Owner" >

View File

@ -267,7 +267,7 @@
.authors-role { .authors-role {
font-size: 0.875em; font-size: 0.875em;
color: #a8a8a8; color: #a8a8a8;
height: 1.4em; // height: 1.4em;
margin-bottom: 0px; margin-bottom: 0px;
} }

View File

@ -311,6 +311,13 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
return path + reference; 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) { // downloadPDF(id: string) {
// this.descriptionService.downloadPDF(id) // this.descriptionService.downloadPDF(id)
// .pipe(takeUntil(this._destroyed)) // .pipe(takeUntil(this._destroyed))
@ -501,6 +508,7 @@ export class DescriptionOverviewComponent extends BaseComponent implements OnIni
[nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.id)].join('.'), [nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.id)].join('.'),
[nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'), [nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.blueprint), nameof<DmpBlueprint>(x => x.definition), nameof<DmpBlueprintDefinition>(x => x.sections), nameof<DmpBlueprintDefinitionSection>(x => x.label)].join('.'),
[nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'), [nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
[nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.sectionId)].join('.'),
[nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'), [nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
[nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.name)].join('.'), [nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.name)].join('.'),
[nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'), [nameof<Description>(x => x.dmp), nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),

View File

@ -739,7 +739,10 @@
"TITLE": "Description is locked", "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." "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": { "DESCRIPTION-LISTING": {
"TITLE": "My Descriptions", "TITLE": "My Descriptions",