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 522x                                                                                                      
<ng-template #modal let-selectModal>
  <div class="modal-header">
    <h2 id="product-notification-edit-modal-title" class="modal-title">
      @if (product$ | async; as product) {
      {{ product.name }}
      }
    </h2>
    <button type="button" class="btn-close" [title]="'dialog.close.text' | translate" (click)="hide()"></button>
  </div>
 
  @if (productNotification$ | async; as productNotification) {
  <form [formGroup]="productNotificationForm" ishFormSubmit #form="ngForm" (ngSubmit)="submitForm()" novalidate>
    <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"
        [disabled]="productNotificationForm.invalid && form.submitted"
        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>
  } @else {
  <form [formGroup]="productNotificationForm" ishFormSubmit (ngSubmit)="submitForm()" novalidate>
    <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>