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 | 4x | @if (visible$ | async) {
@if (variationOptions$ | async; as variationOptions) {
@for (group of variationOptions; track group.id) {
<div class="product-variation">
<div class="form-group">
<label class="col-form-label" [for]="uuid + group.id" [id]="uuid + group.id + '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"
[multipleOptions]="variationOptions.length > 1"
[uuid]="uuid"
(changeOption)="optionChange($event)"
/>
}
@default {
<ish-product-variation-select-default
[group]="group"
[multipleOptions]="variationOptions.length > 1"
[uuid]="uuid"
(changeOption)="optionChange($event)"
/>
}
}
</div>
</div>
}
}
}
|