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

Implemented: Add shop selector to menu footer(#2a7ymj3) #135

Merged
merged 16 commits into from
Dec 6, 2022

Conversation

Mayank909
Copy link
Contributor

@Mayank909 Mayank909 commented May 10, 2022

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

@Mayank909 Mayank909 changed the title Add shop selector to menu footer(#2a7ymj3) Implemented: Add shop selector to menu footer(#2a7ymj3) May 11, 2022
Copy link
Contributor

@ymaheshwari1 ymaheshwari1 left a 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

@@ -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(()=>{
Copy link
Contributor

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?

Copy link
Contributor Author

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 Show resolved Hide resolved
src/views/Product.vue Outdated Show resolved Hide resolved
src/components/Menu.vue Outdated Show resolved Hide resolved
src/components/Menu.vue Outdated Show resolved Hide resolved
src/components/Menu.vue Outdated Show resolved Hide resolved
src/views/Orders.vue Outdated Show resolved Hide resolved
src/views/Pipeline.vue Outdated Show resolved Hide resolved
src/components/Menu.vue Outdated Show resolved Hide resolved
src/components/Menu.vue Outdated Show resolved Hide resolved
@@ -445,16 +445,22 @@ export default defineComponent({
this.getPendingJobs().then(() => {
if(event) event.target.complete();
this.isRetrying = false;
}).catch(()=>{
this.isRetrying = false;
Copy link
Contributor

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?

Copy link
Contributor Author

@Mayank909 Mayank909 May 24, 2022

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 Show resolved Hide resolved
@@ -439,23 +439,23 @@ export default defineComponent({
event.target.complete();
})
},
async refreshJobs(event: any) {
this.isRetrying = true;
async refreshJobs(event: any, retry = false ) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
async refreshJobs(event: any, retry = false ) {
async refreshJobs(event: any, isRetrying = false ) {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ok Sir

@disha1202
Copy link
Contributor

Need to update the value of autoCancelDays as well on productStore change
#218

@adityasharma7 adityasharma7 merged commit e85443a into hotwax:main Dec 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants