create-report-item.component.html 1.2 KB

1234567891011121314151617181920212223242526272829
  1. <h1 mat-dialog-title>Add new item</h1>
  2. <mat-error *ngIf="errorMessage">{{ errorMessage }}</mat-error>
  3. <div mat-dialog-content class="create-report-item-form-content">
  4. <mat-form-field>
  5. <input matInput placeholder="Item description" [(ngModel)]="item.description">
  6. </mat-form-field>
  7. <mat-form-field>
  8. <input matInput placeholder="Amount" type="number" [(ngModel)]="item.amount">
  9. </mat-form-field>
  10. <mat-form-field>
  11. <input matInput [matDatepicker]="picker" placeholder="Choose a date" [(ngModel)]="item.date">
  12. <mat-datepicker-toggle matSuffix [for]="picker"></mat-datepicker-toggle>
  13. <mat-datepicker #picker></mat-datepicker>
  14. </mat-form-field>
  15. <mat-form-field>
  16. <mat-select placeholder="expense type" [(ngModel)]="item.type">
  17. <mat-option *ngFor="let opt of itemTypeOptions" [value]="opt">{{opt}}</mat-option>
  18. </mat-select>
  19. </mat-form-field>
  20. <mat-checkbox [(ngModel)]="item.hasReceipt">Has receipt</mat-checkbox>
  21. </div>
  22. <div mat-dialog-actions>
  23. <button mat-button color="primary" (click)="addItem(item)">Add</button>
  24. <button mat-button mat-dialog-close>Cancel</button>
  25. </div>