From 16c1c1653eabd2c4e9d140dd970417c33e9ce727 Mon Sep 17 00:00:00 2001 From: R-Sourabh Date: Mon, 10 Jun 2024 15:13:42 +0530 Subject: [PATCH] Updated: change empty state condition, add locale , imporve indentation and shift to two-way data binding(#285) --- src/locales/en.json | 1 + src/store/modules/stock/actions.ts | 10 ++++++++-- src/store/modules/stock/getters.ts | 2 -- src/views/ScheduledRestock.vue | 5 +++-- src/views/ScheduledRestockReview.vue | 2 +- 5 files changed, 13 insertions(+), 7 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index 500aae3..9909b69 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -28,6 +28,7 @@ "Click the backdrop to dismiss.": "Click the backdrop to dismiss.", "Completed": "Completed", "Confirm": "Confirm", + "Configuration missing": "Configuration missing", "CSV input": "CSV input", "CSV Mapping": "CSV Mapping", "Custom date format": "Custom date format", diff --git a/src/store/modules/stock/actions.ts b/src/store/modules/stock/actions.ts index b6819be..fc16d60 100644 --- a/src/store/modules/stock/actions.ts +++ b/src/store/modules/stock/actions.ts @@ -104,7 +104,13 @@ const actions: ActionTree = { commit(types.STOCK_SCHEDULED_INFORMATION, payload) }, async clearScheduledStock({ commit }) { - commit(types.STOCK_SCHEDULED_INFORMATION, {}) + commit(types.STOCK_SCHEDULED_INFORMATION, { + scheduledTime: "", + shopId: "", + restockName: "", + productStoreId: "", + facilityId: "" + }) }, async shopifyShop({ commit }, payload) { commit(types.STOCK_SHOPIFY_SHOPS_UPDATED, payload) @@ -219,7 +225,7 @@ const actions: ActionTree = { const jobs = resp.data.docs commit(types.STOCK_JOBS_UPDATED, jobs); } else { - commit(types.STOCK_JOBS_UPDATED, []); + commit(types.STOCK_JOBS_UPDATED, []); } } catch(error) { logger.error(error); diff --git a/src/store/modules/stock/getters.ts b/src/store/modules/stock/getters.ts index d0bfee0..3abf4b2 100644 --- a/src/store/modules/stock/getters.ts +++ b/src/store/modules/stock/getters.ts @@ -18,7 +18,5 @@ const getters: GetterTree = { getScheduledJobs(state) { return state.jobs } - - }; export default getters; \ No newline at end of file diff --git a/src/views/ScheduledRestock.vue b/src/views/ScheduledRestock.vue index abad925..c363657 100644 --- a/src/views/ScheduledRestock.vue +++ b/src/views/ScheduledRestock.vue @@ -76,7 +76,7 @@ - + {{ productStore.storeName || productStore.productStoreId }} @@ -359,7 +359,8 @@ export default defineComponent({ showToast(translate("Select all the fields to continue")); return; } - + emitter.emit("presentLoader") + const restockItems = this.content.map(item => { return { quantity: item[this.fieldMapping.restockQuantity], diff --git a/src/views/ScheduledRestockReview.vue b/src/views/ScheduledRestockReview.vue index d2e64e2..555a429 100644 --- a/src/views/ScheduledRestockReview.vue +++ b/src/views/ScheduledRestockReview.vue @@ -48,7 +48,7 @@ - + {{ productStore.storeName || productStore.productStoreId }}