OWL ITS + 탐지시스템(인터넷 진흥원)
src/main/webapp/scripts/app/issue/issueAddTableConfig.controller.js
@@ -8,8 +8,8 @@
        'angular'
    ],
    function (app, angular) {
        app.controller('issueAddTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter',
            function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter) {
        app.controller('issueAddTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'CustomField', '$q', '$filter', 'parameter',
            function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, CustomField, $q, $filter, parameter) {
                //  함수 모음
                $scope.fn = {
@@ -17,7 +17,7 @@
                    formSubmit : formSubmit,    //  폼 전송
                    formCheck : formCheck,  //  폼 체크
                    getCustomFields : getCustomFields,   //  사용자 정의 필드 목록을 가져온다.
                    getIssueTableConfigs : getIssueTableConfigs //  이슈 목록 테이블 설정 정보를 가져온다.
                    getIssueAddTableConfigs : getIssueAddTableConfigs //  이슈 목록 테이블 설정 정보를 가져온다.
                };
                //  변수 모음
@@ -25,7 +25,7 @@
                    issueTableConfigs : [{
                        name : $filter("translate")("common.priority"), // 우선순위
                        key : "PRIORITY",
                        width : "width-100-p",
                        width : "width-80-p",
                        position : 1,
                        display : true
                    }, {
@@ -41,28 +41,34 @@
                        position : 3,
                        display : true
                    }, {
                        name : $filter("translate")("common.assignee"), // 담당자
                        key : "ASSIGNEE",
                        name : $filter("translate")("common.assigneeTeam"), // 담당부서
                        key : "ASSIGNEE_TEAM",
                        width : "width-100-p",
                        position : 4,
                        display : true
                    }, {
                        name : $filter("translate")("common.countDownIssue"), // 하위이슈 카운트
                        key : "COUNT_DOWN_ISSUE",
                        width : "width-100-p",
                        position : 5,
                        display : false
                    }, {
                        name : $filter("translate")("common.register"), // 등록자
                        key : "REGISTER",
                        width : "width-100-p",
                        position : 5,
                        position : 6,
                        display : false
                    }, {
                        name : $filter("translate")("common.period"), // 기간
                        key : "PERIOD",
                        width : "width-140-p",
                        position : 6,
                        position : 7,
                        display : false
                    }, {
                        name : $filter("translate")("common.lastChangeDate"), // 최근 변경일
                        key : "MODIFY_DATE",
                        width : "width-100-p",
                        position : 7,
                        position : 8,
                        display : false
                    }, {
                    }]
@@ -83,6 +89,7 @@
                    $rootScope.spinner = true;
                    var content = {
                        issueTypeId : $rootScope.getCurrentIssueTypeId(),
                        issueTableConfigs : JSON.stringify($scope.vm.issueTableConfigs)
                    };
@@ -91,7 +98,10 @@
                        if (result.data.message.status === "success") {
                            SweetAlert.success($filter("translate")("issue.completedSavingIssueTable"), $filter("translate")("issue.saveIssueTableSettingsInformation")); // "이슈 테이블 설정 저장 완료", "이슈 테이블 설정 정보가 저장되었습니다."
                            //  변경된 이슈 테이블 정보를 이슈 목록 테이블에 갱신한다.
                            swal.close();
                            $scope.fn.cancel();
                            $rootScope.$broadcast("getIssueTableConfigs", {});
                        }
                        else {
@@ -126,15 +136,27 @@
                    return deferred.promise;
                }
                var content = {
                    delValue : $scope.vm.issueTableConfigs.splice(8,1),
                    issueTableConfigs : JSON.stringify($scope.vm.issueTableConfigs),
                    issueTypeId : $rootScope.getCurrentIssueTypeId()
                };
                //  이슈 목록 테이블 설정 정보를 가져온다.
                function getIssueTableConfigs() {
                function getIssueAddTableConfigs() {
                    var deferred = $q.defer();
                    IssueTableConfig.detail($resourceProvider.getContent({},
                    IssueTableConfig.detail($resourceProvider.getContent(content,
                        $resourceProvider.getPageContent(0, 1000))).then(function (result) {
                        if (result.data.message.status !== "success") {
                            SweetAlert.error($filter("translate")("issue.failedToIssueTableColumnLookup"), result.data.message.message); // 이슈 테이블 컬럼 조회 실패
                        }
                        // for (var i = 0; i < result.data.name; i++) {
                        //     if (result.data.name === '') {
                        //         result.splice(i,1);
                        //         i--;
                        //     }
                        // }
                        deferred.resolve(result.data.data);
                    });
@@ -158,7 +180,7 @@
                    });
                    //  이슈 목록 테이블 설정 정보를 가져온다.
                    $scope.fn.getIssueTableConfigs().then(function (issueTableConfigs) {
                    $scope.fn.getIssueAddTableConfigs().then(function (issueTableConfigs) {
                        if ($rootScope.isDefined(issueTableConfigs)) {
                            $rootScope.spinner = true;