From 847642060824796ca6091a986694d419a69ad654 Mon Sep 17 00:00:00 2001 From: amansinghbais Date: Thu, 10 Oct 2024 15:36:41 +0530 Subject: [PATCH] Improved: added support to redirect user to the store details page if login with productStoreId as query (user-240) --- src/store/modules/user/actions.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/store/modules/user/actions.ts b/src/store/modules/user/actions.ts index 3758526..a0397f1 100644 --- a/src/store/modules/user/actions.ts +++ b/src/store/modules/user/actions.ts @@ -10,6 +10,7 @@ import emitter from "@/event-bus" import { Settings } from "luxon" import { useAuthStore } from '@hotwax/dxp-components' import { resetConfig } from '@/adapter' +import router from '@/router' const actions: ActionTree = { @@ -40,6 +41,11 @@ const actions: ActionTree = { commit(types.USER_INFO_UPDATED, userProfile); this.dispatch('util/fetchOrganizationPartyId'); emitter.emit("dismissLoader") + + const productStoreId = router.currentRoute.value.query.productStoreId + if(productStoreId) { + return `/product-store-details/${productStoreId}`; + } } catch (err: any) { emitter.emit("dismissLoader") showToast(translate(err));