All files / app/page/submit/invoice invoice.component.html

75.4% Statements 46/61
63.63% Branches 7/11
12.5% Functions 1/8
83.78% Lines 31/37

Press n or j to go to the next uncovered block, b, p or k for the previous block.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 632x     1x 1x       2x     1x 1x 1x   2x 1x 1x     1x 1x   2x 1x 1x 1x 2x 1x       1x   1x 1x     2x   1x 1x   1x     1x     2x         1x 1x 2x     2x      
<form class="form" [formGroup]="invoiceForm" (ngSubmit)="submit()"
      [appLimitWidth]="fill" [limitSibling]="true">
 
  <label for="to" i18n>Queue:</label>
  <input id="to"
         type="email"
         autocorrect="off"
         autocapitalize="none"
         [value]="queue || ''"
         (change)="queue = $any($event.target).value">
 
  <label for="qr" i18n>QR Code:</label>
  <div class="form-array">
    <input id="qr"
           type="text"
           [formControl]="url"
           (blur)="validate($any($event.target))">
    <app-qr-scanner (data)="$event && url.setValue($event)"></app-qr-scanner>
  </div>
 
  <label for="title" i18n>Title:</label>
  <input id="title"
         type="text"
         [formControl]="title"
         (blur)="validate($any($event.target))">
  <span><!-- Title Errors --></span>
  <div>
    @if (title.touched && title.errors?.['required']) {
      <div class="error" i18n>
        Title must not be blank.
      </div>
    }
  </div>
 
  <span><!-- Message --></span>
  <div #fill class="fill-editor">
    <app-editor #editor
                class="bubble"
                [control]="comment"
                [addButton]="true"
                i18n-addCommentTitle addCommentTitle="Add message"
                i18n-addCommentLabel addCommentLabel="+ Add message"
                [fillWidth]="fill"
                (syncEditor)="syncEditor()"
                [tags]="$any(invoiceForm.value).tags"
                (syncTags)="editorTags = $event"
                (uploadCompleted)="completedUploads.push($event)"></app-editor>
  </div>
 
  @for (e of serverError; track e) {
    <span><!-- Unexpected Error --></span>
    <div class="error">{{ e }}</div>
  }
 
  <span><!-- Buttons --></span>
  <span class="buttons right">
      @if (submitting) {
        <app-loading [inline]="true"></app-loading>
      }
    <button type="submit" [disabled]="submitting || submitted && !invoiceForm.valid" i18n>Send</button>
  </span>
</form>