32 lines
1.2 KiB
HTML
32 lines
1.2 KiB
HTML
<div class="flex flex-auto flex-row justify-around content-center items-center lg:max-w-[50%]">
|
|
<mat-card class="flex-auto">
|
|
<mat-card-header>
|
|
<mat-card-title>Role</mat-card-title>
|
|
</mat-card-header>
|
|
<mat-card-content>
|
|
<form [formGroup]="form" class="flex flex-col">
|
|
<div class="flex flex-row justify-around content-start items-start">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Name</mat-label>
|
|
<input matInput #nameElement formControlName="name" />
|
|
</mat-form-field>
|
|
</div>
|
|
<mat-divider></mat-divider>
|
|
<div formArrayName="permissions">
|
|
<div
|
|
class="flex flex-row justify-around content-start items-start"
|
|
*ngFor="let p of item.permissions; index as i"
|
|
[formGroupName]="i"
|
|
>
|
|
<mat-checkbox formControlName="permission" class="flex-auto">{{ p.name }}</mat-checkbox>
|
|
</div>
|
|
</div>
|
|
</form>
|
|
</mat-card-content>
|
|
<mat-card-actions>
|
|
<button mat-raised-button color="primary" (click)="save()">Save</button>
|
|
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
|
|
</mat-card-actions>
|
|
</mat-card>
|
|
</div>
|