Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improved: Added a toast when we cannot set the product store as primary due to a missing Shopify shop(#304) #315

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading