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
  heading="account.ordertemplates.widget.heading"
  class="infobox-wrapper h-100"
  cssClass="infobox-color-widget d-flex flex-column"
>
  <div class="loading-container">
    <div *ngIf="(loading$ | async) !== true; else loading" class="pb-2">
      <ng-container *ngIf="orderTemplates$ | async as orderTemplates; else emptyList">
        <ng-container *ngIf="orderTemplates.length; else emptyList">
          <div *ngFor="let orderTemplate of orderTemplates" class="mb-2">
            <a [routerLink]="['/account/order-templates/', orderTemplate.id]" class="text-decoration-none">{{
              orderTemplate.title
            }}</a>
            <a *ngIf="orderTemplate.items?.length" class="align-top float-right">
              <ish-product-add-to-basket
                ishProductContext
                [parts]="getParts(orderTemplate)"
                displayType="icon"
                cssClass="p-0 mb-0"
              />
            </a>
          </div>
        </ng-container>
      </ng-container>
      <ng-template #emptyList>
        {{ 'account.order_template.list.no_templates.text' | translate }}
      </ng-template>
    </div>
  </div>
 
  <div class="mt-auto">
    <a routerLink="/account/order-templates" data-testing-id="order-templates-list-link">
      {{ 'account.ordertemplates.widget.view_all.link' | translate }}
    </a>
  </div>
</ish-info-box>
 
<ng-template #loading>
  <ish-loading />
</ng-template>