49 lines
1.9 KiB
HTML
49 lines
1.9 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-title-group>
|
|
<mat-card-title>User</mat-card-title>
|
|
</mat-card-title-group>
|
|
<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 placeholder="Name" formControlName="name" />
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="flex flex-row justify-around content-start items-start">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Password</mat-label>
|
|
<input
|
|
matInput
|
|
placeholder="Password"
|
|
formControlName="password"
|
|
[type]="hide ? 'password' : 'text'"
|
|
/>
|
|
<mat-icon matSuffix (click)="hide = !hide">{{
|
|
hide ? 'visibility' : 'visibility_off'
|
|
}}</mat-icon>
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="flex flex-row justify-around content-start items-start">
|
|
<mat-checkbox formControlName="lockedOut" class="flex-auto">Is Locked Out?</mat-checkbox>
|
|
</div>
|
|
<mat-divider></mat-divider>
|
|
<div formArrayName="roles">
|
|
<div
|
|
*ngFor="let r of item.roles; index as i"
|
|
[formGroupName]="i"
|
|
class="flex flex-row justify-around content-start items-start"
|
|
>
|
|
<mat-checkbox formControlName="role" class="flex-auto">{{ r.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>
|