toSignal via Gemini

This commit is contained in:
2026-08-18 07:55:54 +00:00
parent 59eb45da96
commit 993f83c786
350 changed files with 6231 additions and 9801 deletions
@@ -1,35 +1,50 @@
<h1 mat-dialog-title>Edit Product SKU</h1>
<div mat-dialog-content>
<form [formGroup]="form">
<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 formControlName="units" />
<input matInput [formField]="form.units" />
@for (error of form.units().errors(); track error) {
<mat-error>{{ error.message }}</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Fraction</mat-label>
<input matInput type="number" formControlName="fraction" />
<input matInput type="number" [formField]="form.fraction" />
@for (error of form.fraction().errors(); track error) {
<mat-error>{{ error.message }}</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Yield</mat-label>
<input matInput type="number" formControlName="productYield" />
<input matInput type="number" [formField]="form.productYield" />
@for (error of form.productYield().errors(); track error) {
<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" formControlName="costPrice" />
<input matInput type="number" [formField]="form.costPrice" />
@for (error of form.costPrice().errors(); track error) {
<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" formControlName="salePrice" />
<input matInput type="number" [formField]="form.salePrice" />
@for (error of form.salePrice().errors(); track error) {
<mat-error>{{ error.message }}</mat-error>
}
</mat-form-field>
<mat-form-field class="flex-auto">
<mat-label>Menu Category</mat-label>
<mat-select formControlName="menuCategory">
<mat-select [formField]="form.menuCategory">
@for (mc of menuCategories; track mc) {
<mat-option [value]="mc.id">
{{ mc.name }}
@@ -38,13 +53,13 @@
</mat-select>
</mat-form-field>
<mat-checkbox formControlName="hasHappyHour" class="flex-auto">Has Happy Hour?</mat-checkbox>
<mat-checkbox formControlName="isNotAvailable" class="flex-auto">Not Available?</mat-checkbox>
<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 mat-raised-button color="primary" (click)="accept()">Ok</button>
<button type="button" mat-raised-button color="primary" [disabled]="form().invalid()" (click)="accept()">Ok</button>
</div>