|
|
|
@ -74,7 +74,10 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
|
|
|
|
|
app.controller('modifyManagerDialogCtrl', ['$scope', '$http', 'manager', function ($scope, $http, manager) {
|
|
|
|
|
$scope.manager = manager;
|
|
|
|
|
$scope.params = {};
|
|
|
|
|
$scope.loadOrgs = function () {
|
|
|
|
|
if(($scope.currentUser.role & parseInt('1000000000000', 2)) > 0 && $scope.currentUser.org_id){
|
|
|
|
|
$scope.isModifyOrgManage = true;
|
|
|
|
|
}
|
|
|
|
|
/*$scope.loadOrgs = function () {
|
|
|
|
|
$http.get('/sys/orgs').then(function (resp) {
|
|
|
|
|
$scope.orgs = resp.data;
|
|
|
|
|
})
|
|
|
|
@ -101,7 +104,7 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
|
|
|
|
|
$scope.manager.org_id2 = $scope.manager.org_id;
|
|
|
|
|
$scope.manager.org_id = $scope.manager.parent_org_id;
|
|
|
|
|
$scope.loadOrgsChild($scope.manager.org_id);
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
$scope.modify = function () {
|
|
|
|
|
$scope.errmsg = null;
|
|
|
|
|
if($scope.manager.password && $scope.manager.password.length < 8){
|
|
|
|
@ -113,9 +116,9 @@ define(['angular', 'uiRouter', 'uiBootstrap'], function (angular) {
|
|
|
|
|
// $scope.errmsg = 'The password needs to consist of 8-16 digits and letters !';
|
|
|
|
|
// return;
|
|
|
|
|
// }
|
|
|
|
|
if($scope.manager.org_id2 != null && $scope.manager.org_id2 != 'null') {
|
|
|
|
|
/* if($scope.manager.org_id2 != null && $scope.manager.org_id2 != 'null') {
|
|
|
|
|
$scope.manager.org_id = $scope.manager.org_id2;
|
|
|
|
|
}
|
|
|
|
|
}*/
|
|
|
|
|
$http.put('/sys/manager_accounts/' + manager.manager_id, $scope.manager).then(function () {
|
|
|
|
|
$scope.$close();
|
|
|
|
|
}, function (resp) {
|
|
|
|
|