26 lines
1.0 KiB
HTML
26 lines
1.0 KiB
HTML
<h2 mat-dialog-title class="text">Add item</h2>
|
|
|
|
<mat-dialog-content [formGroup]="form">
|
|
<mat-form-field class="text" appearance="outline">
|
|
<mat-label>Item</mat-label>
|
|
<input type="hidden" formControlName="id">
|
|
<input matInput placeholder="Item" formControlName="name">
|
|
</mat-form-field>
|
|
<mat-form-field class="text" appearance="outline">
|
|
<mat-label>Description</mat-label>
|
|
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
|
</mat-form-field>
|
|
<mat-form-field class="text" appearance="outline">
|
|
<mat-label>Price</mat-label>
|
|
<input matInput type="number" placeholder="Price" formControlName="cost">
|
|
<div *ngIf="!form.controls['cost'].valid && form.controls['cost'].touched">
|
|
<div *ngIf="form.controls['cost'].errors?.pattern">Use only numbers</div>
|
|
</div>
|
|
</mat-form-field>
|
|
</mat-dialog-content>
|
|
|
|
<mat-dialog-actions>
|
|
<button mat-raised-button class="text" (click)="close()">Close</button>
|
|
<button mat-raised-button class="text" color="primary" (click)="save()">Save</button>
|
|
</mat-dialog-actions>
|