Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
fix: Refresh list warehouses after change organization. (#1967)
Browse files Browse the repository at this point in the history
  • Loading branch information
EdwinBetanc0urt authored Mar 2, 2024
1 parent f890842 commit 6f52a12
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/store/modules/user.js
Original file line number Diff line number Diff line change
Expand Up @@ -448,6 +448,8 @@ const actions = {
root: true
})

const isSameOrganization = organizationId === getCurrentOrganization()

return requestChangeRole({
roleId: getCurrentRole(),
organizationId
Expand Down Expand Up @@ -479,7 +481,12 @@ const actions = {
// Update user info and context associated with session
// dispatch('getSessionInfo', tokenSession)

// dispatch('getWarehousesList', { organizationId: id })
// refresh warehouses
if (!isSameOrganization) {
dispatch('getWarehousesList', {
organizationId: id
})
}

showMessage({
message: language.t('notifications.successChangeRole'),
Expand Down

0 comments on commit 6f52a12

Please sign in to comment.