added an all option for section field of plan invite

This commit is contained in:
Diamantis Tziotzios 2024-05-15 20:29:21 +03:00
parent 6bdc6d5c09
commit 41de3292af
4 changed files with 13 additions and 11 deletions

View File

@ -140,7 +140,7 @@ export interface DmpUserPersist {
user: Guid;
role: DmpUserRole;
email: string;
sectionId: Guid;
sectionId: string;
}
export interface DmpUserRemovePersist {

View File

@ -526,7 +526,7 @@ export class DmpUserEditorModel implements DmpUserPersist {
role: DmpUserRole;
email: string;
userType: DmpUserType = DmpUserType.Internal;
sectionId: Guid;
sectionId: string = '';
protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder();
@ -539,7 +539,7 @@ export class DmpUserEditorModel implements DmpUserPersist {
this.role = item.role;
// TODO this.email = item.email;
this.userType = (item == null || this.user != null) ? DmpUserType.Internal : DmpUserType.External;
this.sectionId = item.sectionId;
this.sectionId = item.sectionId?.toString() || ''; //Trick to allow a null option for all items.
return this;
}

View File

@ -69,8 +69,9 @@
</div>
<div class="col-12 col-xl mt-3" *ngIf="sections">
<mat-form-field class="w-100">
<mat-label>{{'DMP-EDITOR.FIELDS.SECTION' | translate}}</mat-label>
<mat-label>{{'DMP-EDITOR.FIELDS.SECTIONS' | translate}}</mat-label>
<mat-select [formControl]="user.get('sectionId')">
<mat-option value="">{{'DMP-EDITOR.FIELDS.ALL-SECTIONS' | translate}}</mat-option>
<mat-option *ngFor="let section of sections" [value]="section.id">
{{ section.label }}
</mat-option>

View File

@ -1525,7 +1525,8 @@
"EMAIL": "Email",
"USER": "User",
"USER-ROLE": "Role",
"SECTION": "Specific DMP Section",
"SECTIONS": "Plan Sections",
"ALL-SECTIONS": "All",
"DMP-BLUEPRINT-VERSION": "Version"
},
"ACTIONS": {