Skip to content

Commit

Permalink
Merge pull request #205 from amansinghbais/107-user-login-details
Browse files Browse the repository at this point in the history
Improved: logic to redirect to login page with users partyId and login credentials for opening current session in users app (user-107)
  • Loading branch information
ymaheshwari1 authored Mar 1, 2024
2 parents 833556b + f0631ad commit 31bd450
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,4 @@ VUE_APP_PERMISSION_ID="FACILITIES_APP_VIEW"
VUE_APP_LOCALES={"en-US": "English"}
VUE_APP_DEFAULT_LOG_LEVEL="error"
VUE_APP_LOGIN_URL="http://launchpad.hotwax.io/login"
VUE_APP_USERS_APPLICATION_URL="http://users.hotwax.io"
VUE_APP_USERS_LOGIN_URL="http://users.hotwax.io/login"
5 changes: 4 additions & 1 deletion src/components/FacilityLoginActionPopover.vue
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ import { hasError } from "@/adapter";
import { showToast } from "@/utils";
import logger from "@/logger";
import emitter from "@/event-bus";
import { useAuthStore } from '@hotwax/dxp-components'
export default defineComponent({
name: "ProductStorePopover",
Expand All @@ -52,7 +53,7 @@ export default defineComponent({
props: ['currentFacility', 'currentFacilityUser', "facilityTypeDesc"],
methods: {
async viewDetails() {
const userDetailUrl = `${process.env.VUE_APP_USERS_APPLICATION_URL}/user-details/${this.currentFacilityUser.partyId}`
const userDetailUrl = `${process.env.VUE_APP_USERS_LOGIN_URL}?oms=${this.authStore.oms}&token=${this.authStore.token.value}&expirationTime=${this.authStore.token.expiration}&partyId=${this.currentFacilityUser.partyId}`
window.location.href = userDetailUrl
popoverController.dismiss()
},
Expand Down Expand Up @@ -193,8 +194,10 @@ export default defineComponent({
},
setup() {
const store = useStore();
const authStore = useAuthStore()
return {
authStore,
removeCircleOutline,
keyOutline,
mailOutline,
Expand Down

0 comments on commit 31bd450

Please sign in to comment.