All files / src/app/shared/components/product/product-variation-select product-variation-select.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 274x                                                    
@if (visible$ | async) { @if (variationOptions$ | async; as variationOptions) { @for (group of variationOptions; track
group.id) {
<div class="product-variation">
  <div class="form-group">
    <label [for]="uuid + group.id" [id]="uuid + group.id + 'label'" class="col-form-label">{{ group.label }}</label>
    <!-- multiple switch case expressions - https://stackoverflow.com/a/45950368 -->
    @switch (true) { @case (group.attributeType === 'colorCode' || group.attributeType === 'swatchImage') {
    <ish-product-variation-select-swatch [group]="group" (changeOption)="optionChange($event)" />
    } @case ( group.attributeType === 'defaultAndColorCode' || group.attributeType === 'defaultAndSwatchImage' ) {
    <ish-product-variation-select-enhanced
      [group]="group"
      [uuid]="uuid"
      [multipleOptions]="variationOptions.length > 1"
      (changeOption)="optionChange($event)"
    />
    } @default {
    <ish-product-variation-select-default
      [group]="group"
      [uuid]="uuid"
      [multipleOptions]="variationOptions.length > 1"
      (changeOption)="optionChange($event)"
    />
    } }
  </div>
</div>
} } }