66 lines
2.5 KiB
HTML
66 lines
2.5 KiB
HTML
<h1 mat-dialog-title>Edit Product SKU</h1>
|
|
<div mat-dialog-content>
|
|
<form>
|
|
<div class="flex flex-row flex-wrap justify-around content-start items-start sm:max-lg:flex-col">
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Units</mat-label>
|
|
<input matInput [formField]="form.units" />
|
|
@for (error of form.units().errors(); track $index) {
|
|
<mat-error>{{ error.message }}</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Fraction</mat-label>
|
|
<input matInput type="number" [formField]="form.fraction" />
|
|
@for (error of form.fraction().errors(); track $index) {
|
|
<mat-error>{{ error.message }}</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Yield</mat-label>
|
|
<input matInput type="number" [formField]="form.productYield" />
|
|
@for (error of form.productYield().errors(); track $index) {
|
|
<mat-error>{{ error.message }}</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Cost Price</mat-label>
|
|
<input matInput type="number" [formField]="form.costPrice" />
|
|
@for (error of form.costPrice().errors(); track $index) {
|
|
<mat-error>{{ error.message }}</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Sale Price</mat-label>
|
|
<input matInput type="number" [formField]="form.salePrice" />
|
|
@for (error of form.salePrice().errors(); track $index) {
|
|
<mat-error>{{ error.message }}</mat-error>
|
|
}
|
|
</mat-form-field>
|
|
|
|
<mat-form-field class="flex-auto">
|
|
<mat-label>Menu Category</mat-label>
|
|
<mat-select [formField]="form.menuCategory">
|
|
@for (mc of menuCategories; track mc.id) {
|
|
<mat-option [value]="mc.id">
|
|
{{ mc.name }}
|
|
</mat-option>
|
|
}
|
|
</mat-select>
|
|
</mat-form-field>
|
|
|
|
<mat-checkbox [formField]="form.hasHappyHour" class="flex-auto">Has Happy Hour?</mat-checkbox>
|
|
<mat-checkbox [formField]="form.isNotAvailable" class="flex-auto">Not Available?</mat-checkbox>
|
|
</div>
|
|
</form>
|
|
</div>
|
|
|
|
<div mat-dialog-actions>
|
|
<button mat-raised-button color="warn" [mat-dialog-close]="false" cdkFocusInitial>Cancel</button>
|
|
<button type="button" mat-raised-button color="primary" [disabled]="form().invalid()" (click)="accept()">Ok</button>
|
|
</div>
|