added an all option for section field of plan invite
This commit is contained in:
parent
6bdc6d5c09
commit
41de3292af
|
@ -140,7 +140,7 @@ export interface DmpUserPersist {
|
||||||
user: Guid;
|
user: Guid;
|
||||||
role: DmpUserRole;
|
role: DmpUserRole;
|
||||||
email: string;
|
email: string;
|
||||||
sectionId: Guid;
|
sectionId: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface DmpUserRemovePersist {
|
export interface DmpUserRemovePersist {
|
||||||
|
|
|
@ -526,7 +526,7 @@ export class DmpUserEditorModel implements DmpUserPersist {
|
||||||
role: DmpUserRole;
|
role: DmpUserRole;
|
||||||
email: string;
|
email: string;
|
||||||
userType: DmpUserType = DmpUserType.Internal;
|
userType: DmpUserType = DmpUserType.Internal;
|
||||||
sectionId: Guid;
|
sectionId: string = '';
|
||||||
|
|
||||||
protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder();
|
protected formBuilder: UntypedFormBuilder = new UntypedFormBuilder();
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ export class DmpUserEditorModel implements DmpUserPersist {
|
||||||
this.role = item.role;
|
this.role = item.role;
|
||||||
// TODO this.email = item.email;
|
// TODO this.email = item.email;
|
||||||
this.userType = (item == null || this.user != null) ? DmpUserType.Internal : DmpUserType.External;
|
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;
|
return this;
|
||||||
}
|
}
|
||||||
|
|
|
@ -3,7 +3,7 @@
|
||||||
<div cdkDropList (cdkDropListDropped)="dropUsers($event)" *ngIf="enableSorting===true; else sortingDisabled" class="row">
|
<div cdkDropList (cdkDropListDropped)="dropUsers($event)" *ngIf="enableSorting===true; else sortingDisabled" class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div *ngFor="let user of form.get('users').controls; let userIndex = index" cdkDrag class="row align-items-center user-fields" [cdkDragDisabled]="form.disabled" (mouseenter)="onUserHover(userIndex)" (mouseleave)="clearHoveredUser()">
|
<div *ngFor="let user of form.get('users').controls; let userIndex = index" cdkDrag class="row align-items-center user-fields" [cdkDragDisabled]="form.disabled" (mouseenter)="onUserHover(userIndex)" (mouseleave)="clearHoveredUser()">
|
||||||
<ng-container *ngTemplateOutlet="userForm; context: {$implicit: user, index: userIndex}" ></ng-container>
|
<ng-container *ngTemplateOutlet="userForm; context: {$implicit: user, index: userIndex}"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -12,7 +12,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-12">
|
<div class="col-12">
|
||||||
<div *ngFor="let user of form.get('users').controls; let userIndex = index" class="row align-items-center user-fields">
|
<div *ngFor="let user of form.get('users').controls; let userIndex = index" class="row align-items-center user-fields">
|
||||||
<ng-container *ngTemplateOutlet="userForm; context: {$implicit: user, index: userIndex}" ></ng-container>
|
<ng-container *ngTemplateOutlet="userForm; context: {$implicit: user, index: userIndex}"></ng-container>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -69,8 +69,9 @@
|
||||||
</div>
|
</div>
|
||||||
<div class="col-12 col-xl mt-3" *ngIf="sections">
|
<div class="col-12 col-xl mt-3" *ngIf="sections">
|
||||||
<mat-form-field class="w-100">
|
<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-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">
|
<mat-option *ngFor="let section of sections" [value]="section.id">
|
||||||
{{ section.label }}
|
{{ section.label }}
|
||||||
</mat-option>
|
</mat-option>
|
||||||
|
|
|
@ -1525,7 +1525,8 @@
|
||||||
"EMAIL": "Email",
|
"EMAIL": "Email",
|
||||||
"USER": "User",
|
"USER": "User",
|
||||||
"USER-ROLE": "Role",
|
"USER-ROLE": "Role",
|
||||||
"SECTION": "Specific DMP Section",
|
"SECTIONS": "Plan Sections",
|
||||||
|
"ALL-SECTIONS": "All",
|
||||||
"DMP-BLUEPRINT-VERSION": "Version"
|
"DMP-BLUEPRINT-VERSION": "Version"
|
||||||
},
|
},
|
||||||
"ACTIONS": {
|
"ACTIONS": {
|
||||||
|
|
Loading…
Reference in New Issue