All files / src/app/extensions/order-templates/shared/order-template-widget order-template-widget.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 411x                                                                                
<ish-info-box
  class="infobox-wrapper h-100"
  cssClass="infobox-color-widget d-flex flex-column"
  heading="account.ordertemplates.widget.heading"
>
  <div class="loading-container">
    @if ((loading$ | async) !== true) {
      <div class="pb-2">
        @let orderTemplates = orderTemplates$ | async;
        @if (orderTemplates?.length) {
          @for (orderTemplate of orderTemplates; track orderTemplate.id) {
            <div class="mb-2">
              <a [routerLink]="['/account/order-templates/', orderTemplate.id]">{{ orderTemplate.title }}</a>
              @if (orderTemplate.items?.length) {
                <span class="align-top float-end">
                  <ish-product-add-to-basket
                    cssClass="p-0 mb-0"
                    displayType="icon"
                    ishProductContext
                    [parts]="getParts(orderTemplate)"
                  />
                </span>
              }
            </div>
          }
        } @else {
          {{ 'account.order_template.list.no_templates.text' | translate }}
        }
      </div>
    } @else {
      <ish-loading />
    }
  </div>
 
  <div class="mt-auto">
    <a data-testing-id="order-templates-list-link" routerLink="/account/order-templates">
      {{ 'account.ordertemplates.widget.view_all.link' | translate }}
    </a>
  </div>
</ish-info-box>