diff --git a/backend/src/appenlight/static/js/appenlight.js b/backend/src/appenlight/static/js/appenlight.js index 768831e..be2a859 100644 --- a/backend/src/appenlight/static/js/appenlight.js +++ b/backend/src/appenlight/static/js/appenlight.js @@ -7564,6 +7564,7 @@ function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR vm.createGroup = function () { vm.loading.group = true; + var groupId = $state.params.groupId; if (groupId) { groupsResource.update({groupId: vm.group.id}, vm.group, function (data) { setServerValidation(vm.groupForm); @@ -7577,6 +7578,7 @@ function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR }; vm.removeUser = function (user) { + var groupId = $state.params.groupId; groupsPropertyResource.delete( {groupId: groupId, key: 'users', user_name: user.user_name}, function (data) { @@ -7590,6 +7592,7 @@ function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR }; vm.addUser = function () { + var groupId = $state.params.groupId; groupsPropertyResource.save( {groupId: groupId, key: 'users'}, {user_name: vm.form.autocompleteUser}, @@ -7929,6 +7932,7 @@ function AdminUsersCreateViewController($state, usersResource, usersPropertyReso vm.createUser = function () { vm.loading.user = true; + var userId = $state.params.userId; if (userId) { usersResource.update({userId: vm.user.id}, vm.user, function (data) { setServerValidation(vm.profileForm); diff --git a/frontend/src/components/views/admin-groups-create-view/admin-groups-create-view.js b/frontend/src/components/views/admin-groups-create-view/admin-groups-create-view.js index f3497bd..f847813 100644 --- a/frontend/src/components/views/admin-groups-create-view/admin-groups-create-view.js +++ b/frontend/src/components/views/admin-groups-create-view/admin-groups-create-view.js @@ -90,6 +90,7 @@ function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR vm.createGroup = function () { vm.loading.group = true; + var groupId = $state.params.groupId; if (groupId) { groupsResource.update({groupId: vm.group.id}, vm.group, function (data) { setServerValidation(vm.groupForm); @@ -103,6 +104,7 @@ function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR }; vm.removeUser = function (user) { + var groupId = $state.params.groupId; groupsPropertyResource.delete( {groupId: groupId, key: 'users', user_name: user.user_name}, function (data) { @@ -116,6 +118,7 @@ function AdminGroupsCreateViewController($state, groupsResource, groupsPropertyR }; vm.addUser = function () { + var groupId = $state.params.groupId; groupsPropertyResource.save( {groupId: groupId, key: 'users'}, {user_name: vm.form.autocompleteUser}, diff --git a/frontend/src/components/views/admin-users-create-view/admin-users-create-view.js b/frontend/src/components/views/admin-users-create-view/admin-users-create-view.js index 72367cc..9964eb3 100644 --- a/frontend/src/components/views/admin-users-create-view/admin-users-create-view.js +++ b/frontend/src/components/views/admin-users-create-view/admin-users-create-view.js @@ -86,6 +86,7 @@ function AdminUsersCreateViewController($state, usersResource, usersPropertyReso vm.createUser = function () { vm.loading.user = true; console.log('updateProfile'); + var userId = $state.params.userId; if (userId) { usersResource.update({userId: vm.user.id}, vm.user, function (data) { setServerValidation(vm.profileForm);