From 2dce920681d818df689c2a69288f4d9107f2f04d Mon Sep 17 00:00:00 2001 From: shanmukhdutt Date: Wed, 6 Dec 2023 16:04:23 +0530 Subject: [PATCH 1/5] Improved: Added Toast Notification on Item Removal from Upload Page(#213) --- src/locales/en.json | 2 ++ src/store/modules/product/actions.ts | 1 + src/views/Upload.vue | 2 +- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/locales/en.json b/src/locales/en.json index 7f8859dd..3c5d054d 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -23,6 +23,7 @@ "inventory variance": "inventory variance", "Instance Url": "Instance Url", "Item added to upload list": "Item added to upload list", + "Item removed successfully":"Item removed successfully", "Loading": "Loading", "Location": "Location", "Log variance": "Log variance", @@ -74,4 +75,5 @@ "Variance updated successfully": "Variance updated successfully", "View": "View", "You do not have permission to access this page": "You do not have permission to access this page" + } \ No newline at end of file diff --git a/src/store/modules/product/actions.ts b/src/store/modules/product/actions.ts index 926755de..889c87b4 100644 --- a/src/store/modules/product/actions.ts +++ b/src/store/modules/product/actions.ts @@ -48,6 +48,7 @@ const actions: ActionTree = { async removeItemFromUploadProducts( {commit}, payload) { commit(types.PRODUCT_REMOVE_FROM_UPLD_PRDTS, {sku: payload}); + showToast(translate("Item removed successfully")); }, async clearUploadProducts ({ commit }) { diff --git a/src/views/Upload.vue b/src/views/Upload.vue index 9011e116..5d6b4a5d 100644 --- a/src/views/Upload.vue +++ b/src/views/Upload.vue @@ -71,7 +71,7 @@ import { colorPaletteOutline, resize, cloudUploadOutline } from 'ionicons/icons' import { mapGetters, useStore } from 'vuex'; import { useRouter } from 'vue-router'; import { ShopifyImg } from '@hotwax/dxp-components'; - import { Actions, hasPermission } from '@/authorization' +import { Actions, hasPermission } from '@/authorization' export default defineComponent({ name: "Upload", From f321d13364911842635d3e455ee152d53ee90b5e Mon Sep 17 00:00:00 2001 From: shanmukhdutt Date: Wed, 20 Dec 2023 17:33:51 +0530 Subject: [PATCH 2/5] Improved: Toast Notifications in upload page --- src/store/modules/product/actions.ts | 1 - src/views/Upload.vue | 4 +++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/store/modules/product/actions.ts b/src/store/modules/product/actions.ts index 889c87b4..926755de 100644 --- a/src/store/modules/product/actions.ts +++ b/src/store/modules/product/actions.ts @@ -48,7 +48,6 @@ const actions: ActionTree = { async removeItemFromUploadProducts( {commit}, payload) { commit(types.PRODUCT_REMOVE_FROM_UPLD_PRDTS, {sku: payload}); - showToast(translate("Item removed successfully")); }, async clearUploadProducts ({ commit }) { diff --git a/src/views/Upload.vue b/src/views/Upload.vue index 5d6b4a5d..31aee445 100644 --- a/src/views/Upload.vue +++ b/src/views/Upload.vue @@ -71,7 +71,8 @@ import { colorPaletteOutline, resize, cloudUploadOutline } from 'ionicons/icons' import { mapGetters, useStore } from 'vuex'; import { useRouter } from 'vue-router'; import { ShopifyImg } from '@hotwax/dxp-components'; -import { Actions, hasPermission } from '@/authorization' +import { Actions, hasPermission } from '@/authorization'; +import { showToast } from '@/utils'; export default defineComponent({ name: "Upload", @@ -103,6 +104,7 @@ export default defineComponent({ methods: { removeItem (sku: any) { this.store.dispatch('product/removeItemFromUploadProducts', sku) + showToast(this.$t("Item removed successfully")); }, async presentAlertOnUpload() { const alert = await alertController.create({ From e89f3f877873e91b7acec257131e18f59a587dc8 Mon Sep 17 00:00:00 2001 From: shanmukhdutt Date: Wed, 20 Dec 2023 19:01:01 +0530 Subject: [PATCH 3/5] Fixed: Indentation --- src/locales/en.json | 1 - 1 file changed, 1 deletion(-) diff --git a/src/locales/en.json b/src/locales/en.json index 3c5d054d..7635d081 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -75,5 +75,4 @@ "Variance updated successfully": "Variance updated successfully", "View": "View", "You do not have permission to access this page": "You do not have permission to access this page" - } \ No newline at end of file From b975dac03d85409791a85b6ab38b792ad6812209 Mon Sep 17 00:00:00 2001 From: shanmukhdutt Date: Wed, 27 Dec 2023 15:31:51 +0530 Subject: [PATCH 4/5] Improved the notification in upload page --- src/views/Upload.vue | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/views/Upload.vue b/src/views/Upload.vue index 31aee445..d40bbfec 100644 --- a/src/views/Upload.vue +++ b/src/views/Upload.vue @@ -104,7 +104,7 @@ export default defineComponent({ methods: { removeItem (sku: any) { this.store.dispatch('product/removeItemFromUploadProducts', sku) - showToast(this.$t("Item removed successfully")); + showToast(this.$t("Item removed from upload list")); }, async presentAlertOnUpload() { const alert = await alertController.create({ From 5bfacfcb5e749d0f624359339dd21f92bb46cec9 Mon Sep 17 00:00:00 2001 From: shanmukhdutt Date: Wed, 3 Jan 2024 12:02:08 +0530 Subject: [PATCH 5/5] Implemented the suggested changes --- src/locales/en.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/locales/en.json b/src/locales/en.json index 7635d081..7846b6e7 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -23,7 +23,7 @@ "inventory variance": "inventory variance", "Instance Url": "Instance Url", "Item added to upload list": "Item added to upload list", - "Item removed successfully":"Item removed successfully", + "Item removed from upload list":"Item removed from upload list", "Loading": "Loading", "Location": "Location", "Log variance": "Log variance",