44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
@if (itemResource.isLoading()) {
|
|
<app-skeleton-loader type="card" [count]="1" />
|
|
} @else if (itemResource.error()) {
|
|
<app-error-state (retryAction)="itemResource.reload()" />
|
|
} @else {
|
|
<h2>Table</h2>
|
|
<form class="flex-col">
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Name</mat-label>
|
|
<input matInput [formField]="form.name" (keyup.enter)="save()" />
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Seats</mat-label>
|
|
<input matInput type="number" [formField]="form.seats" />
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Section</mat-label>
|
|
<mat-select [formField]="form.section">
|
|
@for (s of sections(); track s.id) {
|
|
<mat-option [value]="s.id">
|
|
{{ s.name }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-checkbox [formField]="form.isActive">Is Active?</mat-checkbox>
|
|
</div>
|
|
</form>
|
|
|
|
<div class="row-container">
|
|
<button type="button" mat-raised-button (click)="save()" class="" color="primary">Save</button>
|
|
@if (!!item().id) {
|
|
<button type="button" mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
|
|
}
|
|
</div>
|
|
}
|