-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rework product-item-variations component
- Loading branch information
Showing
9 changed files
with
153 additions
and
117 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 12 additions & 21 deletions
33
.../shared/components/product/product-item-variations/product-item-variations.component.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,15 @@ | ||
<ng-container *ngIf="variationCount$ | async as variationCount; else variationProduct"> | ||
<span class="product-variation read-only">{{ variationCount }} {{ 'product.variations.text' | translate }}</span> | ||
</ng-container> | ||
<ng-template #variationProduct> | ||
<div *ngIf="visible$ | async" class="product-variation-container"> | ||
<ng-container | ||
*ngIf=" | ||
'preferences.ChannelPreferences.EnableAdvancedVariationHandling' | ishServerSetting; | ||
else normalVariationDisplay | ||
" | ||
> | ||
<ng-container *ngIf="visible$ | async"> | ||
<ng-container *ngIf="isMasterProduct$ | async"> | ||
<span class="product-variation read-only">{{ | ||
'product.variations.text' | translate : { '0': variationCount$ | async } | ||
}}</span> | ||
</ng-container> | ||
<ng-container *ngIf="isVariationProduct$ | async"> | ||
<ng-container *ngIf="readOnly$ | async; else variationSelect"> | ||
<ish-product-variation-display /> | ||
</ng-container> | ||
<ng-template #normalVariationDisplay> | ||
<ng-container *ngIf="readOnly$ | async; else variationSelect"> | ||
<ish-product-variation-display /> | ||
</ng-container> | ||
<ng-template #variationSelect> | ||
<ish-product-variation-select /> | ||
</ng-template> | ||
</div> | ||
|
||
<ng-template #variationSelect> | ||
<ish-product-variation-select /> | ||
</ng-template> | ||
</ng-template> | ||
</ng-container> | ||
</ng-container> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters