From 60da71f4b20ed9da01057cb041206da13d5bacf6 Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Tue, 16 Aug 2022 17:21:57 +0530 Subject: [PATCH 1/7] Implemented: Add option to select shopify config from settings page(#2q9mut9) --- src/components/BatchModal.vue | 2 +- src/components/JobConfiguration.vue | 2 +- src/locales/en.json | 2 ++ src/store/modules/job/actions.ts | 4 ++-- src/store/modules/user/UserState.ts | 3 ++- src/store/modules/user/actions.ts | 26 ++++++++++++++++++------ src/store/modules/user/getters.ts | 7 +++++-- src/store/modules/user/index.ts | 3 ++- src/store/modules/user/mutation-types.ts | 3 ++- src/store/modules/user/mutations.ts | 9 +++++--- src/store/modules/webhook/actions.ts | 4 ++-- src/views/InitialLoad.vue | 4 ++-- src/views/Inventory.vue | 2 +- src/views/Orders.vue | 4 ++-- src/views/PreOrder.vue | 2 +- src/views/Product.vue | 4 ++-- src/views/Settings.vue | 15 +++++++++++++- 17 files changed, 67 insertions(+), 29 deletions(-) diff --git a/src/components/BatchModal.vue b/src/components/BatchModal.vue index 2d6ccea2..1fa3eb7b 100644 --- a/src/components/BatchModal.vue +++ b/src/components/BatchModal.vue @@ -111,7 +111,7 @@ export default defineComponent({ computed: { ...mapGetters({ getJob: 'job/getJob', - shopifyConfigId: 'user/getShopifyConfigId', + currentShopifyConfigId: 'user/getCurrentShopifyConfigId', currentEComStore: 'user/getCurrentEComStore', userProfile: "user/getUserProfile" }), diff --git a/src/components/JobConfiguration.vue b/src/components/JobConfiguration.vue index 5323f0ca..413879da 100644 --- a/src/components/JobConfiguration.vue +++ b/src/components/JobConfiguration.vue @@ -130,7 +130,7 @@ export default defineComponent({ ...mapGetters({ getJobStatus: 'job/getJobStatus', getJob: 'job/getJob', - shopifyConfigId: 'user/getShopifyConfigId', + currentShopifyConfigId: 'user/getCurrentShopifyConfigId', currentEComStore: 'user/getCurrentEComStore', currentJob: 'job/getCurrentJob', }), diff --git a/src/locales/en.json b/src/locales/en.json index eda896a0..e22c2924 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -149,6 +149,8 @@ "Service has been scheduled": "Service has been scheduled", "Service updated successfully": "Service updated successfully", "Settings": "Settings", + "Shopify Config": "Shopify Config", + "Shopify configuration missing.": "Shopify configuration missing.", "Skip": "Skip", "Skip job": "Skip job", "Skip once": "Skip once", diff --git a/src/store/modules/job/actions.ts b/src/store/modules/job/actions.ts index a26eb090..c09f17da 100644 --- a/src/store/modules/job/actions.ts +++ b/src/store/modules/job/actions.ts @@ -412,7 +412,7 @@ const actions: ActionTree = { 'runAsUser': 'system', //default system, but empty in run now. TODO Need to remove this as we are using SERVICE_RUN_AS_SYSTEM, currently kept it for backward compatibility 'recurrenceTimeZone': this.state.user.current.userTimeZone }, - 'shopifyConfigId': this.state.user.shopifyConfigId, + 'shopifyConfigId': this.state.user.currentShopifyConfigId, 'statusId': "SERVICE_PENDING", 'systemJobEnumId': job.systemJobEnumId } as any @@ -531,7 +531,7 @@ const actions: ActionTree = { 'parentJobId': job.parentJobId, 'recurrenceTimeZone': this.state.user.current.userTimeZone }, - 'shopifyConfigId': this.state.user.shopifyConfigId, + 'shopifyConfigId': this.state.user.currentShopifyConfigId, 'statusId': "SERVICE_PENDING", 'systemJobEnumId': job.systemJobEnumId } as any diff --git a/src/store/modules/user/UserState.ts b/src/store/modules/user/UserState.ts index 4dd4a877..2b7b4e1c 100644 --- a/src/store/modules/user/UserState.ts +++ b/src/store/modules/user/UserState.ts @@ -3,5 +3,6 @@ export default interface UserState { current: object | null; currentEComStore: object; instanceUrl: string; - shopifyConfigId: string; + shopifyConfigs: any, + currentShopifyConfigId: string, } \ No newline at end of file diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 12877308..d8383ea6 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -115,7 +115,7 @@ const actions: ActionTree = { commit(types.USER_INSTANCE_URL_UPDATED, payload) }, - async getShopifyConfig({ commit }, productStoreId) { + async getShopifyConfig({ commit, state }, productStoreId) { if (productStoreId) { let resp; const payload = { @@ -124,25 +124,39 @@ const actions: ActionTree = { }, "entityName": "ShopifyConfig", "noConditionFind": "Y", - "fieldList": ["shopifyConfigId"] + "fieldList": ["shopifyConfigId", "shopifyConfigName"] } try { resp = await UserService.getShopifyConfig(payload); if (resp.status === 200 && !hasError(resp) && resp.data?.docs) { - commit(types.USER_SHOPIFY_CONFIG_UPDATED, resp.data.docs?.length > 0 ? resp.data.docs[0].shopifyConfigId : ""); + const shopifyConfigs = resp.data.docs; + commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, shopifyConfigs); + commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, shopifyConfigs[0].shopifyConfigId); } else { console.error(resp); - commit(types.USER_SHOPIFY_CONFIG_UPDATED, ""); + showToast(translate("Shopify configuration missing.")); + commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, {}); + commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, ""); } } catch (err) { console.error(err); - commit(types.USER_SHOPIFY_CONFIG_UPDATED, ""); + showToast(translate("Shopify configuration missing.")); + commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, {}); + commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, ""); } } else { - commit(types.USER_SHOPIFY_CONFIG_UPDATED, ""); + commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, {}); + commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, ""); } }, + /** + * update current shopify config id + */ + async setCurrentShopifyConfigId({ commit, dispatch }, id) { + commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, id); + }, + async getEComStores(_context, payload) { let resp; diff --git a/src/store/modules/user/getters.ts b/src/store/modules/user/getters.ts index d8c92ee2..b57780f4 100644 --- a/src/store/modules/user/getters.ts +++ b/src/store/modules/user/getters.ts @@ -18,8 +18,11 @@ const getters: GetterTree = { getInstanceUrl (state) { return state.instanceUrl; }, - getShopifyConfigId (state) { - return state.shopifyConfigId; + getCurrentShopifyConfigId (state) { + return state.currentShopifyConfigId; + }, + getShopifyConfigs (state) { + return state.shopifyConfigs; }, getCurrentEComStore(state) { return state.currentEComStore diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts index 7a5a45e9..63ee94fd 100644 --- a/src/store/modules/user/index.ts +++ b/src/store/modules/user/index.ts @@ -11,7 +11,8 @@ const userModule: Module = { token: '', current: null, instanceUrl: '', - shopifyConfigId: "", + shopifyConfigs: {}, + currentShopifyConfigId: "", currentEComStore: { productStoreId: "", storeName: "None" diff --git a/src/store/modules/user/mutation-types.ts b/src/store/modules/user/mutation-types.ts index 96f33a41..1befec7b 100644 --- a/src/store/modules/user/mutation-types.ts +++ b/src/store/modules/user/mutation-types.ts @@ -3,5 +3,6 @@ export const USER_TOKEN_CHANGED = SN_USER + '/TOKEN_CHANGED' export const USER_END_SESSION = SN_USER + '/END_SESSION' export const USER_INFO_UPDATED = SN_USER + '/INFO_UPDATED' export const USER_INSTANCE_URL_UPDATED = SN_USER + '/INSTANCE_URL_UPDATED' -export const USER_SHOPIFY_CONFIG_UPDATED = SN_USER + '/SHOPIFY_CONFIG_UPDATED' +export const USER_SHOPIFY_CONFIG_LIST_UPDATED = SN_USER + '/SHOPIFY_CONFIG_LIST_UPDATED' +export const USER_CURRENT_SHOPIFY_CONFIG_UPDATED = SN_USER + '/SHOPIFY_CONFIG_UPDATED' export const USER_CURRENT_ECOM_STORE_UPDATED = SN_USER + '/CURRENT_ECOM_STORE_UPDATED' \ No newline at end of file diff --git a/src/store/modules/user/mutations.ts b/src/store/modules/user/mutations.ts index 20d7850a..08aead4a 100644 --- a/src/store/modules/user/mutations.ts +++ b/src/store/modules/user/mutations.ts @@ -9,7 +9,7 @@ const mutations: MutationTree = { [types.USER_END_SESSION] (state) { state.token = '' state.current = null - state.shopifyConfigId = "" + state.currentShopifyConfigId = "" state.currentEComStore = { productStoreId: "", storeName: "None" @@ -21,8 +21,11 @@ const mutations: MutationTree = { [types.USER_INSTANCE_URL_UPDATED] (state, payload) { state.instanceUrl = payload; }, - [types.USER_SHOPIFY_CONFIG_UPDATED] (state, payload) { - state.shopifyConfigId = payload; + [types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED] (state, payload) { + state.currentShopifyConfigId = payload; + }, + [types.USER_SHOPIFY_CONFIG_LIST_UPDATED] (state, payload) { + state.shopifyConfigs = payload }, [types.USER_CURRENT_ECOM_STORE_UPDATED] (state, payload) { state.currentEComStore = payload; diff --git a/src/store/modules/webhook/actions.ts b/src/store/modules/webhook/actions.ts index 7039ef14..9f17d334 100644 --- a/src/store/modules/webhook/actions.ts +++ b/src/store/modules/webhook/actions.ts @@ -8,7 +8,7 @@ import { translate } from '@/i18n' const actions: ActionTree = { async fetchWebhooks({ commit }) { - await WebhookService.fetchShopifyWebhooks({ shopifyConfigId: this.state.user.shopifyConfigId }).then(resp => { + await WebhookService.fetchShopifyWebhooks({ shopifyConfigId: this.state.user.currentShopifyConfigId }).then(resp => { if (resp.status == 200 && resp.data.webhooks?.length > 0 && !hasError(resp)) { const webhooks = resp.data.webhooks; const topics: any = {} @@ -39,7 +39,7 @@ const actions: ActionTree = { let resp; try { - resp = await WebhookService.subscribeWebhook({ shopifyConfigId: this.state.user.shopifyConfigId }, id) + resp = await WebhookService.subscribeWebhook({ shopifyConfigId: this.state.user.currentShopifyConfigId }, id) if (resp.status == 200 && !hasError(resp)) { showToast(translate('Webhook subscribed successfully')) diff --git a/src/views/InitialLoad.vue b/src/views/InitialLoad.vue index 8a0ef95c..fea2aa2f 100644 --- a/src/views/InitialLoad.vue +++ b/src/views/InitialLoad.vue @@ -128,7 +128,7 @@ export default defineComponent({ ...mapGetters({ getJobStatus: 'job/getJobStatus', getJob: 'job/getJob', - shopifyConfigId: 'user/getShopifyConfigId', + currentShopifyConfigId: 'user/getCurrentShopifyConfigId', currentEComStore: 'user/getCurrentEComStore', getCachedWebhook: 'webhook/getCachedWebhook' }), @@ -207,7 +207,7 @@ export default defineComponent({ if (checked) { await this.store.dispatch('webhook/subscribeWebhook', enumId) } else { - await this.store.dispatch('webhook/unsubscribeWebhook', { webhookId: webhook?.id, shopifyConfigId: this.shopifyConfigId }) + await this.store.dispatch('webhook/unsubscribeWebhook', { webhookId: webhook?.id, shopifyConfigId: this.currentShopifyConfigId }) } } }, diff --git a/src/views/Inventory.vue b/src/views/Inventory.vue index 646067a3..871ea17e 100644 --- a/src/views/Inventory.vue +++ b/src/views/Inventory.vue @@ -100,7 +100,7 @@ export default defineComponent({ ...mapGetters({ getJobStatus: 'job/getJobStatus', getJob: 'job/getJob', - shopifyConfigId: 'user/getShopifyConfigId', + currentShopifyConfigId: 'user/getCurrentShopifyConfigId', currentEComStore: 'user/getCurrentEComStore', getTemporalExpr: 'job/getTemporalExpr' }), diff --git a/src/views/Orders.vue b/src/views/Orders.vue index ea255b55..97dd7255 100644 --- a/src/views/Orders.vue +++ b/src/views/Orders.vue @@ -232,7 +232,7 @@ export default defineComponent({ getJobStatus: 'job/getJobStatus', getJob: 'job/getJob', orderBatchJobs: "job/getOrderBatchJobs", - shopifyConfigId: 'user/getShopifyConfigId', + currentShopifyConfigId: 'user/getCurrentShopifyConfigId', currentEComStore: 'user/getCurrentEComStore', getTemporalExpr: 'job/getTemporalExpr', getCachedWebhook: 'webhook/getCachedWebhook' @@ -275,7 +275,7 @@ export default defineComponent({ if (checked) { await this.store.dispatch('webhook/subscribeWebhook', enumId) } else { - await this.store.dispatch('webhook/unsubscribeWebhook', { webhookId: webhook?.id, shopifyConfigId: this.shopifyConfigId }) + await this.store.dispatch('webhook/unsubscribeWebhook', { webhookId: webhook?.id, shopifyConfigId: this.currentShopifyConfigId }) } }, async addBatch() { diff --git a/src/views/PreOrder.vue b/src/views/PreOrder.vue index 0f7d888b..bf916f3e 100644 --- a/src/views/PreOrder.vue +++ b/src/views/PreOrder.vue @@ -168,7 +168,7 @@ export default defineComponent({ ...mapGetters({ getJobStatus: 'job/getJobStatus', getJob: 'job/getJob', - shopifyConfigId: 'user/getShopifyConfigId', + currentShopifyConfigId: 'user/getCurrentShopifyConfigId', currentEComStore: 'user/getCurrentEComStore', getTemporalExpr: 'job/getTemporalExpr' }), diff --git a/src/views/Product.vue b/src/views/Product.vue index 01c9b781..d1d99994 100644 --- a/src/views/Product.vue +++ b/src/views/Product.vue @@ -95,7 +95,7 @@ export default defineComponent({ getJobStatus: 'job/getJobStatus', getTemporalExpr: 'job/getTemporalExpr', getJob: 'job/getJob', - shopifyConfigId: 'user/getShopifyConfigId', + currentShopifyConfigId: 'user/getCurrentShopifyConfigId', getCachedWebhook: 'webhook/getCachedWebhook' }), newProductsWebhook(): boolean { @@ -142,7 +142,7 @@ export default defineComponent({ if (checked) { await this.store.dispatch('webhook/subscribeWebhook', enumId) } else { - await this.store.dispatch('webhook/unsubscribeWebhook', { webhookId: webhook?.id, shopifyConfigId: this.shopifyConfigId }) + await this.store.dispatch('webhook/unsubscribeWebhook', { webhookId: webhook?.id, shopifyConfigId: this.currentShopifyConfigId }) } }, async viewJobConfiguration(id: string, title: string, status: string) { diff --git a/src/views/Settings.vue b/src/views/Settings.vue index fb28b8e9..10a6d3bc 100644 --- a/src/views/Settings.vue +++ b/src/views/Settings.vue @@ -16,6 +16,14 @@ {{ store.storeName }} + + + + {{ $t("Shopify Config") }} + + {{ shopifyConfig.shopifyConfigName }} + + @@ -72,7 +80,9 @@ export default defineComponent({ ...mapGetters({ userProfile: 'user/getUserProfile', currentEComStore: 'user/getCurrentEComStore', - instanceUrl: 'user/getInstanceUrl' + instanceUrl: 'user/getInstanceUrl', + shopifyConfigs: 'user/getShopifyConfigs', + currentShopifyConfigId: 'user/getCurrentShopifyConfigId' }) }, methods: { @@ -83,6 +93,9 @@ export default defineComponent({ }) } }, + setShopifyConfig(event: any){ + this.store.dispatch('user/setCurrentShopifyConfigId', event.detail.value); + }, async changeTimeZone() { const timeZoneModal = await modalController.create({ component: TimeZoneModal, From 5e81965da7b354a3a3fc65a9e9866c5368fd762e Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Tue, 16 Aug 2022 17:30:13 +0530 Subject: [PATCH 2/7] Removed unwanted code(#2q9mut9) --- src/store/modules/user/actions.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index d8383ea6..15d5173f 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -115,7 +115,7 @@ const actions: ActionTree = { commit(types.USER_INSTANCE_URL_UPDATED, payload) }, - async getShopifyConfig({ commit, state }, productStoreId) { + async getShopifyConfig({ commit }, productStoreId) { if (productStoreId) { let resp; const payload = { @@ -153,7 +153,7 @@ const actions: ActionTree = { /** * update current shopify config id */ - async setCurrentShopifyConfigId({ commit, dispatch }, id) { + async setCurrentShopifyConfigId({ commit }, id) { commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, id); }, From 8d375787841cfc74b4a57d1021a88ec84fc60a04 Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Tue, 16 Aug 2022 17:50:13 +0530 Subject: [PATCH 3/7] Fixed: Clear shopify configs on logout(#2q9mut9) --- src/store/modules/user/mutations.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/store/modules/user/mutations.ts b/src/store/modules/user/mutations.ts index 08aead4a..40256393 100644 --- a/src/store/modules/user/mutations.ts +++ b/src/store/modules/user/mutations.ts @@ -14,6 +14,7 @@ const mutations: MutationTree = { productStoreId: "", storeName: "None" } + state.shopifyConfigs = {} }, [types.USER_INFO_UPDATED] (state, payload) { state.current = payload From 0edf7f73214900ee7122b96583c95870007dd8bd Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Tue, 16 Aug 2022 17:55:37 +0530 Subject: [PATCH 4/7] Updated code(#2q9mut9) --- src/store/modules/user/actions.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 15d5173f..6cade940 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -131,7 +131,7 @@ const actions: ActionTree = { if (resp.status === 200 && !hasError(resp) && resp.data?.docs) { const shopifyConfigs = resp.data.docs; commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, shopifyConfigs); - commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, shopifyConfigs[0].shopifyConfigId); + commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, shopifyConfigs.length > 0 ? shopifyConfigs[0].shopifyConfigId : ""); } else { console.error(resp); showToast(translate("Shopify configuration missing.")); From 893086761a18907c2301291e10bd989866f527b4 Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Tue, 16 Aug 2022 18:44:44 +0530 Subject: [PATCH 5/7] Removed: shopify configuration missing toast(#2q9mut9) --- src/store/modules/user/actions.ts | 6 +++--- src/store/modules/user/index.ts | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 6cade940..4f3b0c1a 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -135,17 +135,17 @@ const actions: ActionTree = { } else { console.error(resp); showToast(translate("Shopify configuration missing.")); - commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, {}); + commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, []); commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, ""); } } catch (err) { console.error(err); showToast(translate("Shopify configuration missing.")); - commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, {}); + commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, []); commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, ""); } } else { - commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, {}); + commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, []); commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, ""); } }, diff --git a/src/store/modules/user/index.ts b/src/store/modules/user/index.ts index 63ee94fd..85c49659 100644 --- a/src/store/modules/user/index.ts +++ b/src/store/modules/user/index.ts @@ -11,7 +11,7 @@ const userModule: Module = { token: '', current: null, instanceUrl: '', - shopifyConfigs: {}, + shopifyConfigs: [], currentShopifyConfigId: "", currentEComStore: { productStoreId: "", From 7adcd3ca3c1c026d9c56c983b7d093d65e9bd785 Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Tue, 16 Aug 2022 18:46:45 +0530 Subject: [PATCH 6/7] Updated en.json file(#2q9mut9) --- src/locales/en.json | 1 - src/store/modules/user/actions.ts | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/locales/en.json b/src/locales/en.json index e22c2924..69f1725f 100644 --- a/src/locales/en.json +++ b/src/locales/en.json @@ -150,7 +150,6 @@ "Service updated successfully": "Service updated successfully", "Settings": "Settings", "Shopify Config": "Shopify Config", - "Shopify configuration missing.": "Shopify configuration missing.", "Skip": "Skip", "Skip job": "Skip job", "Skip once": "Skip once", diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 4f3b0c1a..25ecc7b4 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -134,13 +134,11 @@ const actions: ActionTree = { commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, shopifyConfigs.length > 0 ? shopifyConfigs[0].shopifyConfigId : ""); } else { console.error(resp); - showToast(translate("Shopify configuration missing.")); commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, []); commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, ""); } } catch (err) { console.error(err); - showToast(translate("Shopify configuration missing.")); commit(types.USER_SHOPIFY_CONFIG_LIST_UPDATED, []); commit(types.USER_CURRENT_SHOPIFY_CONFIG_UPDATED, ""); } From 3462b10a1b71ab4da35191cca25502d21e8dac77 Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Wed, 17 Aug 2022 11:30:05 +0530 Subject: [PATCH 7/7] Improved code(#2q9mut9) --- src/store/modules/user/mutations.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/store/modules/user/mutations.ts b/src/store/modules/user/mutations.ts index 40256393..dd29afaa 100644 --- a/src/store/modules/user/mutations.ts +++ b/src/store/modules/user/mutations.ts @@ -14,7 +14,7 @@ const mutations: MutationTree = { productStoreId: "", storeName: "None" } - state.shopifyConfigs = {} + state.shopifyConfigs = [] }, [types.USER_INFO_UPDATED] (state, payload) { state.current = payload