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 toast for success/error after upload act… #15

Merged
merged 6 commits into from
Mar 8, 2022

Conversation

disha1202
Copy link
Contributor

…ion(#2335ca9)

@@ -65,6 +65,8 @@ import { defineComponent } from "vue";
import { useRouter } from 'vue-router';
import { parseCsv } from '@/utils';
import { useStore } from "vuex";
import { showToast } from '@/utils';
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
import { showToast } from '@/utils';
import { showToast, parseCsv } from '@/utils';

and we can remove line 66.

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.

showToast(translate("File uploaded successfully"));
}
else {
showToast(translate("Something went wrong, Please try again"));
Copy link
Contributor

Choose a reason for hiding this comment

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

Add static text in translation file.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Added static text in translation file.

@@ -96,6 +98,12 @@ export default defineComponent({
methods: {
getFile(event) {
this.file = event.target.files[0];
if(this.file){
showToast(translate("File uploaded successfully"));
Copy link
Contributor

@ymaheshwari1 ymaheshwari1 Mar 8, 2022

Choose a reason for hiding this comment

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

We should move this.parseFile() inside if, as we only want to parse the file when we have it, otherwise not.

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 the code.

@adityasharma7 adityasharma7 merged commit a9603ea into hotwax:main Mar 8, 2022
disha1202 added a commit to disha1202/import that referenced this pull request Jul 19, 2022
This reverts commit 699be06, reversing
changes made to e62e7dd.
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.

3 participants