44 lines
1.4 KiB
HTML
44 lines
1.4 KiB
HTML
<h2>Modifier</h2>
|
|
<form class="flex-col">
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Name</mat-label>
|
|
<input matInput #name [formField]="form.name" />
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-checkbox [formField]="form.showInBill">Show In Bill?</mat-checkbox>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Price</mat-label>
|
|
<input matInput type="number" [formField]="form.price" />
|
|
</mat-form-field>
|
|
</div>
|
|
<div class="row-container">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Category</mat-label>
|
|
<mat-select [formField]="form.modifierCategory">
|
|
@for (mc of modifierCategories(); track mc) {
|
|
<mat-option [value]="mc.id">
|
|
{{ mc.name }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
@for (error of form.modifierCategory().errors(); track error) {
|
|
<mat-error>{{ error.message }}</mat-error>
|
|
}
|
|
</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 color="primary" [disabled]="form().invalid()" (click)="save()">Save</button>
|
|
@if (!!item().id) {
|
|
<button type="button" mat-raised-button color="warn" (click)="confirmDelete()">Delete</button>
|
|
}
|
|
</div>
|