Skip to content

Commit

Permalink
Merge pull request #315 from R-Sourabh/#304-primary-product-store
Browse files Browse the repository at this point in the history
Improved: Added a toast when we cannot set the product store as primary due to a missing Shopify shop(#304)
  • Loading branch information
ravilodhi authored Sep 17, 2024
2 parents 42b1cea + 8950077 commit d7e84a7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/components/ProductStorePopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,8 @@ export default defineComponent({
// if we does not get shopify shop id for the store then not making product store as primary
if(!shopifyShopId) {
showToast(translate('Failed to make product store primary due to missing Shopify shop'))
emitter.emit('dismissLoader')
return;
}
Expand Down
1 change: 1 addition & 0 deletions src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,7 @@
"Failed to find the facility locations": "Failed to find the facility locations",
"Failed to make product store as primary.": "Failed to make product store as primary.",
"Failed to make product store primary.": "Failed to make product store primary.",
"Failed to make product store primary due to missing Shopify shop": "Failed to make product store primary due to missing Shopify shop",
"Failed to regenerate latitude and longitude for the facility.": "Failed to regenerate latitude and longitude for the facility.",
"Failed to rename facility.": "Failed to rename facility.",
"Failed to remove facility latitude and longitude.": "Failed to remove facility latitude and longitude.",
Expand Down
2 changes: 1 addition & 1 deletion src/views/FacilityDetails.vue
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@
</ion-card-header>
<ion-item v-for="store in facilityProductStores" :key="store.productStoreId">
<ion-label>{{ getProductStore(store.productStoreId)?.storeName }}</ion-label>
<ion-badge slot="end" v-if="shopifyShopIdForProductStore(store.productStoreId) === current.primaryFacilityGroupId">{{ translate("primary store") }}</ion-badge>
<ion-badge slot="end" v-if="shopifyShopIdForProductStore(store.productStoreId) !== '' && shopifyShopIdForProductStore(store.productStoreId) === current.primaryFacilityGroupId">{{ translate("primary store") }}</ion-badge>
<ion-button slot="end" fill="clear" color="medium" @click="productStorePopover($event, store)">
<ion-icon slot="icon-only" :icon="ellipsisVerticalOutline" />
</ion-button>
Expand Down

0 comments on commit d7e84a7

Please sign in to comment.