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

43 lines
1.6 KiB
HTML

<mat-card class="flex-auto lg:max-w-[50%]">
<mat-card-header>
<mat-card-title>Table</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" (keyup.enter)="save()" />
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto">
<mat-label>Seats</mat-label>
<input matInput type="number" formControlName="seats" />
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto">
<mat-label>Section</mat-label>
<mat-select formControlName="section">
@for (s of sections; track s) {
<mat-option [value]="s.id">
{{ s.name }}
</mat-option>
}
</mat-select>
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start">
<mat-checkbox formControlName="isActive">Is Active?</mat-checkbox>
</div>
</form>
</mat-card-content>
<mat-card-actions>
<button mat-raised-button (click)="save()" class="mr-5" color="primary">Save</button>
@if (!!item.id) {
<button mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
}
</mat-card-actions>
</mat-card>