-
Notifications
You must be signed in to change notification settings - Fork 32
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
Implemented: Add shop selector to menu footer(#2a7ymj3) #135
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We also need to handle this product store change functionality for all the other pages
src/views/Pipeline.vue
Outdated
@@ -384,18 +384,27 @@ export default defineComponent({ | |||
this.store.dispatch('job/fetchPendingJobs', {eComStoreId: this.getCurrentEComStore.productStoreId, viewSize:process.env.VUE_APP_VIEW_SIZE, viewIndex:0}).then(() => { | |||
if(event) event.target.complete(); | |||
this.isRetrying = false; | |||
emitter.off("selectedShop",this.refreshJobs); | |||
}).catch(()=>{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we used catch here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sir, When the promise is resolved It goes into the 'then' block. If 'then' returns a rejected promise, it goes to catch block. That's why I use the catch here.
src/views/Pipeline.vue
Outdated
@@ -445,16 +445,22 @@ export default defineComponent({ | |||
this.getPendingJobs().then(() => { | |||
if(event) event.target.complete(); | |||
this.isRetrying = false; | |||
}).catch(()=>{ | |||
this.isRetrying = false; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why we have changed this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sir, I used catch block here because when I ran this code at that time the spinner of the retry button was not stoping
and a rejected promise error came, that's why. I handle it in the catch block.
src/views/Pipeline.vue
Outdated
@@ -439,23 +439,23 @@ export default defineComponent({ | |||
event.target.complete(); | |||
}) | |||
}, | |||
async refreshJobs(event: any) { | |||
this.isRetrying = true; | |||
async refreshJobs(event: any, retry = false ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
async refreshJobs(event: any, retry = false ) { | |
async refreshJobs(event: any, isRetrying = false ) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok Sir
Need to update the value of autoCancelDays as well on productStore change |
Related Issues
Closes #
Short Description and Why It's Useful
Screenshots of Visual Changes before/after (If There Are Any)
IMPORTANT NOTICE - Remember to add changelog entry
Contribution and Currently Important Rules Acceptance
vide.mp4