Skip to content

Commit fe36cc3

Browse files
xflordHejdaJakub
authored andcommitted
feat: allow multiple users to be added/invited via dialog to VO/group
* enabled selection of multiple users to be added/invited * created new error messages when some users fail to be added/invited * set initial sorting of list to sort by whether user is checked or not
1 parent 9854862 commit fe36cc3

File tree

7 files changed

+218
-122
lines changed

7 files changed

+218
-122
lines changed

apps/admin-gui/src/app/shared/components/dialogs/add-member-dialog/add-member-dialog.component.html

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
<div class="{{theme}}">
22
<h1 mat-dialog-title>{{'DIALOGS.ADD_MEMBERS.TITLE' | translate}}</h1>
33

4-
<div *ngIf="!processing" mat-dialog-content>
4+
<div mat-dialog-content *ngIf="!processing">
55
<mat-form-field class="mr-2 search-field adjust-width">
66
<input
77
matInput
@@ -16,40 +16,40 @@ <h1 mat-dialog-title>{{'DIALOGS.ADD_MEMBERS.TITLE' | translate}}</h1>
1616
</mat-form-field>
1717

1818
<button
19-
(click)="onSearchByString()"
19+
mat-flat-button
2020
class="ml-auto"
2121
color="accent"
2222
data-cy="search-button"
2323
[disabled]="loading"
24-
mat-flat-button>
24+
(click)="onSearchByString()">
2525
{{'DIALOGS.ADD_MEMBERS.SEARCH' | translate}}
2626
</button>
2727

2828
<div class="no-bounce-scrollbar">
2929
<mat-spinner *ngIf="loading" class="mr-auto ml-auto"></mat-spinner>
3030
</div>
31-
<div *ngIf="!!members && !loading" class="mt-3">
31+
<div class="mt-3" *ngIf="!!members && !loading">
3232
<app-members-candidates-list
3333
#list
3434
[group]="data.group"
3535
[tableId]="tableId"
36-
*ngIf="firstSearchDone"
37-
[blockManualAdding]="manualAddingBlocked"
3836
[members]="members"
3937
[selection]="selection"
40-
[type]="data.type">
38+
[type]="data.type"
39+
[blockManualAdding]="manualAddingBlocked"
40+
*ngIf="firstSearchDone">
4141
</app-members-candidates-list>
4242
</div>
4343
</div>
44-
<mat-spinner *ngIf="processing" class="mr-auto ml-auto"></mat-spinner>
45-
<div *ngIf="!processing" mat-dialog-actions>
46-
<button (click)="onCancel()" class="ml-auto" mat-flat-button>
44+
<mat-spinner class="mr-auto ml-auto" *ngIf="processing"></mat-spinner>
45+
<div mat-dialog-actions *ngIf="!processing">
46+
<button mat-flat-button class="ml-auto" (click)="onCancel()">
4747
{{'DIALOGS.ADD_MEMBERS.CANCEL' | translate}}
4848
</button>
4949
<span
5050
matTooltip="{{'DIALOGS.ADD_MEMBERS.ADD_MEMBER_PERMISSION_TOOLTIP' | translate}}"
51-
[matTooltipDisabled]="selection.selected.length === 0 || this.data.type !== 'group' || (list !== undefined && list.addAuth)"
52-
matTooltipPosition="above">
51+
matTooltipPosition="above"
52+
[matTooltipDisabled]="selection.selected.length === 0 || this.data.type !== 'group' || (list !== undefined && list.addAuth)">
5353
<button
5454
*ngIf="this.data.type !== 'group' || (this.data.type === 'group' && inviteAuth)"
5555
[disabled]="selection.selected.length === 0 || loading"
@@ -68,12 +68,12 @@ <h1 mat-dialog-title>{{'DIALOGS.ADD_MEMBERS.TITLE' | translate}}</h1>
6868
</mat-menu>
6969
</span>
7070
<button
71-
(click)="onAdd()"
71+
mat-flat-button
7272
class="ml-2"
7373
color="accent"
7474
data-cy="add-button"
75-
[disabled]="selection.selected.length === 0 || loading || (this.data.type === 'group' && list !== undefined && !list.addAuth)"
76-
mat-flat-button>
75+
(click)="onAdd()"
76+
[disabled]="selection.selected.length === 0 || loading || (this.data.type === 'group' && list !== undefined && !list.addAuth)">
7777
{{'DIALOGS.ADD_MEMBERS.CREATE' | translate}}
7878
</button>
7979
</div>

0 commit comments

Comments
 (0)