Bernd-L/exDateMan

View on GitHub
frontend/src/app/components/add-inventory/add-inventory.component.html

Summary

Maintainability
Test Coverage
<div class="mat-typography">
  <form [formGroup]="form" (ngSubmit)="onSubmit(form.value)">
    <mat-form-field appearance="outline">
      <mat-label>Inventory name</mat-label>
      <input
        matInput
        type="text"
        placeholder="Someones inventory"
        formControlName="name"
        required
        autocomplete="new-inventory-name"
      />
      <i matSuffix class="material-icons">crop_free</i>
      <!-- <mat-hint>Hint</mat-hint> -->
    </mat-form-field>
    <br />
    <button
      mat-raised-button
      color="accent"
      [disabled]="!form.valid"
      type="submit"
    >
      Add inventory
    </button>
  </form>

  <br />
  <br />
  <div *ngIf="oof">
    We couldn't create the inventory. <br />
    Please try again later.
  </div>
</div>