-
Notifications
You must be signed in to change notification settings - Fork 27
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
Changes from 2 commits
a2dd6c1
13d1151
38c275d
d22776a
3b3809b
b3ed82c
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
title: Implemented logic to display toast for success/error after upload action | ||
ticket_id: "#2335ca9" | ||
merge_request: 15 | ||
author: Disha Talreja | ||
type: added |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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'; | ||
import { translate } from "@/i18n"; | ||
export default defineComponent({ | ||
name: " purchase orders", | ||
components: { | ||
|
@@ -96,6 +98,12 @@ export default defineComponent({ | |
methods: { | ||
getFile(event) { | ||
this.file = event.target.files[0]; | ||
if(this.file){ | ||
showToast(translate("File uploaded successfully")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We should move There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Updated the code. |
||
} | ||
else { | ||
showToast(translate("Something went wrong, Please try again")); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add static text in translation file. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Added static text in translation file. |
||
} | ||
this.parseFile(); | ||
}, | ||
async parseFile(){ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
and we can remove line 66.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Made the requested change.