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 logic to display an alert before route change(#2ymay5f) #88

Merged
merged 7 commits into from
Nov 14, 2022

Conversation

disha1202
Copy link
Contributor

@disha1202 disha1202 commented Nov 2, 2022

Related Issues

Closes #78

Short Description and Why It's Useful

If the user switches to another page, like the settings page, while reviewing their PO, when they return to the upload screen they land on the file upload screen which is disorienting.

Implemented a pop up that warns the user that if they switch to another screen while reviewing their PO, that their changes will be lost and they'll have to restart.

Screenshots of Visual Changes before/after (If There Are Any)

screen-recorder-fri-nov-04-2022-16-42-17.webm

IMPORTANT NOTICE - Remember to add changelog entry

Contribution and Currently Important Rules Acceptance

@disha1202 disha1202 marked this pull request as draft November 2, 2022 13:16
@disha1202 disha1202 marked this pull request as ready for review November 4, 2022 11:12
isParentProductUpdated: false
}
},
ionViewDidEnter(){
this.fetchFacilities();
},
async beforeRouteLeave(to, from) {
const alert = await alertController.create({
header: this.$t("Leave page"),
Copy link
Contributor

Choose a reason for hiding this comment

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

Add all the text to en.json

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The text is already added in en.json file

@@ -206,12 +206,38 @@ export default defineComponent({
facilities: [] as any,
queryString: "",
searchedProduct: {} as any,
canLeave: false,
Copy link
Contributor

Choose a reason for hiding this comment

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

We could use a local variable

@adityasharma7 adityasharma7 merged commit bb2ac1d into hotwax:main Nov 14, 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.

Warning when switching routes mid upload
3 participants