plan overview show user roles with section
This commit is contained in:
parent
bb6f57d7f8
commit
3cbbc38370
|
@ -239,15 +239,15 @@
|
||||||
</ng-container>
|
</ng-container>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div class="frame mb-3 pt-4 pl-4 pr-5 pb-3">
|
<div class="frame mb-3 pt-4 pl-3 pr-3 pb-3">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<p class="header">{{ 'DMP-OVERVIEW.DMP-AUTHORS' | translate }}</p>
|
<p class="header">{{ 'DMP-OVERVIEW.DMP-AUTHORS' | translate }}</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div *ngFor="let dmpUser of dmp.dmpUsers" class="row authors">
|
<div *ngFor="let dmpUser of dmp.dmpUsers" class="row authors">
|
||||||
<div class="col-auto pr-0">
|
<div class="col-auto d-flex flex-row">
|
||||||
<button class="account_btn">
|
<button class="account_btn mr-3 pl-0">
|
||||||
<mat-icon class="account-icon">account_circle</mat-icon>
|
<mat-icon class="account-icon">account_circle</mat-icon>
|
||||||
</button>
|
</button>
|
||||||
</div>
|
</div>
|
||||||
|
@ -257,7 +257,11 @@
|
||||||
<span *ngIf="isUserAuthor(dmpUser.user?.id)">
|
<span *ngIf="isUserAuthor(dmpUser.user?.id)">
|
||||||
({{ 'DMP-OVERVIEW.YOU' | translate }})</span>
|
({{ 'DMP-OVERVIEW.YOU' | translate }})</span>
|
||||||
</p>
|
</p>
|
||||||
<p class="authors-role">{{ enumUtils.toDmpUserRoleString(dmpUser.role) }}</p>
|
<p class="authors-role">
|
||||||
|
<span>{{ enumUtils.toDmpUserRoleString(dmpUser.role) }} - </span>
|
||||||
|
<span *ngIf="!dmpUser.sectionId">{{ 'DMP-OVERVIEW.ROLES.ALL-SECTIONS' | translate}}</span>
|
||||||
|
<span *ngIf="dmpUser.sectionId">{{ getSectionNameById(dmpUser.sectionId) }}</span>
|
||||||
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div *ngIf="canAssignDmpUsers(dmp) && dmp.status === dmpStatusEnum.Draft && dmpUser.role != dmpUserRoleEnum.Owner" class="col-auto">
|
<div *ngIf="canAssignDmpUsers(dmp) && dmp.status === dmpStatusEnum.Draft && dmpUser.role != dmpUserRoleEnum.Owner" class="col-auto">
|
||||||
<button (click)="removeUserFromDmp(dmpUser)" mat-mini-fab matTooltip="{{ 'DMP-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}" matTooltipPosition="above">
|
<button (click)="removeUserFromDmp(dmpUser)" mat-mini-fab matTooltip="{{ 'DMP-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}" matTooltipPosition="above">
|
||||||
|
|
|
@ -710,6 +710,14 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
return path + reference;
|
return path + reference;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSectionNameById(sectionId: Guid): string {
|
||||||
|
if (sectionId == null) return '';
|
||||||
|
|
||||||
|
let sections: DmpBlueprintDefinitionSection[] = this.dmp?.blueprint?.definition?.sections?.filter((section:DmpBlueprintDefinitionSection) => sectionId===section.id);
|
||||||
|
|
||||||
|
return sections == null ? '' : sections[0].label;
|
||||||
|
}
|
||||||
|
|
||||||
checkLockStatus(id: Guid) {
|
checkLockStatus(id: Guid) {
|
||||||
this.lockService.checkLockStatus(Guid.parse(id.toString())).pipe(takeUntil(this._destroyed))
|
this.lockService.checkLockStatus(Guid.parse(id.toString())).pipe(takeUntil(this._destroyed))
|
||||||
.subscribe(lockStatus => {
|
.subscribe(lockStatus => {
|
||||||
|
@ -757,6 +765,7 @@ export class DmpOverviewComponent extends BaseComponent implements OnInit {
|
||||||
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.status)].join('.'),
|
||||||
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.isActive)].join('.'),
|
[nameof<Dmp>(x => x.descriptions), nameof<Description>(x => x.isActive)].join('.'),
|
||||||
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.id)].join('.'),
|
||||||
|
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.sectionId)].join('.'),
|
||||||
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.id)].join('.'),
|
||||||
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.name)].join('.'),
|
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.user.name)].join('.'),
|
||||||
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
[nameof<Dmp>(x => x.dmpUsers), nameof<DmpUser>(x => x.role)].join('.'),
|
||||||
|
|
|
@ -703,6 +703,9 @@
|
||||||
"MIN-DESCRIPTIONS-DIALOG": {
|
"MIN-DESCRIPTIONS-DIALOG": {
|
||||||
"TITLE": "Min({{minMultiplicity}}) Descriptions needed using this template.",
|
"TITLE": "Min({{minMultiplicity}}) Descriptions needed using this template.",
|
||||||
"MESSAGE": "Add Description."
|
"MESSAGE": "Add Description."
|
||||||
|
},
|
||||||
|
"ROLES": {
|
||||||
|
"ALL-SECTIONS": "All Sections"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"DESCRIPTION-OVERVIEW": {
|
"DESCRIPTION-OVERVIEW": {
|
||||||
|
|
Loading…
Reference in New Issue