All files / src/app/extensions/product-notifications/shared/product-notification-edit-dialog product-notification-edit-dialog.component.html

100% Statements 1/1
100% Branches 0/0
100% Functions 0/0
100% Lines 1/1

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 532x                                                                                                        
<ng-template #modal let-selectModal>
  <div class="modal-header">
    <h2 class="modal-title">
      <ng-container *ngIf="product$ | async as product">
        {{ product.name }}
      </ng-container>
    </h2>
    <button type="button" class="close" [title]="'dialog.close.text' | translate" (click)="hide()">
      <span aria-hidden="true">&times;</span>
    </button>
  </div>
 
  <ng-container *ngIf="productNotification$ | async as productNotification; else createNotificationButton">
    <form [formGroup]="productNotificationForm" (ngSubmit)="submitForm()">
      <div class="modal-body">
        <ish-product-image imageType="L" />
 
        <ish-product-notification-edit-form
          [form]="productNotificationForm"
          [productNotification]="productNotification"
          [userEmail]="userEmail$ | async"
        />
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-primary" data-testing-id="product-notification-edit-dialog-edit">
          {{ 'product.notification.edit.form.update.button.label' | translate }}
        </button>
        <button type="button" class="btn btn-secondary" (click)="hide()">
          {{ 'product.notification.edit.form.cancel.button.label' | translate }}
        </button>
      </div>
    </form>
  </ng-container>
 
  <ng-template #createNotificationButton>
    <form [formGroup]="productNotificationForm" (ngSubmit)="submitForm()">
      <div class="modal-body">
        <ish-product-image imageType="L" />
 
        <ish-product-notification-edit-form [form]="productNotificationForm" [userEmail]="userEmail$ | async" />
      </div>
      <div class="modal-footer">
        <button type="submit" class="btn btn-primary">
          {{ 'product.notification.edit.form.create.button.label' | translate }}
        </button>
        <button type="button" class="btn btn-secondary" (click)="hide()">
          {{ 'product.notification.edit.form.cancel.button.label' | translate }}
        </button>
      </div>
    </form>
  </ng-template>
</ng-template>