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

Fixed: Re-clicking on Upload file button & cancelling it gives error (#85zrhfp4c) #143

Merged
merged 7 commits into from
Feb 1, 2023

Conversation

alsoK2maan
Copy link
Contributor

Related Issues

Closes #121

Short Description and Why It's Useful

Unwanted error is removed, also if we decide not to upload a file, current file says selected.

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

IMPORTANT NOTICE - Remember to add changelog entry

Contribution and Currently Important Rules Acceptance

shashwatbangar and others added 4 commits January 5, 2023 17:05
… this was due to when we re-click on upload button to upload a file and click on cancel to cancel it, current file gets removed thus gives error accessing file name(#85zrhfp4c)
src/views/PurchaseOrder.vue Outdated Show resolved Hide resolved
}
else {
showToast(translate("Something went wrong. Please try again"));
showToast(translate("No new file upload. Please try again"));
Copy link
Contributor

@ymaheshwari1 ymaheshwari1 Jan 11, 2023

Choose a reason for hiding this comment

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

It works when trying to change the file first time, but if we repeat changing the file more than once, then it does not work.

Copy link
Contributor Author

@alsoK2maan alsoK2maan Jan 11, 2023

Choose a reason for hiding this comment

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

Yes, sir. As we open the file dialogue but do not upload a new file, the event.target.files[0] is set as undefined. Now, opening the file dialogue for the second time and not uploading a new file, keeps the value for event.target.files[0] set as undefined, thus, not abling the change event to trigger and hence, not running the getFile function. So, nothing happens.

@alsoK2maan
Copy link
Contributor Author

After discussion, it is concluded that we'll not implement the functionality to show the toast even after not selecting the file for the first time. The toast will appear only for the first time.

@adityasharma7 adityasharma7 merged commit 6da1826 into hotwax:main Feb 1, 2023
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.

Re-clicking on "Upload" file button & cancelling it gives error.
5 participants