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 functionality to save auto cancel days(#2cxr1cx) #218

Merged
merged 13 commits into from
Aug 19, 2022

Conversation

disha1202
Copy link
Contributor

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

rathoreprashant and others added 6 commits August 4, 2022 11:41
 make a service (updateProductStore) and add a save button to the UI to save changes when user updates auto cancel days settings.
…r handling (#2cxr1cx)

used perform find to get the auto cancel days and added toast when auto cancel days are updated
@@ -274,6 +280,26 @@ export default defineComponent({
await this.store.dispatch('webhook/unsubscribeWebhook', { webhookId: webhook?.id, shopifyConfigId: this.shopifyConfigId })
}
},
async updateAutoCancelDays(){
if(this.autoCancelDays != this.updatedAutoCancelDays){
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we should check if selected product store is not the None while setting and getting

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made the requested change.

isDesktop: isPlatform('desktop')
isDesktop: isPlatform('desktop'),
autoCancelDays: '',
updatedAutoCancelDays: ''
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could have variable names as autoCancelDays and currentAutoCancelDays. Also, instead of checking in update method we should either disable the save button if both the values are same

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Made the requested change.

}
}
} else {
showToast(translate('None product store selected.'));
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
showToast(translate('None product store selected.'));
showToast(translate('Unable to update auto cancel days. None product store selected.'));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated toast message.

showToast(translate("Auto cancel days updated"));
this.autoCancelDays = this.updatedAutoCancelDays;
} else {
showToast(translate("Unable to edit auto cancel days"));
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
showToast(translate("Unable to edit auto cancel days"));
showToast(translate("Unable to update auto cancel days"));

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Updated toast message.

src/views/Orders.vue Outdated Show resolved Hide resolved
src/views/Orders.vue Outdated Show resolved Hide resolved
@adityasharma7 adityasharma7 merged commit 996ae90 into hotwax:main Aug 19, 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