OWL ITS + 탐지시스템(인터넷 진흥원)
src/main/webapp/scripts/app/issue/issueAddDownTableConfig.controller.js
@@ -8,8 +8,8 @@
        'angular'
    ],
    function (app, angular) {
        app.controller('issueAddDownTableConfigController', ['$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('issueAddDownTableConfigController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', 'SweetAlert', '$timeout', 'IssueTableConfig', 'IssueTypeCustomField', '$q', '$filter', 'parameter',
            function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, SweetAlert, $timeout, IssueTableConfig, IssueTypeCustomField, $q, $filter, parameter) {
                //  함수 모음
                $scope.fn = {
@@ -24,48 +24,61 @@
                $scope.vm = {
                    issueId : "",
                    issueDownTableConfigs : [{
                        name : $filter("translate")("common.priority"), // 우선순위
                        key : "PRIORITY",
                        name : $filter("translate")("issue.downIssueTitle"), // 하위 이슈 제목
                        key : "DOWN_ISSUE_TITLE",
                        width : "width-80-p",
                        position : 0,
                        display : true,
                        checkboxShow : false
                    }, {
                        name : $filter("translate")("issue.issueStatus"), // 이슈 상태
                        key : "ISSUE_DOWN_STATUS_TYPE",
                        width : "width-50-p",
                        position : 1,
                        display : false
                        display : false,
                        checkboxShow : true
                    }, {
                        name : $filter("translate")("common.priority"), // 우선순위
                        key : "DOWN_PRIORITY",
                        width : "width-50-p",
                        position : 2,
                        display : false,
                        checkboxShow : true
                    }, {
                        name : $filter("translate")("common.importance"), // 중요도
                        key : "SEVERITY",
                        width : "width-80-p",
                        position : 2,
                        display : false
                    }, {
                        name : $filter("translate")("issue.issueType"), // 이슈 타입
                        key : "ISSUE_TYPE",
                        width : "width-140-p",
                        key : "DOWN_SEVERITY",
                        width : "width-50-p",
                        position : 3,
                        display : false
                        display : false,
                        checkboxShow : true
                    }, {
                        name : $filter("translate")("common.assigneeTeam"), // 담당부서
                        key : "ASSIGNEE_TEAM",
                        width : "width-100-p",
                        key : "DOWN_ASSIGNEE_TEAM",
                        width : "width-50-p",
                        position : 4,
                        display : false
                        display : false,
                        checkboxShow : true
                    }, {
                        name : $filter("translate")("common.register"), // 등록자
                        key : "REGISTER",
                        width : "width-100-p",
                        key : "DOWN_REGISTER",
                        width : "width-50-p",
                        position : 5,
                        display : false
                        display : false,
                        checkboxShow : true
                    }, {
                        name : $filter("translate")("common.period"), // 기간
                        key : "PERIOD",
                        width : "width-140-p",
                        key : "DOWN_PERIOD",
                        width : "width-100-p",
                        position : 6,
                        display : false
                        display : false,
                        checkboxShow : true
                    }, {
                        name : $filter("translate")("common.lastChangeDate"), // 최근 변경일
                        key : "MODIFY_DATE",
                        key : "DOWN_MODIFY_DATE",
                        width : "width-100-p",
                        position : 7,
                        display : false
                    }, {
                        display : false,
                        checkboxShow : true
                    }]
                };
@@ -84,7 +97,7 @@
                    $rootScope.spinner = true;
                    var content = {
                        issueId : $rootScope.currentDetailIssueId,
                        issueTypeId : $rootScope.getCurrentIssueTypeId(),
                        issueTableConfigs : JSON.stringify($scope.vm.issueDownTableConfigs)
                    };
@@ -102,8 +115,6 @@
                        else {
                            SweetAlert.error($filter("translate")("issue.failedToSaveIssueTableSetting"), result.data.message.message); // 이슈 테이블 설정 저장 실패
                        }
                        $rootScope.spinner = false;
                    });
                }
@@ -119,7 +130,7 @@
                function getCustomFields() {
                    var deferred = $q.defer();
                    CustomField.find($resourceProvider.getContent({},
                    IssueTypeCustomField.findByIssueType($resourceProvider.getContent({issueTypeId : $rootScope.getCurrentIssueTypeId()},
                        $resourceProvider.getPageContent(0, 1000))).then(function (result) {
                        if (result.data.message.status !== "success") {
                            SweetAlert.error($filter("translate")("issue.failedToUserDefinedFieldListLookup"), result.data.message.message); // 사용자 정의 필드 목록 조회 실패
@@ -134,25 +145,14 @@
                //  이슈 목록 테이블 설정 정보를 가져온다.
                function getDownIssueTableConfigs() {
                    var deferred = $q.defer();
                    var content = {
                        issueId : $rootScope.currentDetailIssueId,
                        delValue : $scope.vm.issueDownTableConfigs.splice(7,1),
                        //delValue : $scope.vm.issueDownTableConfigs.splice(8,1),
                        issueTypeId : $rootScope.getCurrentIssueTypeId(),
                        issueTableConfigs : JSON.stringify($scope.vm.issueDownTableConfigs)
                    };
                    // angular.forEach($scope.vm.issueDownTableConfigs, function (delVaue) {
                    //     if ($scope.vm.issueDownTableConfigs.indexOf(delVaue.name) === "") {
                    //         $scope.vm.issueDownTableConfigs.splice(delVaue,1);
                    //     }
                    //
                    // })
                    // for (var i = 0; i < $scope.vm.issueDownTableConfigs; i++) {
                    //     if ($scope.vm.issueDownTableConfigs == "") {
                    //         $scope.vm.issueDownTableConfigs.splice(i,1);
                    //         i--;
                    //     }
                    // }
                    IssueTableConfig.downDetail($resourceProvider.getContent(content,
                        $resourceProvider.getPageContent(0, 1000))).then(function (result) {
                        if (result.data.message.status !== "success") {
@@ -174,6 +174,7 @@
                            key : "CUSTOM_FIELD_" + customField.id,
                            width : "width-100-p",
                            display : false,
                            checkboxShow : true,
                            position : count
                        });