| | |
| | | makeTag += "<label class='switch'><input type='checkbox' ng-model='data.permGuide' ng-click='event.modifyLevelPermission(data)'><span class='slider round'></span></label>"; |
| | | break; |
| | | |
| | | case "DEPARTMENT_MODIFY": |
| | | if ($rootScope.checkMngPermission('USER_PERMISSION_MNG_WORKSPACE')) { |
| | | makeTag += "<span class='titlename cursor table-word-break-all' ng-click='event.modifyDepartment(data.id)'>" + scope.data.departmentName + "</span>"; |
| | | } |
| | | else { |
| | | makeTag += "<span class='titlename cursor table-word-break-all'>" + scope.data.departmentName + "</span>"; |
| | | } |
| | | break; |
| | | |
| | | case "DEPARTMENT_OPTION" : |
| | | makeTag +="<select class='form-control input-sm' ng-model='data.departmentId' ng-change=''><option ng-repeat='department in data.departments' ng-value='department.fieldKey'>{{::department.fieldValue}}</option></select>"; |
| | | break; |
| | |
| | | "addLevel" : "등급 추가", |
| | | "levelName" : "등급명", |
| | | "failedLevelRegistration" : "사용자 등급 등록 실패", |
| | | "failedDepartmentRegistration" : "부서 등록 실패", |
| | | "read" : "읽기", |
| | | "write" : "쓰기", |
| | | "departmentManagement" : "부서 관리", |
| | |
| | | "failedToRegularPaymentChange": "정기 결제 변경 실패", |
| | | "failedToParticipationStatusChange": "참여 상태 변경 실패", |
| | | "failedToSelectWorkspaceFullUserList": "업무 공간 전체 사용자 목록 조회 실패", |
| | | "failedToSelectWorkspaceFullUserLevelList": "사용자 등급 목록 조회 실패", |
| | | "failedToSelectWorkspaceFullDepartmentList": "부서 목록 조회 실패", |
| | | "failedToModifyUserLevel": "사용자 등급 상세 정보 조회 실패" |
| | | }, |
| | | "issue": { |
| | |
| | | .setHWidth("width-40-p") |
| | | .setDAlign("text-center") |
| | | .setDName("account")); |
| | | $scope.vm.tableConfigs1.push($tableProvider.config() |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("manageUser.manageWorkspacePerm") |
| | | .setHWidth("width-120-p") |
| | | .setDType("renderer") |
New file |
| | |
| | | /** |
| | | * Created by wisestone on 2018-05-08. |
| | | */ |
| | | 'use strict'; |
| | | |
| | | define([ |
| | | 'app', |
| | | 'angular' |
| | | ], |
| | | function (app, angular) { |
| | | app.controller('departmentModifyController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'UserWorkspace', 'parameter', 'SweetAlert', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, UserWorkspace, parameter, SweetAlert, $filter) { |
| | | |
| | | $scope.fn = { |
| | | getDepartmentList : getDepartmentList, // 부서 관리 리스트 |
| | | cancel : cancel, // 팝업 창 닫기 |
| | | formSubmit : formSubmit, // 폼 전송 |
| | | formCheck : formCheck, // 폼 체크 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | | id : parameter.id, |
| | | form : { |
| | | departmentName : "", |
| | | departmentEx : "" |
| | | } |
| | | }; |
| | | |
| | | // 부서 관리 목록 조회 |
| | | function getDepartmentList() { |
| | | |
| | | var conditions = { |
| | | id : $scope.vm.id |
| | | }; |
| | | |
| | | //테이블 리스트 데이터 컨트롤러 요청 |
| | | UserWorkspace.departmentFind($resourceProvider.getContent(conditions, |
| | | $resourceProvider.getPageContent(0, 10))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.form.departmentName = result.data.data[0].departmentName; //departmentName 가져오기 |
| | | $scope.vm.form.departmentDescription = result.data.data[0].departmentDescription; //departmentEx 가져오기 |
| | | |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("managementWorkspace.failedToSelectWorkspaceFullDepartmentList"), result.data.message.message); // "부서 관리 목록 조회 실패" |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function formCheck(formInvalid) { |
| | | if (formInvalid) { |
| | | return true; |
| | | } |
| | | |
| | | return false; |
| | | } |
| | | |
| | | // 폼 전송 |
| | | function formSubmit(condition) { |
| | | $rootScope.spinner = true; |
| | | |
| | | var content = { |
| | | id : parameter.id, |
| | | title : $rootScope.preventXss($scope.vm.form.departmentName), |
| | | description : $rootScope.preventXss($scope.vm.form.departmentDescription) |
| | | }; |
| | | |
| | | UserWorkspace.modifyDepartment($resourceProvider.getContent(condition, |
| | | content, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.fn.cancel(); |
| | | // 목록 화면 갱신 |
| | | $rootScope.$broadcast("getDepartmentList", {}); |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("managementWorkspace.failedDepartmentRegistration"), result.data.message.message); |
| | | } |
| | | |
| | | $rootScope.spinner = false; |
| | | }); |
| | | |
| | | } |
| | | |
| | | // 팝업 창 닫기 |
| | | function cancel() { |
| | | $rootScope.$broadcast("closeLayer"); // 팝업이 열리고 나서 js-multi, js-single 등에서 body 이벤트가 날아가는 현상 수정 |
| | | $uibModalInstance.dismiss('cancel'); |
| | | $(document).unbind("keydown"); // 단축키 이벤트 제거 |
| | | } |
| | | |
| | | $scope.fn.getDepartmentList(); |
| | | |
| | | }]); |
| | | }); |
| | |
| | | cancel : cancel, // 팝업 창 닫기 |
| | | formSubmit : formSubmit, // 폼 전송 |
| | | formCheck : formCheck, // 폼 체크 |
| | | //modifyUserPermission : modifyUserPermission, // 권한 변경 |
| | | //detail : detail // 상세 정보 |
| | | }; |
| | | |
| | | $scope.vm = { |
| | |
| | | |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("managementWorkspace.failedToSelectWorkspaceFullUserList"), result.data.message.message); // "사용자 등급 목록 조회 실패" |
| | | SweetAlert.error($filter("translate")("managementWorkspace.failedToSelectWorkspaceFullUserLevelList"), result.data.message.message); // "사용자 등급 목록 조회 실패" |
| | | } |
| | | }); |
| | | } |
| | |
| | | }; |
| | | |
| | | // 테이블 이벤트 |
| | | $scope.vm.tableEvent = { |
| | | // modifyUserWorkspace : modifyUserWorkspace // 업무 공간 참여하는 사용자의 참여 상태 변경 |
| | | $scope.vm.tableEvent2 = { |
| | | modifyDepartment : modifyDepartment //부서명 변경 |
| | | }; |
| | | |
| | | // 부서 관리 리스트 불러오기 |
| | |
| | | .setHName("manageDepartment.departmentName") |
| | | .setHWidth("width-120-p") |
| | | .setDAlign("text-center") |
| | | .setDName("levelName")); |
| | | .setDName("departmentName") |
| | | .setDType("renderer") |
| | | .setDRenderer("DEPARTMENT_MODIFY")); |
| | | $scope.vm.tableConfigs2.push($tableProvider.config() |
| | | .setHName("manageDepartment.departmentEx") |
| | | .setHName("manageDepartment.departmentDescription") |
| | | .setHWidth("width-120-p") |
| | | .setDAlign("text-center") |
| | | .setDName("manageProject")); |
| | | .setDName("departmentDescription")); |
| | | $scope.vm.tableConfigs2.push($tableProvider.config() |
| | | .setHName("manageDepartment.departmentCount") |
| | | .setHWidth("width-120-p") |
| | | .setDAlign("text-center") |
| | | .setDName("IssueSystem")); |
| | | .setDName("departmentCount")); |
| | | } |
| | | |
| | | // 부서 관리 목록 조회 |
| | |
| | | }; |
| | | |
| | | //테이블 리스트 데이터 컨트롤러 요청 |
| | | // UserWorkspace.departmentFind($resourceProvider.getContent(conditions, |
| | | // $resourceProvider.getPageContent(currentPage, $scope.vm.page.selectedPageRowCount))).then(function (result) { |
| | | // |
| | | // if (result.data.message.status === "success") { |
| | | // $scope.vm.page.selectedPage = currentPage + 1; |
| | | // $scope.vm.responseData = result.data; |
| | | // } |
| | | // else { |
| | | // SweetAlert.error($filter("translate")("managementWorkspace.failedToSelectWorkspaceFullUserList"), result.data.message.message); // "업무 공간 전체 사용자 목록 조회 실패" |
| | | // } |
| | | // }); |
| | | UserWorkspace.departmentFind($resourceProvider.getContent(conditions, |
| | | $resourceProvider.getPageContent(currentPage, $scope.vm.page.selectedPageRowCount))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.page.selectedPage = currentPage + 1; |
| | | $scope.vm.responseData = result.data; |
| | | } |
| | | else { |
| | | SweetAlert.error($filter("translate")("managementWorkspace.failedToSelectWorkspaceFullUserList"), result.data.message.message); // "업무 공간 전체 사용자 목록 조회 실패" |
| | | } |
| | | }); |
| | | } |
| | | // 부서 추가 |
| | | function departmentAdd() { |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 부서명 수정 |
| | | function modifyDepartment(id) { |
| | | $uibModal.open({ |
| | | templateUrl : 'views/workspace/workspaceDepartmentModify.html', |
| | | size : "md", |
| | | controller : 'departmentModifyController', |
| | | backdrop : 'static', |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | id : id |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | $scope.fn.makeTableConfigs(); |
| | | $scope.fn.getDepartmentList(); |
| | | |
| | |
| | | define(['app'], function (app) { |
| | | app.factory("UserWorkspace", ['$http', '$log', function ($http, $log) { |
| | | return { |
| | | //사용자 등급 관리 |
| | | levelFind : function (conditions) { |
| | | return $http.post("userLevel/find", conditions).then(function (response) { |
| | | $log.debug("사용자 등급 목록 : ", response); |
| | |
| | | return response; |
| | | }); |
| | | }, |
| | | |
| | | //부서 관리 |
| | | departmentFind : function (conditions) { |
| | | return $http.post("userWorkspace/departmentFind", conditions).then(function (response) { |
| | | return $http.post("departmentManage/find", conditions).then(function (response) { |
| | | $log.debug("부서 목록 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | departmentAdd : function (conditions) { |
| | | return $http.post("userWorkspace/departmentAdd", conditions).then(function (response) { |
| | | return $http.post("departmentManage/add", conditions).then(function (response) { |
| | | $log.debug("부서 생성 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | departmentModify : function (conditions) { |
| | | return $http.post("departmentManage/modify", conditions).then(function (response) { |
| | | $log.debug("부서 수정 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | departmentRemove : function (conditions) { |
| | | return $http.post("departmentManage/remove", conditions).then(function (response) { |
| | | $log.debug("부서 삭제 결과 : ", response); |
| | | return response; |
| | | }); |
| | | }, |
| | | |
| | | //사용자 관리 |
| | | find : function (conditions) { |
| | | return $http.post("userWorkspace/find", conditions).then(function (response) { |
| | | $log.debug("워크스페이스에 참여하는 전체 사용자 목록 : ", response); |
| | |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <!--<div class="col-sm-6 text-right"> |
| | | <div class="col-sm-6 text-right" ng-if="$root.checkMngPermission('USER_PERMISSION_MNG_WORKSPACE')"> |
| | | <form class="form-inline justify-content-sm-end pull-right ng-pristine ng-valid" method="post" action="/departmentManage/downloadExcel" name="departmentManageListForm"> |
| | | <input type="hidden" name="conditions" autocomplete="off"> |
| | | <div class="btn-group"> |
| | | <button aria-expanded="false" |
| | | aria-haspopup="true" |
| | | class="btn btn-secondary dropdown-toggle" |
| | | data-toggle="dropdown" |
| | | type="button">추가기능 |
| | | <button aria-expanded="false" aria-haspopup="true" class="btn btn-secondary dropdown-toggle" data-toggle="dropdown" type="button"><span translate="common.addFunction" class="ng-scope">추가기능</span> |
| | | </button> |
| | | <div aria-labelledby="dropdownMenuButton2" |
| | | class="dropdown-menu" |
| | | x-placement="bottom-start" |
| | | style="position: absolute; transform: translate3d(0px, 30px, 0px); top: 0px; left: 0px; will-change: transform;"> |
| | | <a class="dropdown-item" href="#"> 삭제</a> |
| | | <div aria-labelledby="dropdownMenuButton2" class="dropdown-menu left-menu" x-placement="bottom-start"> |
| | | <a class="dropdown-item cursor ng-isolate-scope" form-submit="departmentManageListForm" make-search-conditions="fn.makeSearchConditions()"><span translate="common.downloadExcel" class="ng-scope">엑셀 다운로드</span></a> |
| | | <a class="dropdown-item cursor" ng-click="fn.removes()"> <span translate="common.delete" class="ng-scope">삭제</span></a> |
| | | </div> |
| | | </div> |
| | | </div>--> |
| | | </form> |
| | | </div> |
| | | </div> |
| | | </div> |
| | | |
| | | <div class="table-responsive"> |
| | | <js-table data="vm.responseData.data" table-configs="vm.tableConfigs2" |
| | | event="vm.tableEvent"></js-table> |
| | | event="vm.tableEvent2"></js-table> |
| | | </div> |
| | | |
| | | <div class="controls-below-table text-center"> |
New file |
| | |
| | | <div class="formModal"> |
| | | <div class="modal-header faded smaller"> |
| | | <div class="modal-title"> |
| | | <strong>부서명 수정</strong> |
| | | </div> |
| | | <button aria-label="Close" class="close" type="button" ng-click="fn.cancel()"> |
| | | <span aria-hidden="true"> ×</span> |
| | | </button> |
| | | </div> |
| | | |
| | | <div class="modal-body"> |
| | | <form role="form" name="departmentModifyForm"> |
| | | <div class="form-group"> |
| | | <label for="departmentModifyForm1"> |
| | | <span translate="common.departmentName">부서명</span> |
| | | <code class="highlighter-rouge">*</code> |
| | | </label> |
| | | <input id="departmentModifyForm1" |
| | | name="name" |
| | | type="text" |
| | | class="form-control" |
| | | autofocus |
| | | kr-input |
| | | input-regex="[^a-zA-Z0-9 가-힣ㄱ-ㅎㅏ-ㅣ\u318D\u119E\u11A2\u2022\u2025a\u00B7\uFE55]" |
| | | autocomplete="off" |
| | | ng-model="vm.form.departmentName" |
| | | ng-maxlength="200" |
| | | maxlength="200" |
| | | required> |
| | | <!--<small translate="notice.enterSpecialCharacters">제목에는 특수 문자를 입력할 수 없습니다.</small>--> |
| | | </div> |
| | | |
| | | <div class="form-group"> |
| | | <label> |
| | | <span translate="manageDepartment.departmentEx">부서 설명</span> |
| | | <code class="highlighter-rouge">*</code> |
| | | </label> |
| | | <summernote |
| | | class="summernote" |
| | | lang="ko-KR" |
| | | required |
| | | config="vm.options" |
| | | ng-model="vm.form.description" |
| | | target=".note-editable"></summernote> |
| | | </div> |
| | | </form> |
| | | </div> |
| | | |
| | | <div class="modal-footer buttons-on-right"> |
| | | <button type="button" class="btn btn-md btn-grey" ng-click="fn.cancel()"><span translate="common.cancel">취소</span></button> |
| | | <button type="button" class="btn btn-md btn-primary bold" |
| | | js-short-cut |
| | | js-short-cut-action="(fn.formCheck(departmentModifyForm.$invalid) || $root.spinner) ? null : fn.formSubmit()" |
| | | ng-disabled="fn.formCheck(departmentModifyForm.$invalid)" |
| | | ng-click="fn.formSubmit()"><span translate="common.save">저장</span> |
| | | </button> |
| | | </div> |
| | | </div> |
| | |
| | | <table class="table table-lightborder"> |
| | | <tr> |
| | | <td> |
| | | <label for="levelAddForm1"><span translate="managementWorkspace.levelName">등급명</span><code class="highlighter-rouge">*</code></label> |
| | | <label for="levelModifyForm1"><span translate="managementWorkspace.levelName">등급명</span><code class="highlighter-rouge">*</code></label> |
| | | </td> |
| | | <td> |
| | | <div class="input-group mb-0 mr-sm-0 mb-sm-0"> |
| | | <input id="levelAddForm1" |
| | | <input id="levelModifyForm1" |
| | | name="levelName" |
| | | type="text" |
| | | class="form-control" |
| | |
| | | </label> |
| | | </div> |
| | | </div> |
| | | <div class="col-sm-6 text-right" ng-if="$root.checkMngPermission('USER_PERMISSION_MNG_API')"> |
| | | <div class="col-sm-6 text-right" ng-if="$root.checkMngPermission('USER_PERMISSION_MNG_WORKSPACE')"> |
| | | <form class="form-inline justify-content-sm-end pull-right ng-pristine ng-valid" method="post" action="/userLevel/downloadExcel" name="userLevelListForm"> |
| | | <input type="hidden" name="conditions" autocomplete="off"> |
| | | <div class="btn-group"> |