| | |
| | | formCheck : formCheck, // 폼 체크 |
| | | detail : detail, // 상세 정보 조회 |
| | | removeDepartments : removeDepartments, // 추가한 부서 제거 |
| | | getDepartmentListCallBack : getDepartmentListCallBack |
| | | }; |
| | | |
| | | $scope.vm = { |
| | | id : parameter.id, |
| | | userId : parameter.userId, |
| | | form : { |
| | | id : parameter.id, |
| | | departmentList : [], // 현재 부서 목록 |
| | | departments : [] // 부서 |
| | | }, |
| | | departmentName : [], //부서명 검색 |
| | | departmentName : "", //부서명 검색 |
| | | /*autoCompletePage : { |
| | | project : { |
| | | page : 0, |
| | |
| | | }; |
| | | angular.extend(this, $controller('autoCompleteController', {$scope : $scope, $injector : $injector})); |
| | | |
| | | function getDepartmentListCallBack(result) { |
| | | console.log("TEST"); |
| | | |
| | | } |
| | | |
| | | |
| | | // 선택 한 부서 제거 |
| | | function removeDepartments(index) { |
| | | $scope.vm.form.departmentList.splice(index, 1); |
| | | $scope.vm.form.departments.splice(index, 1); |
| | | } |
| | | |
| | | function formCheck(formInvalid) { |
| | |
| | | $rootScope.spinner = true; |
| | | |
| | | var content = { |
| | | id : $scope.vm.form.id, |
| | | departmentId : (function () { |
| | | id : $scope.vm.id, |
| | | userId : $scope.vm.userId, |
| | | ids : (function () { |
| | | var departmentIds = []; |
| | | angular.forEach($scope.vm.form.departments, function (department) { |
| | | departmentIds.push(department.id); |
| | |
| | | |
| | | function detail() { |
| | | var contents = { |
| | | id : parameter.id |
| | | id : parameter.id, |
| | | userId : parameter.userId |
| | | } |
| | | |
| | | UserWorkspace.userDepartmentDetail($resourceProvider.getContent(//test |
| | |
| | | |
| | | if (result.data.message.status === "success") { |
| | | if (angular.isDefined(result.data.data)) { |
| | | $scope.vm.form.departmentList = result.data.data; //체크 필 |
| | | $scope.vm.form.departments = result.data.data; |
| | | } |
| | | } |
| | | else { |