Skip to content

Commit

Permalink
Fixed: Product identifiers is visible for selected product(#373)
Browse files Browse the repository at this point in the history
  • Loading branch information
R-Sourabh committed Apr 30, 2024
1 parent fc53c38 commit a4ae986
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
10 changes: 6 additions & 4 deletions src/views/AddProductModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
</ion-thumbnail>
<ion-label>
<!-- Honouring the identifications set by the user on the settings page -->
<h2>{{ product[productIdentificationPref.primaryId] }}</h2>
<p>{{ product[productIdentificationPref.secondaryId] }}</p>
<h2>{{ productHelpers.getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(product.productId)) }}</h2>
<p>{{ productHelpers.getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(product.productId)) }}</p>
</ion-label>
<ion-icon v-if="isProductAvailableInShipment(product.productId)" color="success" :icon="checkmarkCircle" />
<ion-button v-else fill="outline" @click="addtoShipment(product)">{{ translate("Add to Shipment") }}</ion-button>
Expand Down Expand Up @@ -70,7 +70,7 @@ import { closeOutline, checkmarkCircle } from 'ionicons/icons';
import { mapGetters } from 'vuex'
import { useStore } from "@/store";
import { DxpShopifyImg, translate } from '@hotwax/dxp-components';
import { showToast } from '@/utils'
import { showToast, productHelpers } from '@/utils'
export default defineComponent({
name: "Modal",
Expand Down Expand Up @@ -101,6 +101,7 @@ export default defineComponent({
computed: {
...mapGetters({
products: 'product/getProducts',
getProduct: 'product/getProduct',
isScrollable: 'product/isScrollable',
isProductAvailableInShipment: 'product/isProductAvailableInShipment',
productIdentificationPref: 'user/getProductIdentificationPref',
Expand Down Expand Up @@ -172,7 +173,8 @@ export default defineComponent({
closeOutline,
checkmarkCircle,
store,
translate
translate,
productHelpers
};
},
});
Expand Down
10 changes: 6 additions & 4 deletions src/views/AddProductToPOModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@
</ion-thumbnail>
<ion-label>
<!-- Honouring the identifications set by the user on the settings page -->
<h2>{{ product[productIdentificationPref.primaryId] }}</h2>
<p>{{ product[productIdentificationPref.secondaryId] }}</p>
<h2>{{ productHelpers.getProductIdentificationValue(productIdentificationPref.primaryId, getProduct(product.productId)) }}</h2>
<p>{{ productHelpers.getProductIdentificationValue(productIdentificationPref.secondaryId, getProduct(product.productId)) }}</p>
</ion-label>
<ion-icon v-if="isProductAvailableInOrder(product.productId)" color="success" :icon="checkmarkCircle" />
<ion-button v-else fill="outline" @click="addtoOrder(product)">{{ translate("Add to Purchase Order") }}</ion-button>
Expand Down Expand Up @@ -61,7 +61,7 @@ import { closeOutline, checkmarkCircle } from 'ionicons/icons';
import { mapGetters } from 'vuex'
import { useStore } from "@/store";
import { DxpShopifyImg, translate } from '@hotwax/dxp-components';
import { showToast } from '@/utils'
import { showToast, productHelpers } from '@/utils'
export default defineComponent({
name: "Modal",
Expand Down Expand Up @@ -92,6 +92,7 @@ export default defineComponent({
computed: {
...mapGetters({
products: 'product/getProducts',
getProduct: 'product/getProduct',
isScrollable: 'product/isScrollable',
isProductAvailableInOrder: 'order/isProductAvailableInOrder',
productIdentificationPref: 'user/getProductIdentificationPref',
Expand Down Expand Up @@ -163,7 +164,8 @@ export default defineComponent({
closeOutline,
checkmarkCircle,
store,
translate
translate,
productHelpers
};
},
});
Expand Down

0 comments on commit a4ae986

Please sign in to comment.