Skip to content

Commit

Permalink
fixed unnecessary GetUser request with incorrect id param
Browse files Browse the repository at this point in the history
  • Loading branch information
b1jev14 authored and vasil-sokolov committed Nov 9, 2023
1 parent a3f5a4e commit 1baa51e
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions vue/src/components/EditUser.vue
Original file line number Diff line number Diff line change
Expand Up @@ -240,12 +240,8 @@ export default {
},
watch: {
$route(to, from) {
// TODO
if (to.path !== '/users/create') {
this.parseRoute()
this.getUserMainDataComponent()
}
$route() {
this.parseRoute()
},
'user.groups'() {
Expand Down Expand Up @@ -285,6 +281,9 @@ export default {
this.otherDataComponents = await modulesManager.getUserOtherDataComponents()
},
parseRoute() {
if (this.$route.path === '/users' || this.$route.path === '/users/') {
return
}
if (this.createMode) {
const user = new UserModel(this.currentTenantId, {})
this.fillUp(user)
Expand All @@ -295,6 +294,7 @@ export default {
id: userId,
}
this.populate()
this.getUserMainDataComponent()
}
}
},
Expand Down

0 comments on commit 1baa51e

Please sign in to comment.