feat: groups add and unassign role (#1027)

Fixes #1026
This commit is contained in:
Karan Takalkar
2020-07-08 14:19:51 +05:30
committed by GitHub
parent 5e9e71f66f
commit 356cda70b8
14 changed files with 454 additions and 140 deletions
@@ -0,0 +1,48 @@
<div class="container">
<mat-card>
<form [formGroup]="groupsAddRoleForm" (ngSubmit)="submit()">
<mat-card-content>
<div fxLayout="column">
<mat-form-field>
<mat-label>Client</mat-label>
<mat-select formControlName="clientId">
<mat-option *ngFor="let client of clientMemberData" [value]="client.id">
{{ client.displayName }}
</mat-option>
</mat-select>
<mat-error *ngIf="groupsAddRoleForm.controls.clientId.hasError('required')">
Client Member is <strong>required</strong>
</mat-error>
</mat-form-field>
<mat-form-field>
<mat-label>Role</mat-label>
<mat-select formControlName="role">
<mat-option *ngFor="let role of roleData" [value]="role.id">
{{ role.name }}
</mat-option>
</mat-select>
<mat-error *ngIf="groupsAddRoleForm.controls.role.hasError('required')">
Role is <strong>required</strong>
</mat-error>
</mat-form-field>
</div>
</mat-card-content>
<mat-card-actions fxLayout="row" fxLayout.xs="column" fxLayoutAlign="center" fxLayoutGap="5px">
<button type="button" mat-raised-button [routerLink]="['../']">Cancel</button>
<button mat-raised-button color="primary" [disabled]="!groupsAddRoleForm.valid">Confirm</button>
</mat-card-actions>
</form>
</mat-card>
</div>