Skip to content

Commit

Permalink
Merge pull request #44 from amansinghbais/user-240-store-redirect
Browse files Browse the repository at this point in the history
Improved: added support to redirect user to the store details page if login with productStoreId as query (user-240)
  • Loading branch information
ravilodhi authored Nov 27, 2024
2 parents 961d132 + 2f3a79f commit 83c7d37
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/store/modules/user/actions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
import { getServerPermissionsFromRules, prepareAppPermissions, resetPermissions, setPermissions } from "@/authorization"

const actions: ActionTree<UserState, RootState> = {
Expand Down Expand Up @@ -70,6 +71,11 @@ const actions: ActionTree<UserState, RootState> = {
commit(types.USER_PERMISSIONS_UPDATED, appPermissions);
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));
Expand Down

0 comments on commit 83c7d37

Please sign in to comment.