| | |
| | | |
| | | // 선택 한 부서 제거 |
| | | function removeDepartments(index) { |
| | | $scope.vm.form.departments.splice(index, 1); |
| | | $scope.vm.form.departmentList.splice(index, 1); |
| | | } |
| | | |
| | | function formCheck(formInvalid) { |
| | |
| | | |
| | | var content = { |
| | | id : $scope.vm.form.id, |
| | | departmentName : (function () { |
| | | departmentId : (function () { |
| | | var departmentIds = []; |
| | | angular.forEach($scope.vm.form.departments, function (department) { |
| | | departmentIds.push(department.id); |
| | |
| | | })() |
| | | }; |
| | | |
| | | //user_department INSERT 요청 |
| | | UserWorkspace.userDepartmentModify($resourceProvider.getContent( |
| | | content, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | |
| | | id : parameter.id |
| | | } |
| | | |
| | | UserWorkspace.userDepartmentDetail($resourceProvider.getContent( |
| | | UserWorkspace.userDepartmentDetail($resourceProvider.getContent(//test |
| | | contents, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | if (angular.isDefined(result.data.data)) { |
| | | $scope.vm.form.departmentList = result.data.data; //체크 필요 |
| | | $scope.vm.form.departmentList = result.data.data; //체크 필 |
| | | } |
| | | } |
| | | else { |
| | |
| | | return deferred.promise; |
| | | } |
| | | |
| | | function getUserDepartmentList(query, excludeList, page, callBack) { //체크 필요 |
| | | function getUserDepartmentList(query, excludeList, page, callBack) { |
| | | var conditions = { |
| | | departmentName : query, |
| | | excludeIds : (function () { //어떤 역할? 체크 필요 |
| | | excludeIds : (function () { //excludeIds : 제외 할 리스트 |
| | | var excludeIds = []; |
| | | angular.forEach(excludeList, function (exclude) { |
| | | excludeIds.push(exclude.id); |
| | |
| | | if ($rootScope.isDefined(callBack)) { |
| | | callBack(result); |
| | | } |
| | | |
| | | deferred.resolve(result.data.data); |
| | | deferred.resolve(result.data.data); //사용자가 속해져있는 부서 리스트를 불러옴 |
| | | } |
| | | else { |
| | | SweetAlert.swal($filter("translate")("managementWorkspace.failedToSelectWorkspaceFullDepartmentList"), result.data.message.message, "error"); // "부서 목록 조회 실패" |
| | | } |
| | | }); |
| | | |
| | | return deferred.promise; |
| | | } |
| | | |
| | |
| | | |
| | | |
| | | <div class="select3-selection__choicediv mt-10"> |
| | | <span class="select3-selection__choice" ng-repeat="department in vm.form.departments"> |
| | | <span>{{department.name}}</span> <!--부서 이름 출력--> |
| | | <span class="select3-selection__choice" ng-repeat="department in vm.form.departmentList"> |
| | | <span>{{department.byName}}</span> <!--사용자가 속해 있는 부서 이름 출력--> |
| | | <span class="select3-selection__choice__remove" ng-click="fn.removeDepartments($index)">×</span> |
| | | </span> |
| | | </div> |