Skip to content

Commit

Permalink
Merge pull request #38 from bashu22tiwari/#1xx6u1f
Browse files Browse the repository at this point in the history
Handle empty check for color and size for orders page (#1xx6u1f)
  • Loading branch information
adityasharma7 authored Jan 6, 2022
2 parents 668a80d + 397e51d commit e68e7ec
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 8 deletions.
6 changes: 6 additions & 0 deletions changelogs/unreleased/-1xx6u1f.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
title: Handle empty check for color and size for orders page
ticket_id: "#1xx6u1f"
merge_request: 38
author: Bashu Tiwari
type: performance
4 changes: 2 additions & 2 deletions src/views/orders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@
</ion-thumbnail>
<ion-label>
<h2>{{ item.parentProductName ? item.parentProductName :item.productName }}</h2>
<p>{{ $t("Color") }} : {{ $filters.getFeature(getProduct(item.productId).featureHierarchy, '1/COLOR/') }}</p>
<p>{{ $t("Size") }} : {{ $filters.getFeature(getProduct(item.productId).featureHierarchy, '1/SIZE/') }}</p>
<p v-if="$filters.getFeature(getProduct(item.productId).featureHierarchy, '1/COLOR/')">{{ $t("Color") }} : {{ $filters.getFeature(getProduct(item.productId).featureHierarchy, '1/COLOR/') }}</p>
<p v-if="$filters.getFeature(getProduct(item.productId).featureHierarchy, '1/SIZE/')">{{ $t("Size") }} : {{ $filters.getFeature(getProduct(item.productId).featureHierarchy, '1/SIZE/') }}</p>
</ion-label>
</ion-item>
<ion-item lines="none">
Expand Down
8 changes: 4 additions & 4 deletions src/views/product-details.vue
Original file line number Diff line number Diff line change
Expand Up @@ -29,15 +29,15 @@
<h1>{{ current.product.productName }}</h1>
</ion-item>
<div class="product-features">
<ion-list>
<ion-list v-if="$filters.getFeaturesList(current.product.featureHierarchy, '1/COLOR/').length">
<ion-list-header>{{ $t("Colors") }}</ion-list-header>
<ion-item lines="none">
<ion-row>
<ion-chip v-bind:key="colorFeature" v-for="colorFeature in $filters.getFeaturesList(current.product.featureHierarchy, '1/COLOR/')" @click="filter(colorFeature, 'color')"> <ion-label>{{ colorFeature }}</ion-label></ion-chip>
</ion-row>
</ion-item>
</ion-list>
<ion-list>
<ion-list v-if="$filters.getFeaturesList(current.product.featureHierarchy, '1/SIZE/').length">
<ion-list-header>{{ $t("Sizes") }} </ion-list-header>
<ion-item lines="none">
<ion-row>
Expand Down Expand Up @@ -124,8 +124,8 @@
</ion-thumbnail>
<ion-label>
<h2> {{ getProduct(item.groupValue).productName }}</h2>
<p>{{ $t("Color") }}: {{ $filters.getFeature(getProduct(item.groupValue).featureHierarchy, '1/COLOR/') }}</p>
<p>{{ $t("Size") }}: {{ $filters.getFeature(getProduct(item.groupValue).featureHierarchy, '1/SIZE/') }}</p>
<p v-if="$filters.getFeature(getProduct(item.groupValue).featureHierarchy, '1/COLOR/')">{{ $t("Color") }}: {{ $filters.getFeature(getProduct(item.groupValue).featureHierarchy, '1/COLOR/') }}</p>
<p v-if="$filters.getFeature(getProduct(item.groupValue).featureHierarchy, '1/SIZE/')">{{ $t("Size") }}: {{ $filters.getFeature(getProduct(item.groupValue).featureHierarchy, '1/SIZE/') }}</p>
</ion-label>
</ion-item>
</div>
Expand Down
4 changes: 2 additions & 2 deletions src/views/products.vue
Original file line number Diff line number Diff line change
Expand Up @@ -33,8 +33,8 @@
</ion-thumbnail>
<ion-label>
<h2>{{ getProduct(product.groupValue).productName}}</h2>
<p>{{ $t("Colors") }} : {{ $filters.getFeatures(getProduct(product.groupValue).featureHierarchy, '1/COLOR/') }} </p>
<p>{{ $t("Sizes") }} : {{ $filters.getFeatures(getProduct(product.groupValue).featureHierarchy, '1/SIZE/') }} </p>
<p v-if="$filters.getFeatures(getProduct(product.groupValue).featureHierarchy, '1/COLOR/')">{{ $t("Colors") }} : {{ $filters.getFeatures(getProduct(product.groupValue).featureHierarchy, '1/COLOR/') }} </p>
<p v-if="$filters.getFeatures(getProduct(product.groupValue).featureHierarchy, '1/SIZE/')">{{ $t("Sizes") }} : {{ $filters.getFeatures(getProduct(product.groupValue).featureHierarchy, '1/SIZE/') }} </p>
</ion-label>
<ion-badge slot="end" color="success">{{ product.doclist.numFound }} {{ $t("pieces preordered") }}</ion-badge>
</ion-item>
Expand Down

0 comments on commit e68e7ec

Please sign in to comment.