All files / src/app/shared/components/line-item/line-item-list-element line-item-list-element.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 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 1522x                                                                                                                                                                                                                                                                                                              
<div class="row list-item-row" data-testing-id="product-list-item">
  <!-- Errors and Infos -->
  <div *ngIf="pli.validationError?.message" class="alert alert-inline alert-danger col-12">
    {{ pli.validationError.message }}
  </div>
  <div *ngIf="pli.info?.message" class="alert alert-inline alert-info col-12">
    {{ pli.info.message }}
  </div>
 
  <!-- Product Image -->
  <div class="col-2 list-item">
    <ish-product-image imageType="S" [link]="true" />
  </div>
 
  <div class="col-7 col-md-6 col-xl-4 list-item">
    <!--Product Description -->
    <div class="pli-description">
      <ish-product-name [alternate]="pli.name" />
 
      <!-- Product ID -->
      <ish-product-id />
 
      <!-- Product Variations -->
      <ish-product-variation-display />
      <!-- Product Bundles -->
      <ish-product-bundle-display />
 
      <!-- switch by lineItemViewType -->
      <ng-container [ngSwitch]="lineItemViewType">
        <!-- lineItemViewType = 'simple' -->
        <ng-container *ngSwitchCase="'simple'" />
 
        <!-- lineItemViewType = 'availability' -->
        <ng-container *ngSwitchCase="'availability'">
          <ish-product-inventory />
        </ng-container>
 
        <!-- default lineItemViewType -->
        <ng-container *ngSwitchDefault>
          <!-- edit variation & quantity -->
          <ng-container *ngIf="editable">
            <ish-line-item-edit
              *ngIf="!('preferences.ChannelPreferences.EnableAdvancedVariationHandling' | ishServerSetting)"
              ishProductContext
              [sku]="pli.productSKU"
              [quantity]="pli.quantity.value"
              [itemId]="pli.id"
              (updateItem)="onUpdateItem($event)"
            />
          </ng-container>
 
          <!-- availability -->
          <ish-product-inventory />
 
          <!-- ship window message -->
          <ish-product-shipment />
 
          <!-- surcharges -->
          <div *ngFor="let surcharge of pli.itemSurcharges">
            {{ surcharge.displayName }} <span *ngIf="!surcharge.displayName">{{ surcharge.text }}</span>
            <span class="text-nowrap"> {{ surcharge.amount | ishPrice }} </span>
            <ng-template #SurchargeDescription> <span [innerHTML]="surcharge.description"></span> </ng-template>
            <a
              class="details-tooltip"
              [ngbPopover]="SurchargeDescription"
              [popoverTitle]="surcharge.displayName"
              placement="top"
            >
              {{ 'shopping_cart.detail.text' | translate }}
              <fa-icon [icon]="['fas', 'info-circle']" />
            </a>
          </div>
        </ng-container>
      </ng-container>
 
      <!-- promotions -->
      <div *ngIf="pli.valueRebates?.length">
        <ng-container *ngFor="let rebate of pli.valueRebates">
          <ish-basket-promotion [rebate]="rebate" class="list-item-promo" />
        </ng-container>
      </div>
      <div class="d-flex align-items-end">
        <ish-lazy-product-add-to-order-template
          *ngIf="editable"
          [cssClass]="'btn-link btn-tool pl-0 add-to-order-template'"
          displayType="icon"
        />
        <ish-lazy-product-add-to-wishlist *ngIf="editable" [cssClass]="'btn-link btn-tool'" displayType="icon" />
        <button
          *ngIf="!pli.isFreeGift && editable"
          class="btn-tool btn-link"
          [attr.data-testing-id]="'remove-line-item'"
          [attr.data-id]="pli.id"
          title="{{ 'shopping_cart.remove.item.button.label' | translate }}"
          (click)="onDeleteItem(pli.id)"
        >
          <fa-icon [icon]="['fas', 'trash-alt']" />
        </button>
      </div>
    </div>
 
    <!-- mobile quantity -->
    <div class="quantity d-xl-none">
      <div class="form-group">
        <ish-product-quantity-label
          translationKey="shopping_cart.pli.qty.label"
          [for]="'pli-quantity_' + pli.position"
          class="d-xl-none col-form-label"
        />
        <ish-product-quantity *ngIf="editable; else readonly" [elementId]="'pli-quantity_' + pli.position" />
        <ng-template #readonly>{{ pli.quantity.value | number }}</ng-template>
      </div>
    </div>
  </div>
 
  <!-- desktop quantity -->
  <div class="quantity col-xl-2 list-item d-none d-xl-flex">
    <div class="form-group w-100 text-right" [ngClass]="{ 'pr-2': !editable }">
      <ish-product-quantity *ngIf="editable; else readonly" [elementId]="'pli-quantity_' + pli.position" />
      <ng-template #readonly>{{ pli.quantity.value | number }}</ng-template>
    </div>
  </div>
 
  <!-- Prices -->
  <div class="col-md-2 d-none d-md-block list-item column-price single-price">
    <!-- (Suggested) Single Base Price  -->
    <div>
      {{ pli.singleBasePrice | ishPrice }}
    </div>
    <!-- Undiscounted single price -->
    <div *ngIf="oldPrice" class="old-price">
      <span class="price-value">{{ oldPrice | ishPrice }}</span>
    </div>
  </div>
  <div *ngIf="pli.totals" class="col-3 col-md-2 list-item column-price">
    <div>
      <!-- (Suggested) Total Price  -->
      <div data-testing-id="total-price">{{ pli.totals.total | ishPrice }}</div>
    </div>
 
    <!-- Value Rebates Total -->
    <div *ngIf="pli.totals.valueRebatesTotal" class="old-price">
      <span class="price-value">{{ pli.totals.undiscountedTotal | ishPrice }}</span>
    </div>
 
    <!-- Gift -->
    <div *ngIf="pli.isFreeGift" class="list-item-promo">{{ 'checkout.pli.freegift.text' | translate }}</div>
  </div>
  <!-- display/select warranty if available -->
  <ish-line-item-warranty [pli]="pli" [editable]="editable" class="col-12" />
</div>