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: Fixed popover not closing and corrected the primary store tag display issue(#304) #317

Merged
merged 3 commits into from
Nov 20, 2024
Merged
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion src/components/ProductStorePopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ export default defineComponent({
primaryFacilityGroupId: ''
})
}

await this.store.dispatch('facility/updateCurrentFacility', { ...this.current, primaryFacilityGroupId: '' })
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should update the current facility to primaryFacilityGroupId='' only when updateFacility api is successful. So move the code inside the if block.

// refetching product stores with updated roles
await this.store.dispatch('facility/getFacilityProductStores', { facilityId: this.facilityId })
} else {
Expand Down Expand Up @@ -119,6 +119,7 @@ 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'))
popoverController.dismiss()
emitter.emit('dismissLoader')
return;
}
Expand Down
Loading