Merge branch 'dmp-refactoring' of code-repo.d4science.org:MaDgiK-CITE/argos into dmp-refactoring

This commit is contained in:
Efstratios Giannopoulos 2024-05-09 15:01:24 +03:00
commit 5243de1e0b
4 changed files with 28 additions and 8 deletions

View File

@ -184,17 +184,26 @@
</div> </div>
<div class="col-12"> <div class="col-12">
<div *ngFor="let dmpUser of description.dmp?.dmpUsers" class="row authors"> <div *ngFor="let dmpUser of description.dmp?.dmpUsers" class="row authors">
<div class="col-12 d-flex flex-row"> <div class="col d-flex flex-row">
<button class="account_btn mr-3 pl-0"> <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>
<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-auto" *ngIf="canInviteDmpUsers && description.dmp?.status === dmpStatusEnum.Draft && dmpUser.role != dmpUserRoleEnum.Owner" >
<button (click)="removeUserFromDmp(dmpUser)" class="remove-btn">{{ 'DESCRIPTION-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}</button> <!-- <button (click)="removeUserFromDmp(dmpUser)" class="remove-btn">{{ 'DESCRIPTION-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}</button> -->
<button (click)="removeUserFromDmp(dmpUser)" mat-mini-fab matTooltip="{{ 'DESCRIPTION-OVERVIEW.ACTIONS.REMOVE-AUTHOR' | translate}}" matTooltipPosition="above">
<mat-icon class="mat-mini-fab-icon">delete</mat-icon>
</button>
</div> </div>
</div> </div>
</div> </div>

View File

@ -90,7 +90,7 @@
.finalize-btn { .finalize-btn {
// border: 1px solid var(--secondary-color); // border: 1px solid var(--secondary-color);
background: #f5db71; //background: #f5db71;
} }
.frame-btn, .frame-btn,
@ -254,7 +254,7 @@
display: flex; display: flex;
flex-direction: row; flex-direction: row;
justify-content: space-between; justify-content: space-between;
width: 100%; //width: 100%;
} }
.authors-label { .authors-label {
@ -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",