Chore: Updated mat inputs to better match the style guide. Removed placeholders in favour of labels.

This commit is contained in:
2023-01-31 17:49:15 +05:30
parent a28727756b
commit 10aca4071a
52 changed files with 209 additions and 441 deletions

View File

@ -7,17 +7,17 @@
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto">
<mat-label>Code</mat-label>
<input matInput placeholder="Code" formControlName="code" />
<input matInput formControlName="code" />
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto basis-4/5 mr-5">
<mat-label>Name</mat-label>
<input matInput #nameElement placeholder="Name" formControlName="name" />
<input matInput #nameElement formControlName="name" />
</mat-form-field>
<mat-form-field class="flex-auto basis-1/5">
<mat-label>Fraction Units</mat-label>
<input matInput placeholder="Fraction Units" formControlName="fractionUnits" />
<input matInput formControlName="fractionUnits" />
</mat-form-field>
</div>
<div class="flex flex-row justify-around content-start items-start">
@ -30,7 +30,7 @@
<div class="flex flex-row justify-around content-start items-start">
<mat-form-field class="flex-auto">
<mat-label>Product Type</mat-label>
<mat-select placeholder="Product Group" formControlName="productGroup">
<mat-select formControlName="productGroup">
<mat-option *ngFor="let pg of productGroups" [value]="pg.id">
{{ pg.name }}
</mat-option>
@ -44,28 +44,23 @@
>
<mat-form-field class="flex-auto mr-5">
<mat-label>Units</mat-label>
<input matInput placeholder="Units" formControlName="units" />
<input matInput formControlName="units" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Fraction</mat-label>
<input matInput type="number" placeholder="Fraction" formControlName="fraction" />
<input matInput type="number" formControlName="fraction" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Yield</mat-label>
<input matInput type="number" placeholder="Yield" formControlName="productYield" />
<input matInput type="number" formControlName="productYield" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>{{ item.isPurchased ? 'Purchase Price' : 'Cost Price' }}</mat-label>
<input
matInput
type="number"
placeholder="{{ item.isPurchased ? 'Purchase Price' : 'Cost Price' }}"
formControlName="costPrice"
/>
<input matInput type="number" formControlName="costPrice" />
</mat-form-field>
<mat-form-field class="flex-auto mr-5">
<mat-label>Sale Price</mat-label>
<input matInput type="number" placeholder="Sale Price" formControlName="salePrice" />
<input matInput type="number" formControlName="salePrice" />
</mat-form-field>
<button mat-raised-button color="primary" (click)="addRow()" class="flex-auto">Add</button>
</div>