Files
barker/bookie/src/app/users/user-detail/user-detail.component.html
T
tanshu 010e9a84db Chore: Upgrade to Angular v18
Chore: Upgrade to Python 3.12
Chore: Upgrade to psycopg3
2024-06-03 13:22:56 +05:30

38 lines
1.6 KiB
HTML

<mat-card class="flex-auto lg:max-w-[50%]">
<mat-card-header>
<mat-card-title>User</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>
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto">
<mat-label>Password</mat-label>
<input matInput 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">Is Locked Out?</mat-checkbox>
</div>
<mat-divider></mat-divider>
<div formArrayName="roles">
@for (r of item.roles; track r; let i = $index) {
<div [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" class="mr-5" (click)="save()">Save</button>
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
</mat-card-actions>
</mat-card>