diff --git a/src/mixins/parseFileMixin.ts b/src/mixins/parseFileMixin.ts index 5f73c3df..9cbcd6c8 100644 --- a/src/mixins/parseFileMixin.ts +++ b/src/mixins/parseFileMixin.ts @@ -1,19 +1,11 @@ -import { translate } from "@/i18n"; import store from "@/store"; -import { showToast, parseCsv } from "@/utils"; +import { parseCsv } from "@/utils"; export default { methods: { async parseCsv(file: any) { - if (file) { - store.dispatch('order/updateFileName', file.name); - const csvData = await parseCsv(file).then( res => { - return res; - }) - showToast(translate("File uploaded successfully")); - return csvData; - } - showToast(translate("Something went wrong, Please try again")); + store.dispatch('order/updateFileName', file.name); + return await parseCsv(file).then(res => res) } } } \ No newline at end of file