23 lines
907 B
HTML
23 lines
907 B
HTML
<h2 mat-dialog-title class="text">Add item</h2>
|
|
|
|
<mat-dialog-content [formGroup]="form">
|
|
<mat-form-field class="text">
|
|
<input type="hidden" formControlName="id">
|
|
<input matInput placeholder="Item" formControlName="name">
|
|
</mat-form-field>
|
|
<mat-form-field class="text">
|
|
<textarea matInput placeholder="Description" formControlName="description"></textarea>
|
|
</mat-form-field>
|
|
<mat-form-field class="text">
|
|
<input matInput type="number" placeholder="Price in USD" 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>
|