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: refetching product store setting from all the major pages #443

Open
wants to merge 5 commits into
base: main
Choose a base branch
from
Open
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
1 change: 1 addition & 0 deletions src/views/Catalog.vue
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ export default defineComponent({
},

async ionViewWillEnter() {
await this.store.dispatch("user/fetchBopisProductStoreSettings");
this.isScrollingEnabled = false;
this.queryString = this.products.queryString;
this.getProducts();
Expand Down
1 change: 1 addition & 0 deletions src/views/OrderDetail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -532,6 +532,7 @@ export default defineComponent({
},
async mounted() {
emitter.emit("presentLoader")
await this.store.dispatch("user/fetchBopisProductStoreSettings");
await this.getOrderDetail(this.orderId, this.orderPartSeqId, this.orderType);

// fetch customer details and rejection reasons only when we get the orders information
Expand Down
3 changes: 2 additions & 1 deletion src/views/Orders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,8 @@ export default defineComponent({
}
}
},
ionViewWillEnter () {
async ionViewWillEnter () {
await this.store.dispatch("user/fetchBopisProductStoreSettings");
this.isScrollingEnabled = false;
this.queryString = '';

Expand Down
1 change: 1 addition & 0 deletions src/views/Settings.vue
Original file line number Diff line number Diff line change
Expand Up @@ -279,6 +279,7 @@ export default defineComponent({
this.appVersion = this.appInfo.branch ? (this.appInfo.branch + "-" + this.appInfo.revision) : this.appInfo.tag;
},
async ionViewWillEnter() {
await this.store.dispatch("user/fetchBopisProductStoreSettings");
// Only fetch configuration when environment mapping exists
if (Object.keys(this.rerouteFulfillmentConfigMapping).length > 0) {
this.getAvailableShipmentMethods();
Expand Down
3 changes: 2 additions & 1 deletion src/views/ShipToStoreOrders.vue
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,8 @@ export default defineComponent({
return alert.present();
},
},
ionViewWillEnter() {
async ionViewWillEnter() {
await this.store.dispatch("user/fetchBopisProductStoreSettings");
this.isScrollingEnabled = false;
this.queryString = '';
if (this.segmentSelected === 'incoming') {
Expand Down
Loading