From 71ae5976e7dddc5693801064e48bdd372c63f86b Mon Sep 17 00:00:00 2001 From: wyu <kknd09321@nate.com> Date: 월, 06 12월 2021 11:18:16 +0900 Subject: [PATCH] 연관 이슈 추가 --- src/main/webapp/scripts/app/issue/issue.js | 2 src/main/webapp/scripts/app/issue/issueAddRelation.controller.js | 885 ++++++++++++++++++++++++++++++++ src/main/webapp/scripts/components/issue/issue.service.js | 13 src/main/webapp/scripts/app/issue/issueList.controller.js | 17 src/main/webapp/views/issue/issueAddRelation.html | 656 ++++++++++++++++++++++++ src/main/webapp/views/issue/issueDetail.html | 4 src/main/webapp/scripts/app/issue/issueDetail.controller.js | 1 src/main/webapp/scripts/main.js | 2 src/main/webapp/scripts/app/issue/issueModify.controller.js | 2 9 files changed, 1,580 insertions(+), 2 deletions(-) diff --git a/src/main/webapp/scripts/app/issue/issue.js b/src/main/webapp/scripts/app/issue/issue.js index 10be9c9..3858282 100644 --- a/src/main/webapp/scripts/app/issue/issue.js +++ b/src/main/webapp/scripts/app/issue/issue.js @@ -33,7 +33,7 @@ loadController: ["$q", function ($q) { var deferred = $q.defer(); require([ - 'issueListTimelineController', 'issueManagerController', 'issueListController', 'issueAddController', 'issueModifyController', 'issueDetailController', 'issueImportExcelController', + 'issueListTimelineController', 'issueManagerController', 'issueListController', 'issueAddController', 'issueModifyController', 'issueDetailController', 'issueAddRelationController', 'issueImportExcelController', 'chartLoader', 'jsTable', 'tableColumnGenerator', 'modalFormAutoScroll', 'summerNote', 'summerNote-ko-KR', 'fullScroll', 'workflowService', 'priorityService', 'issueSearchService', 'issueTableConfigService', 'inputRegex', 'severityService', 'issueTypeService', 'issueTypeCustomFieldService', 'issueService', 'issueStatusService', 'issueUserService','issueDepartmentService','issueModifyUserController', 'issueModifyDepartmentController', 'customFieldService', 'issueSearchFieldKeyViewElement', 'issueSearchCustomFieldViewElement', 'tableUserImage', 'fullScroll', 'issueCommentService', 'detectIssueEditor', 'formSubmit', 'issueModifyStatusController', 'jsShortCut', diff --git a/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js b/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js new file mode 100644 index 0000000..91d28fa --- /dev/null +++ b/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js @@ -0,0 +1,885 @@ +/** + * Created by wisestone on 2017-12-15. + */ +'use strict'; + +define([ + 'app', + 'angular' + ], + function (app, angular) { + app.controller('issueAddRelationController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', '$uibModal', '$injector', + '$controller', '$tableProvider', 'parameter' ,'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'Priority', 'Severity','IssueRelation' ,'IssueTypeCustomField', '$filter', '$state', + function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, $uibModal, $injector, $controller, $tableProvider, parameter, SweetAlert, $timeout, + $stateParams, $q, Issue, User, AttachedFile, IssueType, Priority, Severity, IssueRelation, IssueTypeCustomField, $filter, $state) { + + $scope.fn = { + cancel : cancel, // �뙘�뾽 李� �떕湲� + formSubmit : formSubmit, // �뤌 �쟾�넚 + formCheck : formCheck, // �뤌 泥댄겕 + getUserListCallBack : getUserListCallBack, // �떞�떦�옄 autocomplete �럹�씠吏� + getProjectListCallBack : getProjectListCallBack, // �봽濡쒖젥�듃 autocomplete �럹�씠吏� + getIssueCompanyFieldListCallBack : getIssueCompanyFieldListCallBack, // �뾽泥댁젙蹂� autocomplete �럹�씠吏� + getIssueDepartmentListCallBack : getIssueDepartmentListCallBack, // �떞�떦�옄 -> �떞�떦遺��꽌 autocomplete �럹�씠吏� + getIssueIspFieldListCallBack : getIssueIspFieldListCallBack, // ISP�젙蹂� autocomplete �럹�씠吏� + getIssueHostingFieldListCallBack : getIssueHostingFieldListCallBack, // �샇�뒪�똿�젙蹂� autocomplete �럹�씠吏� + getOptionColor : getOptionColor, // �슦�꽑�닚�쐞, 以묒슂�룄 �깋�긽�쑝濡� Select �깭洹� �쟻�슜 + onFileSelect : onFileSelect, // �뙆�씪 泥⑤� + infiniteAddForm : infiniteAddForm, // 怨꾩냽 �깮�꽦 + imageUpload : imageUpload, // �꽟癒몃끂�듃 �씠誘몄� �뾽濡쒕뱶 + getIssueTypes : getIssueTypes, // �씠�뒋 ���엯 紐⑸줉 媛��졇�삤湲� + getPriorities : getPriorities, // �슦�꽑�닚�쐞 紐⑸줉 媛��졇�삤湲� + getSeverities : getSeverities, // 以묒슂�룄 紐⑸줉 媛��졇�삤湲� + getIssueTypeCustomFields : getIssueTypeCustomFields, // �씠�뒋 �쑀�삎�뿉 �뿰寃곕맂 �궗�슜�옄 �젙�쓽 �븘�뱶 紐⑸줉 媛��졇�삤湲� + removeUploadFile : removeUploadFile, // �뾽濡쒕뱶�븯�젮�뒗 �듅�젙 �뙆�씪�쓣 �궘�젣 + removeManager : removeManager, // �떞�떦�옄 �궘�젣 + removeDepartment : removeDepartment, // �떞�떦遺��꽌 �궘�젣 + setIssueTypeTemplate : setIssueTypeTemplate, // �씠�뒋 �쑀�삎 �뀥�뵆由� �쟻�슜�븯湲� + startExecute : startExecute, // 而⑦듃濡� 濡쒕뵫�떆 泥섏쓬�쑝濡� �떆�옉�릺�뒗 �븿�닔 + containsPartner : containsPartner, + getPartners : getPartners, + addRelationIssue : addRelationIssue, + }; + + $scope.vm = { + partnerVos : "", + form : { + title : "", // �젣紐� + description : "", // �궡�슜 + issueStatusId : "", // �씠�뒋 �긽�깭 + projects : [], // �봽濡쒖젥�듃 + issueCompanyFields : [], // �뾽泥댁젙蹂� + issueIspFields : [], // ISP �젙蹂� + issueHostingFields : [], // �샇�뒪�똿�젙蹂� + issueTypeId : "", // �씠�뒋 �쑀�삎 �븘�씠�뵒 + priorityId : "", // �슦�꽑�닚�쐞 �븘�씠�뵒 + severityId : "", // 以묒슂�룄 �븘�씠�뵒 + users : [], // �떞�떦�옄 + departments : [], // �뵥�떦遺��꽌 + files : [], // �뾽濡쒕뱶 �뙆�씪 + attachedFiles : [], // �꽟癒몃끂�듃濡� �뙆�씪 �뾽濡쒕뱶瑜� �븷 寃쎌슦 �꽌踰꾩뿉�꽌 pk瑜� �뵲怨� issue id�� �뿰�룞 �옉�뾽�씠 �븘�슂�븯�떎. + startCompleteDateRange : "", // �떆�옉�씪 ~ 醫낅즺�씪 + detectingDateRange : "", // �깘吏��씪 + issueCustomFields : [], // �씠�뒋�뿉�꽌 �궗�슜�릺�뒗 �궗�슜�옄 �젙�쓽 �븘�뱶 + removeFiles : [], // �궘�젣 �뙆�씪 + }, + id : parameter.id, + infiniteAdd : false, // �뿰�냽 �깮�꽦 + projectName : "", // �봽濡쒖젥�듃 紐� 寃��깋 + userName : "", // �궗�슜�옄 寃��깋 + departmentName : "", // 遺��꽌紐� 寃��깋 + companyId : -1, // 遺��꽌 ID + companyName : "", // �뾽泥대챸 寃��깋 + companyManager : "", // �뾽泥� �떞�떦�옄 + companyTel : "", // �뾽泥� �쟾�솕踰덊샇 + companyEmail : "", // �뾽泥� �씠硫붿씪 + companyMemo : "", // �뾽泥� 鍮꾧퀬 + ispId : -1, // ISP ID + ispName : "", // ISP 紐� + ispCode : "", // ISP 肄붾뱶 + ispManager : "", // ISP �떞�떦�옄 + ispTel : "", // ISP �쟾�솕踰덊샇 + ispEmail : "", // ISP �씠硫붿씪 + ispMemo : "", // ISP 鍮꾧퀬 + hostingId : -1, // �샇�뒪�똿 ID + hostingName : "", // �샇�뒪�똿紐� 寃��깋 + hostingManager : "", // �샇�뒪�똿 �떞�떦�옄 + hostingTel : "", // �샇�뒪�똿 �쟾�솕踰덊샇 + hostingCode : "", // �샇�뒪�똿 肄붾뱶 + hostingEmail : "", // �샇�뒪�똿 �씠硫붿씪 + hostingMemo :"", // �샇�뒪�똿 鍮꾧퀬 + + + + autoCompletePage : { + user : { + page : 0, + totalPage : 0 + }, + project : { + page : 0, + totalPage : 0 + }, + companyField : { + page : 0, + totalPage : 0 + }, + department : { + page : 0, + totalPage : 0 + }, + ispField : { + page : 0, + totalPage : 0 + }, + hostingField : { + page : 0, + totalPage : 0 + } + }, + summerNote : { + editable : null, + editor : null + }, + issueTypes : [], // �씠�뒋 �쑀�삎 �쟾泥� 紐⑸줉 + priorities : [], // �슦�꽑�닚�쐞 �젙蹂� + severities : [], // 以묒슂�룄 �젙蹂� + fileTableConfigs : [], // �뙆�씪 �뾽濡쒕뱶 �젙蹂� �뀒�씠釉� + }; + + angular.extend(this, $controller('autoCompleteController', {$scope : $scope, $injector : $injector})); + + function getStartProjectListCallback(result){ + // �봽濡쒖젥�듃 autocomplete page �뾽�뜲�씠�듃 + $scope.vm.autoCompletePage.project.totalPage = result.data.page.totalPage; + + var projectVo = result.data.data[0]; + $scope.vm.form.projects.push(projectVo); + } + + // �봽濡쒖젥�듃媛� 蹂�寃쎈릺硫� �떞�떦�옄 珥덇린�솕 + $scope.$watch("vm.form.projects", function (newValue, oldValue) { + + + if (angular.isDefined(newValue)) { + if (newValue.length < 1) { + $scope.vm.form.users = []; + } else { + // �씠�뒋 �쑀�삎�뿉 �뿰寃곕맂 �궗�슜�옄 �젙�쓽 �븘�뱶 媛��졇�삤湲� + $scope.fn.getIssueTypeCustomFields(); + } + } + }); + + $scope.$watch("vm.form.issueTypeId", function (newValue, oldValue) { + $scope.vm.partnerVos = $scope.fn.getPartners(); + }); + + // �꽟癒몃끂�듃 �씠誘몄� �뾽濡쒕뱶 + function imageUpload($files) { + var listFiles = []; + var uploadFileSize = 0; + + for (var count in $files) { + var $file = $files[count]; + + if (typeof ($file) == "object") { + uploadFileSize += $file.size; + + // �뙆�씪�떦 �슜�웾 �젣�븳 10MB + if ($file.size > $rootScope.fileByte.image) { + SweetAlert.error($filter("translate")("issue.capacityExceededImageFile"), $filter("translate")("issue.attachedOnlyImageFiles10mb")); // "�씠誘몄� �뙆�씪 �슜�웾 珥덇낵", "10MB �씠�븯�쓽 �씠誘몄� �뙆�씪留� 泥⑤�媛� 媛��뒫�빀�땲�떎." + listFiles = []; + break; + } + + // �뿬�윭嫄댁쓽 �뙆�씪�쓣 �븳踰덉뿉 �뾽濡쒕뱶�븷 寃쎌슦 �젣�븳 300MB + if (uploadFileSize > $rootScope.fileByte.file) { + SweetAlert.error($filter("translate")("issue.capacityExceededImageFile"), $filter("translate")("issue.attachedMultipleImageFiles100mb")); // "�씠誘몄� �뙆�씪 �슜�웾 珥덇낵", "�뿬�윭 嫄댁쓽 �씠誘몄�瑜� �븳踰덉뿉 泥⑤��븷 寃쎌슦 100MB �씠�븯源뚯�留� 泥⑤�媛� 媛��뒫�빀�땲�떎." + listFiles = []; + break; + } + + if (!$rootScope.checkImageType($file)) { + SweetAlert.error($filter("translate")("issue.limitImageFile"), $filter("translate")("issue.canBeUploadedOnlyImageFiles")); // "�씠誘몄� �뙆�씪 �젣�븳", "�씠誘몄� �뙆�씪留� �뾽濡쒕뱶 媛��뒫�빀�땲�떎. - bmp, jpg, jpeg, png, tif" + listFiles = []; + break; + } + + if (!angular.isDefined($file.name)) { + var fileType = $file.type.split("/"); + var imageType = ""; + + if (fileType[0] === "image") { + imageType = "." + fileType[1]; + } + + $file.name = new Date().getTime() + imageType; + } + else { + if ($file.name.indexOf(';') !== -1) { + SweetAlert.error($filter("translate")("issue.nameErrorImageFile"), $filter("translate")("issue.cannotUploadFileNameSpecialCharacters")); // "�씠誘몄� �뙆�씪紐� �삤瑜�", "�뙆�씪紐낆뿉 �듅�닔臾몄옄(;)媛� �뱾�뼱媛�硫� �뾽濡쒕뱶 �븷 �닔 �뾾�뒿�땲�떎." + listFiles = []; + break; + } + } + + listFiles.push($file); + } + } + + // �뙆�씪 �뾽濡쒕뱶 寃�利앹쓣 嫄곗튇 �뙆�씪�씠 1媛쒖씠�긽 議댁옱�븷 寃쎌슦�뿉留� �떎�뻾 + if (listFiles.length > 0) { + AttachedFile.add({ + method : "POST", + file : listFiles, + // data �냽�꽦�쑝濡� 蹂꾨룄�쓽 �뜲�씠�꽣 �쟾�넚 + fields : { + content : { + workspaceId : $rootScope.user.lastWorkspaceId + } + }, + fileFormDataName : "file" + }) + .then(function (result) { + if (result.data.message.status === "success") { + angular.forEach(result.data.attachedFiles, function (fileInfo) { + $scope.vm.summerNote.editor.summernote("editor.insertImage", fileInfo.path); + $scope.vm.form.attachedFiles.push(fileInfo); + }); + } + else { + SweetAlert.error($filter("translate")("issue.errorFileUpload"), result.data.message.message); // �뙆�씪 �뾽濡쒕뱶 �삤瑜� + } + }); + } + } + + // �뿰�냽�쑝濡� �씠�뒋瑜� �벑濡앺븷 �븣 �엯�젰 �뤌 珥덇린�솕 + function infiniteAddForm() { + $scope.vm.form.title = ""; + $scope.vm.form.description = ""; + $scope.vm.form.files = []; + $scope.vm.form.attachedFiles = []; + + // �씠�뒋 �쑀�삎 �뀥�뵆由� �쟻�슜�븯湲� + $scope.fn.setIssueTypeTemplate(); + + $(".modal-body").animate({ + scrollTop : 0 + }, 500); + + $timeout(function () { + $("[name='title']").trigger("focus") + }, 100); + } + + // �뙆�씪 �뾽濡쒕뱶�뿉 �궗�슜 + function onFileSelect($files) { + var uploadFileSize = 0; + + // �씠�쟾�뿉 泥⑤��븳 �뙆�씪�씠 �엳�쓣 寃쎌슦 �쟾泥� �뾽濡쒕뱶 �슜�웾�뿉 �룷�븿 + angular.forEach($scope.vm.form.files, function ($file) { + uploadFileSize += $file.size; + }); + + for (var count in $files) { + var $file = $files[count]; + + if (typeof ($file) == "object") { + uploadFileSize += $file.size; + + // �뙆�씪�떦 �슜�웾 �젣�븳 300MB + if (($file.size > $rootScope.fileByte.file) || (uploadFileSize > $rootScope.fileByte.file)) { + SweetAlert.error($filter("translate")("issue.attachmentCapacityExceeded"), $filter("translate")("issue.canAttachFileUpTo100mb")); // "泥⑤� �뙆�씪 �슜�웾 珥덇낵", "100MB �씠�븯源뚯�留� �뙆�씪 泥⑤�媛� 媛��뒫�빀�땲�떎." + break; + } + + // �뙆�씪�쓣 �뾽濡쒕뱶�븷 �븣 �뙆�씪 �쑀�삎�쓣 �솗�씤�빐二쇰뒗 湲곕뒫 - �뿀�슜�릺吏� �븡�� �솗�옣�옄�씪 �븣�뒗 泥⑤� 湲덉� + if (!$rootScope.checkFileType($file)) { + SweetAlert.error($filter("translate")("issue.limitAttachmentExtensions"), $filter("translate")("issue.notAllowedAttachment")); // "泥⑤� �뙆�씪 �솗�옣�옄 �젣�븳", "泥⑤�媛� �뿀�슜�릺吏� �븡�뒗 �뙆�씪�엯�땲�떎." + break; + } + + if ($file.name.indexOf(';') !== -1) { + SweetAlert.error($filter("translate")("issue.nameErrorAttachment"), $filter("translate")("issue.cannotUploadFileNameSpecialCharacters")); // "泥⑤� �뙆�씪紐� �삤瑜�", "�뙆�씪紐낆뿉 �듅�닔臾몄옄(;)媛� �뱾�뼱媛�硫� �뾽濡쒕뱶 �븷 �닔 �뾾�뒿�땲�떎." + break; + } + + $file.index = count; + $scope.vm.form.files.push($file); + } + } + } + + // ���젆�듃 諛뺤뒪�뿉�꽌 以묒슂�룄, �슦�꽑�닚�쐞 �깋�긽 �몴�떆 + function getOptionColor(list, key) { + var color = "#353535"; // 湲곕낯�깋�� 寃����깋. + + for (var count in list) { + if (String(list[count].id) === key) { + color = list[count].color; + break; + } + } + + return color; + } + + // �떞�떦�옄 �궘�젣 + function removeManager(index) { + $scope.vm.form.departments.splice(index, 1); + } + + // �떞�떦遺��꽌 �궘�젣 + function removeDepartment(index) { + $scope.vm.form.departments.splice(index, 1); + } + + // �뾽濡쒕뱶 �뙆�씪 �궘�젣 + function removeUploadFile(index) { + $scope.vm.form.files.splice(index, 1); + + angular.forEach($scope.vm.form.files, function (file, index) { + file.index = index; + }); + } + + // �뾽泥�/ISP/�샇�뒪�똿 �씠由꾩씠 �룷�븿 �뿬遺� �솗�씤 + function containsPartner(name) { + var result = false; + + if ($scope.vm.partnerVos != null) { + $scope.vm.partnerVos.forEach(function (partnerVo) { + if (name === partnerVo.name) { + result = true; + } + }); + } + return result; + + } + + // �떞�떦�옄 autocomplete page �뾽�뜲�씠�듃�듃 + function getUserListCallBack(result) { + $scope.vm.autoCompletePage.user.totalPage = result.data.page.totalPage; + } + + // �봽濡쒖젥�듃 autocomplete page �뾽�뜲�씠�듃 + function getProjectListCallBack(result) { + $scope.vm.autoCompletePage.project.totalPage = result.data.page.totalPage; + } + + // �뾽泥댁젙蹂� autocomplete page �뾽�뜲�씠�듃 + function getIssueCompanyFieldListCallBack(result) { + $scope.vm.autoCompletePage.companyField.totalPage = result.data.page.totalPage; + } + + // 遺��꽌�젙蹂� autocomplete page �뾽�뜲�씠�듃 + function getIssueDepartmentListCallBack(result) { + $scope.vm.autoCompletePage.department.totalPage = result.data.page.totalPage; + } + + // ISP�젙蹂� autocomplete page �뾽�뜲�씠�듃 + function getIssueIspFieldListCallBack(result) { + $scope.vm.autoCompletePage.ispField.totalPage = result.data.page.totalPage; + } + + // �샇�뒪�똿�젙蹂� autocomplete page �뾽�뜲�씠�듃 + function getIssueHostingFieldListCallBack(result) { + $scope.vm.autoCompletePage.hostingField.totalPage = result.data.page.totalPage; + } + + // �뤌 泥댄겕 + function formCheck(formInvalid) { + if (formInvalid) { + return true; + } + return false; + } + + // �뾽泥댁젙蹂� 寃곌낵 媛� Event 泥섎━(set) + $scope.$on("companyFieldEvent", function (event, result) { + $scope.vm.companyId = result[0].id; + $scope.vm.companyName = result[0].name; + $scope.vm.companyManager = result[0].manager; + $scope.vm.companyTel = result[0].tel; + $scope.vm.companyEmail = result[0].email; + $scope.vm.companyMemo = result[0].memo; + + }); + + // ISP�젙蹂� 寃곌낵 媛� Event 泥섎━(set) + $scope.$on("ispFieldEvent", function (event, result) { + $scope.vm.ispId = result[0].id; + $scope.vm.ispName = result[0].name; + $scope.vm.ispCode = result[0].code; + $scope.vm.ispManager = result[0].manager; + $scope.vm.ispTel = result[0].tel; + $scope.vm.ispEmail = result[0].email; + $scope.vm.ispMemo = result[0].memo; + }); + + // �샇�뒪�똿�젙蹂� 寃곌낵 媛� Event 泥섎━(set) + $scope.$on("hostingFieldEvent", function (event, result) { + $scope.vm.hostingId = result[0].id; + $scope.vm.hostingName = result[0].name; + $scope.vm.hostingCode = result[0].code; + $scope.vm.hostingManager = result[0].manager; + $scope.vm.hostingTel = result[0].tel; + $scope.vm.hostingEmail = result[0].email; + $scope.vm.hostingMemo = result[0].memo; + }); + + // �뤌 �쟾�넚 + function formSubmit() { + $rootScope.spinner = true; + + var content = { + //id : parameter.id, + title : $rootScope.preventXss($scope.vm.form.title), // �젣紐� + description : $rootScope.preventXss($scope.vm.form.description), // �궡�슜 + companyName : $scope.vm.companyName, + companyManager : $scope.vm.companyManager, + companyTel : $scope.vm.companyTel, + companyEmail :$scope.vm.companyEmail, + companyMemo : $scope.vm.companyMemo, + ispName : $scope.vm.ispName, + ispCode : $scope.vm.ispCode, + ispManager : $scope.vm.ispManager, + ispTel : $scope.vm.ispTel, + ispEmail : $scope.vm.ispEmail, + ispMemo : $scope.vm.ispMemo, + hostingName : $scope.vm.hostingName, + hostingCode : $scope.vm.hostingCode, + hostingManager : $scope.vm.hostingManager, + hostingTel : $scope.vm.hostingTel, + hostingEmail : $scope.vm.hostingEmail, + hostingMemo : $scope.vm.hostingMemo, + + projectId : (function () { // �봽濡쒖젥�듃 �븘�씠�뵒 + var projectId = ""; + + if ($scope.vm.form.projects.length > 0) { + projectId = $scope.vm.form.projects[0].id; + } + + return projectId; + })(), + + issueTypeId : $scope.vm.form.issueTypeId, // �씠�뒋 �쑀�삎 �븘�씠�뵒 + priorityId : $scope.vm.form.priorityId, // �슦�꽑�닚�쐞 �븘�씠�뵒 + severityId : $scope.vm.form.severityId, // 以묒슂�룄 �븘�씠�뵒 + issueStatusId : $scope.vm.form.issueStatusId, // �씠�뒋 �긽�깭 �븘�씠�뵒 + + companyId : (function () { + var companyId = -1; + + if ($scope.vm.form.issueCompanyFields.length > 0) { + companyId = $scope.vm.form.issueCompanyFields[0].id; + } + + return companyId; + }), + + ispId : (function () { + var ispId = -1; + + if ($scope.vm.form.issueIspFields.length > 0) { + ispId = $scope.vm.form.issueIspFields[0].id; + } + + return ispId; + }), + + hostingId : (function () { + var hostingId = -1; + + if ($scope.vm.form.issueHostingFields.length > 0) { + hostingId = $scope.vm.form.issueHostingFields[0].id; + } + + return hostingId; + }), + + userIds : (function () { + var userIds = []; + + angular.forEach($scope.vm.form.users, function (user) { + userIds.push(user.id); + }); + + return userIds; + })(), + departmentIds : (function () { + var departmentIds = []; + + angular.forEach($scope.vm.form.departments, function (department) { + departmentIds.push(department.id); + }); + + return departmentIds; + })(), + + attachedFileIds : (function () { + var attachedFileIds = []; + + angular.forEach($scope.vm.form.attachedFiles, function (attachedFile) { + if ($scope.vm.form.description.indexOf(attachedFile.path) !== -1) { + attachedFileIds.push(attachedFile.id); + } + }); + + return attachedFileIds; + })(), + + issueCompanyFields : (function () { + var issueCompanyFields = []; + if ($scope.vm.form.issueCompanyFields != null && $scope.vm.form.issueCompanyFields.length > 0 ){ + var companyField = $scope.vm.form.issueCompanyFields[0]; + + issueCompanyFields.push({ + id : companyField.id, + companyId : $scope.vm.companyId, + name : $scope.vm.companyName, + manager : $scope.vm.companyManager, + tel : $scope.vm.companyTel, + email :$scope.vm.companyEmail, + memo : $scope.vm.companyMemo + }); + } + + return issueCompanyFields; + })(), + + issueIspFields : (function () { + var issueIspFields = []; + if ($scope.vm.form.issueIspFields != null && $scope.vm.form.issueIspFields.length > 0 ){ + var ispField = $scope.vm.form.issueIspFields[0]; + + issueIspFields.push({ + id : ispField.id, + ispId : $scope.vm.ispId, + code : $scope.vm.ispCode, + name : $scope.vm.ispName, + manager : $scope.vm.ispManager, + tel : $scope.vm.ispTel, + email :$scope.vm.ispEmail, + memo : $scope.vm.ispMemo + }); + + } + + return issueIspFields; + })(), + + issueHostingFields : (function () { + var issueHostingFields = []; + if ($scope.vm.form.issueHostingFields != null && $scope.vm.form.issueHostingFields.length > 0 ){ + + var hostingField = $scope.vm.form.issueHostingFields[0]; + + issueHostingFields.push({ + id : hostingField.id, + hostingId : $scope.vm.hostingId, + name : $scope.vm.hostingName, + code : $scope.vm.hostingCode, + manager : $scope.vm.hostingManager, + tel : $scope.vm.hostingTel, + email :$scope.vm.hostingEmail, + memo : $scope.vm.hostingMemo + }); + } + + return issueHostingFields; + })(), + + removeFiles : $scope.vm.form.removeFiles, + startCompleteDateRange : $scope.vm.form.startCompleteDateRange, + + issueCustomFields : (function () { // �씠�뒋�뿉�꽌 �궗�슜�릺�뒗 �궗�슜�옄 �젙�쓽 �븘�뱶 + var issueCustomFields = []; + + angular.forEach($scope.vm.form.issueCustomFields, function (issueCustomField) { + var useValues = []; + + if (angular.isArray(issueCustomField.useValues)) { + angular.forEach(issueCustomField.useValues, function (useValue) { + useValues.push(useValue.value); + }); + } + else { + useValues.push(issueCustomField.useValues); + } + + // useValues 瑜� 諛곗뿴濡� 蹂��솚�븳�떎. + var temp = angular.copy(issueCustomField); + temp.useValues = useValues; + issueCustomFields.push(temp); + }); + + return issueCustomFields; + })() + }; + + Issue.relAdd({ + method : "POST", + file : (function () { + var files = []; + + angular.forEach($scope.vm.form.files, function (file) { + if (angular.isUndefined(file.id)) { + files.push(file); + } + }); + + return files; + })(), + // data �냽�꽦�쑝濡� 蹂꾨룄�쓽 �뜲�씠�꽣 �쟾�넚 + fields : { + content : content + }, + fileFormDataName : "file" + }).then(function (result) { + + if (result.data.message.status === "success") { + $scope.fn.addRelationIssue(); + + $scope.fn.cancel(); + + // �씠�뒋 �긽�꽭 �솕硫� �슂泥� + $rootScope.$broadcast("getIssueDetail", { + id : parameter.id + }); + + $rootScope.$broadcast("getIssueList"); + } + else { + SweetAlert.error($filter("translate")("issue.failedIssueModify"), result.data.message.message); // �씠�뒋 �닔�젙 �떎�뙣 + } + + $rootScope.spinner = false; + }); + } + + // �뿰愿� �씠�뒋 異붽� + function addRelationIssue() { + /*if ($scope.vm.issueName.length == 0 || $scope.vm.form.issues.length == 0 + || $scope.vm.issueName != $scope.vm.form.issues[0].title) { + SweetAlert.error($filter("translate")("issue.errorSelectRelationIssue"), ""); + return; + }*/ + + var contents = { + relationIssueType : $scope.vm.form.issueTypeId, + // issueId : $rootScope.currentDetailIssueId, + issueId : parameter.id, + relationIssueId : $scope.vm.form.issues[0].id, + priorityName : $scope.vm.priorityName + }; + + IssueRelation.add($resourceProvider.getContent( + contents, + $resourceProvider.getPageContent(0, 10))).then(function (result) { + + if (result.data.message.status === "success") { + $scope.fn.getIssueDetail(); + } + else { + SweetAlert.error($filter("translate")("issue.failedToIssueAddIssueRelation"), result.data.message.message); // "�뿰愿��씪媛� �깮�꽦 �떎�뙣" + } + }); + } + + // �뙘�뾽 李� �떕湲� + function cancel() { + SweetAlert.close(); // �븣由� 李� �떕湲� + $rootScope.$broadcast("closeLayer"); // �뙘�뾽�씠 �뿴由ш퀬 �굹�꽌 js-multi, js-single �벑�뿉�꽌 body �씠踰ㅽ듃媛� �궇�븘媛��뒗 �쁽�긽 �닔�젙 + $uibModalInstance.dismiss('cancel'); + $(document).unbind("keydown"); // �떒異뺥궎 �씠踰ㅽ듃 �젣嫄� + } + + // �씠�뒋 �쑀�삎 紐⑸줉 + function getIssueTypes() { + var deferred = $q.defer(); + + IssueType.find($resourceProvider.getContent({}, + $resourceProvider.getPageContent(0, 1000))).then(function (result) { + + if (result.data.message.status === "success") { + $scope.vm.issueTypes = result.data.data; + } + else { + SweetAlert.swal($filter("translate")("issue.failedToIssueTypeListLookup"), result.data.message.message, "error"); // �씠�뒋 ���엯 紐⑸줉 議고쉶 �떎�뙣 + } + + deferred.resolve(result.data.data); + }); + + return deferred.promise; + } + + // �슦�꽑�닚�쐞 紐⑸줉 + function getPriorities() { + var deferred = $q.defer(); + + Priority.find($resourceProvider.getContent({}, + $resourceProvider.getPageContent(0, 1000))).then(function (result) { + + if (result.data.message.status === "success") { + $scope.vm.priorities = result.data.data; + } + else { + SweetAlert.swal($filter("translate")("issue.failedToPriorityListLookup"), result.data.message.message, "error"); // �슦�꽑�닚�쐞 紐⑸줉 議고쉶 �떎�뙣 + } + + deferred.resolve(result.data.data); + }); + + return deferred.promise; + } + + // 以묒슂�룄 紐⑸줉 + function getSeverities() { + var deferred = $q.defer(); + + Severity.find($resourceProvider.getContent({}, + $resourceProvider.getPageContent(0, 1000))).then(function (result) { + + if (result.data.message.status === "success") { + $scope.vm.severities = result.data.data; + } + else { + SweetAlert.swal($filter("translate")("issue.failedToCriticalListLookup"), result.data.message.message, "error"); // 以묒슂�룄 紐⑸줉 議고쉶 �떎�뙣 + } + + deferred.resolve(result.data.data); + }); + + return deferred.promise; + } + + // �씠�뒋 �쑀�삎�뿉 �뿰寃곕맂 �궗�슜�옄 �젙�쓽 �븘�뱶 + function getIssueTypeCustomFields() { + $scope.vm.form.issueCustomFields = []; + // �씠�뒋 ���엯 �븘�씠�뵒�굹 �봽濡쒖젥�듃 �븘�씠�뵒媛� �뾾�쑝硫� �넻�떊�쓣 �븯吏� �븡�뒗�떎. + if (!$rootScope.isDefined($scope.vm.form.issueTypeId) || $scope.vm.form.projects.length < 1) { + return; + } + // �씠�뒋 �쑀�삎 �뀥�뵆由� �쟻�슜�븯湲� + $scope.fn.setIssueTypeTemplate(); + + var deferred = $q.defer(); + + IssueTypeCustomField.find($resourceProvider.getContent({projectId : $scope.vm.form.projects[0].id, issueTypeId : $scope.vm.form.issueTypeId}, + $resourceProvider.getPageContent(0, 1000))).then(function (result) { + + if (result.data.message.status === "success") { + + $scope.vm.form.issueCustomFields = []; + angular.forEach(result.data.data, function (issueTypeCustomField) { + switch (issueTypeCustomField.customFieldVo.customFieldType) { + case "INPUT" : + case "NUMBER" : + case "DATETIME" : + case "IP_ADDRESS" : + case "EMAIL" : + case "SITE" : + case "TEL" : + issueTypeCustomField.useValues = issueTypeCustomField.customFieldVo.defaultValue; + break; + case "SINGLE_SELECT" : + issueTypeCustomField.useValues = issueTypeCustomField.customFieldVo.defaultValue.replace("#", ""); + break; + + case "MULTI_SELECT" : + issueTypeCustomField.useValues = []; + + angular.forEach(issueTypeCustomField.customFieldVo.defaultValue.split("#"), function (value) { + if ($rootScope.isDefined(value)) { + issueTypeCustomField.useValues.push({ + value : value + }); + } + }); + break; + } + + $scope.vm.form.issueCustomFields.push(issueTypeCustomField); + }); + } + else { + SweetAlert.swal($filter("translate")("issue.failedToUserDefinedFieldListAssociatedLookup"), result.data.message.message, "error"); // �씠�뒋 �쑀�삎�뿉 �뿰寃곕맂 �궗�슜�옄 �젙�쓽 �븘�뱶 紐⑸줉 議고쉶 �떎�뙣 + } + + deferred.resolve(result.data.data); + }); + + return deferred.promise; + } + + // �씠�뒋 ���엯�뿉 �엳�뒗 �뀥�뵆由우쓣 �쟻�슜�븳�떎. + function setIssueTypeTemplate() { + for (var count in $scope.vm.issueTypes) { + var issueType = $scope.vm.issueTypes[count]; + + if ($scope.vm.form.issueTypeId === String(issueType.id)) { + // �뀥�뵆由우씠 �옉�꽦�릺�뼱 �엳�뒗吏� �솗�씤 + if ($rootScope.isDefined(issueType.description)) { + // �씠�뒋 �궡�슜�씠 �옉�꽦�릺�뼱 �엳吏� �븡�쑝硫� 諛붾줈 �뀥�뵆由� �쟻�슜 + if (!$rootScope.isDefined($scope.vm.form.description)) { + $scope.vm.form.description = issueType.description; + } + else { + // �씠誘� �궡�슜�씠 �옉�꽦�릺�뼱 �엳�쑝硫� �솗�씤 �썑 �쟻�슜 + SweetAlert.swal({ + title : $filter("translate")("issue.applyTemplate"), // �뀥�뵆由� �쟻�슜�븯湲� + text : $filter("translate")("issue.issueContentIsWrittenApplyTheTemplate"), // �씠�뒋 �궡�슜�씠 �옉�꽦�릺�뼱 �엳�뒿�땲�떎. �뀥�뵆由우쓣 �쟻�슜�븯寃좎뒿�땲源�? �뀥�뵆由우씠 �쟻�슜�릺硫� �씠誘� �옉�꽦�맂 �궡�슜�씠 �궗�씪吏묐땲�떎. + type : "warning", + showCancelButton : true, + confirmButtonColor : "#DD6B55", + confirmButtonText : $filter("translate")("issue.applyTemplate"), // �뀥�뵆由� �쟻�슜�븯湲� + cancelButtonText : $filter("translate")("common.cancel"), // 痍⑥냼 + closeOnConfirm : false, + closeOnCancel : true + }, + function (isConfirm) { + SweetAlert.close(); + + if (isConfirm) { + $scope.vm.form.description = issueType.description; + } + }); + } + } + + break; + } + } + } + + function getPartners() { + if($scope.vm.form.issueTypeId === ""){ + $scope.vm.form.issueTypeId = $rootScope.issueTypeMenu.id + } + var content = { + issueTypeId : $scope.vm.form.issueTypeId, + }; + Issue.findPartners($resourceProvider.getContent( + content, + $resourceProvider.getPageContent(0, 1))).then(function (result) { + if (result.data.message.status === "success") { + $scope.vm.partnerVos = result.data.data; + } + }); + + } + + // 理쒖큹 �떎�뻾 + function startExecute() { + + var promises = { + getIssueTypes : $scope.fn.getIssueTypes(), + getPriorities : $scope.fn.getPriorities(), + getSeverities : $scope.fn.getSeverities(), + getPartners : $scope.fn.getPartners() + }; + $q.all(promises).then(function (results) { + // �쁽�옱 �봽濡쒖젥�듃 �꽕�젙 + if ($rootScope.workProject != null && $rootScope.workProject.id > -1) { + $scope.vm.projectName = $rootScope.workProject.name; + $scope.vm.form.projects = []; + $scope.vm.form.projects.push($rootScope.workProject); + } + // �쁽�옱 �씠�뒋���엯 �쑀�삎 �꽕�젙 + var id = $rootScope.getCurrentIssueTypeId(); + if (id != null) { + $scope.vm.form.issueTypeId = id.toString(); + } + $log.debug("promises 寃곌낵 ", results); + }); + } + + $scope.fn.startExecute(); + }]); + }); \ No newline at end of file diff --git a/src/main/webapp/scripts/app/issue/issueDetail.controller.js b/src/main/webapp/scripts/app/issue/issueDetail.controller.js index 645ff08..d3dda22 100644 --- a/src/main/webapp/scripts/app/issue/issueDetail.controller.js +++ b/src/main/webapp/scripts/app/issue/issueDetail.controller.js @@ -763,6 +763,7 @@ }); } + // �븯�쐞 �씠�뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 function addDownIssueTableConfig() { $uibModal.open({ diff --git a/src/main/webapp/scripts/app/issue/issueList.controller.js b/src/main/webapp/scripts/app/issue/issueList.controller.js index d681782..daf60ba 100644 --- a/src/main/webapp/scripts/app/issue/issueList.controller.js +++ b/src/main/webapp/scripts/app/issue/issueList.controller.js @@ -22,6 +22,7 @@ setTableColumn : setTableColumn, // �뀒�씠釉붿쓽 而щ읆�쓣 留뚮뱾�뼱以��떎. add : add, // �씠�뒋 �깮�꽦 modify : modify, // �씠�뒋 �닔�젙 + AddRelation : AddRelation, // �뿰愿� �씠�뒋 異붽� modifyMultiIssueStatus : modifyMultiIssueStatus, // �씠�뒋 �떎以� �긽�깭 蹂�寃� removes : removes, // �씠�뒋 �궘�젣 addIssueTableConfig : addIssueTableConfig, // �씠�뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 @@ -644,6 +645,22 @@ }); } + function AddRelation(id) { + $uibModal.open({ + templateUrl : 'views/issue/issueAddRelation.html', + size : "lg", + controller : 'issueAddRelationController', + backdrop : 'static', + resolve : { + parameter : function () { + return { + id : id, + }; + } + } + }); + } + // �씠�뒋 �궘�젣 function removes() { var removeIds = []; diff --git a/src/main/webapp/scripts/app/issue/issueModify.controller.js b/src/main/webapp/scripts/app/issue/issueModify.controller.js index 3b27aa5..b0c06ab 100644 --- a/src/main/webapp/scripts/app/issue/issueModify.controller.js +++ b/src/main/webapp/scripts/app/issue/issueModify.controller.js @@ -72,7 +72,6 @@ departmentName : "", // 遺��꽌紐� 寃��깋 companyId : -1, companyName : "", // �뾽泥대챸 寃��깋 - companyCode : "", // �뾽泥� 肄붾뱶 companyManager : "", // �뾽泥� �떞�떦�옄 companyTel : "", // �뾽泥� �쟾�솕踰덊샇 companyEmail : "", // �뾽泥� �씠硫붿씪 @@ -87,6 +86,7 @@ hostingId : -1, hostingName : "", // �샇�뒪�똿紐� 寃��깋 hostingManager : "", // �샇�뒪�똿 �떞�떦�옄 + hostingCode : "", // �샇�뒪�똿 肄붾뱶 hostingTel : "", // �샇�뒪�똿 �쟾�솕踰덊샇 hostingEmail : "", // �샇�뒪�똿 �씠硫붿씪 hostingMemo : "", // �샇�뒪�똿 鍮꾧퀬 diff --git a/src/main/webapp/scripts/components/issue/issue.service.js b/src/main/webapp/scripts/components/issue/issue.service.js index 577afd5..d606b2b 100644 --- a/src/main/webapp/scripts/components/issue/issue.service.js +++ b/src/main/webapp/scripts/components/issue/issue.service.js @@ -50,6 +50,18 @@ return response; }); }, + + relAdd : function (conditions) { + conditions.url = "issue/relIssueAdd"; + return $upload.upload(conditions).progress(function (evt) { + // �뙆�씪 �뾽濡쒕뱶 吏꾪뻾�쑉�쓣 �몴�떆�빐以��떎. + fileUploadProgress(evt); + + }).then(function (response) { + $log.debug("�씠�뒋 �깮�꽦 寃곌낵 : ", response); + return response; + }); + }, modifyParentIssue : function (conditions) { return $http.post("issue/modifyParentIssue", conditions).then(function (response) { $log.debug("�긽�쐞 �씪媛� �닔�젙 寃곌낵 : ", response); @@ -67,6 +79,7 @@ return response; }); }, + detail : function (conditions) { return $http.post("issue/detail", conditions).then(function (response) { $log.debug("�씠�뒋 �긽�꽭 �뜲�씠�꽣 : ", response); diff --git a/src/main/webapp/scripts/main.js b/src/main/webapp/scripts/main.js index 23c6296..0757943 100644 --- a/src/main/webapp/scripts/main.js +++ b/src/main/webapp/scripts/main.js @@ -177,6 +177,7 @@ /* �씠�뒋 */ 'issueRoute' : 'app/issue/issue', // �씠�뒋�뿉 愿��젴�맂 route �젙蹂� 'issueAddController' : 'app/issue/issueAdd.controller', // �씠�뒋 �깮�꽦 而⑦듃濡ㅻ윭 + 'issueAddRelationController' : 'app/issue/issueAddRelation.controller', // �씠�뒋 �깮�꽦 而⑦듃濡ㅻ윭 'issueModifyController' : 'app/issue/issueModify.controller', // �씠�뒋 �닔�젙 而⑦듃濡ㅻ윭 'issueDetailController' : 'app/issue/issueDetail.controller', // �씠�뒋 �긽�꽭 而⑦듃濡ㅻ윭 'issueListController' : 'app/issue/issueList.controller', // �씠�뒋 紐⑸줉 而⑦듃濡ㅻ윭 @@ -497,6 +498,7 @@ 'autoCompleteController', 'userInviteController', 'issueAddController', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 + 'issueAddRelationController', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 'issueService', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 'issueTypeService', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 'priorityService', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 diff --git a/src/main/webapp/views/issue/issueAddRelation.html b/src/main/webapp/views/issue/issueAddRelation.html new file mode 100644 index 0000000..6b0e512 --- /dev/null +++ b/src/main/webapp/views/issue/issueAddRelation.html @@ -0,0 +1,656 @@ +<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="issueAddForm"> + <div class="form-group mb10"> + <label for="issueAddForm1" class="issue-label"><span translate="issue.issueTitle">�씠�뒋 �젣紐�</span> <code + class="highlighter-rouge">*</code></label> + <input id="issueAddForm1" + class="form-control input-sm" + ng-model="vm.form.title" + name="title" + required + kr-input + maxlength="300" + autocomplete="off" + autofocus + owl-auto-focus> + <small class="help-block form-text text-danger" + ng-if="issueAddForm.title.$touched && issueAddForm.title.$error.required" + translate="issue.requireIssueTitle">�씠�뒋 �젣紐⑹쓣 �엯�젰�븯�꽭�슂. + </small> + </div> + <div class="row"> + <div class="col-lg-4"> + <div class="form-group mb10"> + <label class="issue-label"> <span translate="common.project">�봽濡쒖젥�듃</span> <code + class="highlighter-rouge">*</code></label> + <js-autocomplete-single data-input-name="project" + selected-model="vm.form.projects" + search="vm.projectName" + source="fn.getProjectList(vm.projectName, vm.form.projects, vm.autoCompletePage.project.page, fn.getProjectListCallBack)" + page="vm.autoCompletePage.project.page" + total-page="vm.autoCompletePage.project.totalPage" + translation-texts="{ empty : 'common.emptyProject' }" + extra-settings="{ displayProp : 'name' , idProp : 'id', imageable : false, imagePathProp : '', + type : '', maxlength : 200, autoResize : false, stopRemoveBodyEvent : true }"></js-autocomplete-single> + </div> + </div> + + <div class="col-lg-8 bdl1"> + <div class="row"> + <div class="col-md-4"> + <div class="form-group mb10"> + <label for="issueAddForm4" class="issue-label"> <span + translate="issue.issueType">�씠�뒋 ���엯</span> + <code class="highlighter-rouge">*</code></label> + <select id="issueAddForm4" + name="issueType" + class="form-control input-sm issue-select-label" + ng-model="vm.form.issueTypeId" + ng-change="fn.getIssueTypeCustomFields()" + ng-style="{ 'color' : fn.getOptionColor(vm.issueTypes, vm.form.issueTypeId) }" + required> + <option value="" translate="common.selectTarget" ng-style="{ 'color' : '#353535' }"><span + translate="common.selectTarget">���긽 �꽑�깮</span> + </option> + <option ng-repeat="issueType in vm.issueTypes" + ng-style="{ 'color' : issueType.color, 'font-weight': 600 }" + value="{{issueType.id}}">�뿈 {{issueType.name}} + </option> + </select> + </div> + </div> + <div class="col-md-4"> + <div class="form-group mb10"> + <label for="issueAddForm2" class="issue-label"> + <span translate="common.priority">�슦�꽑 �닚�쐞</span> + <code class="highlighter-rouge">*</code> + </label> + <select id="issueAddForm2" + name="priority" + class="form-control input-sm issue-select-label" + ng-model="vm.form.priorityId" + ng-style="{ 'color' : fn.getOptionColor(vm.priorities, vm.form.priorityId) }" + required> + <option value="" translate="common.selectTarget" ng-style="{ 'color' : '#353535' }"> + <span translate="common.selectTarget">���긽 �꽑�깮</span> + </option> + <option ng-repeat="priority in vm.priorities" + ng-style="{ 'color' : priority.color, 'font-weight': 600 }" + value="{{priority.id}}" + translate="{{priority.name}}"> + </option> + </select> + </div> + </div> + <div class="col-md-4"> + <div class="form-group mb10"> + <label for="issueAddForm3" class="issue-label"> <span + translate="common.importance">以묒슂�룄</span> <code + class="highlighter-rouge">*</code></label> + <select id="issueAddForm3" + name="severity" + class="form-control input-sm issue-select-label" + ng-model="vm.form.severityId" + ng-style="{ 'color' : fn.getOptionColor(vm.severities, vm.form.severityId) }" + required> + <option value="" translate="common.selectTarget" ng-style="{ color : '#353535' }"> + <span translate="common.selectTarget">���긽 �꽑�깮</span> + </option> + <option ng-repeat="severity in vm.severities" + ng-style="{ color : severity.color, 'font-weight': 600 }" + value="{{severity.id}}" + translate="{{severity.name}}"> + </option> + </select> + </div> + </div> + </div> + </div> + </div> + <hr> + <div class="row"> + <div class="col-lg-4"> + <div class="form-group mb10"> + <label class="issue-label"> <span translate="common.assigneeTeam">�떞�떦遺��꽌</span> </label> + <js-autocomplete-multi data-input-name="departments" + selected-model="vm.form.departments" + search="vm.departmentName" + source="fn.getIssueDepartmentList(vm.departmentName, vm.form.departments)" + input-disabled="false" + translation-texts="{ count : 'common.userNum', empty : 'common.emptyProjectDepartment'}" + extra-settings="{ displayProp : 'byName' , idProp : 'id', imageable : false, maxlength : 100, autoResize : true}"></js-autocomplete-multi> + + <div class="select3-selection__choicediv mt-10"> + <span class="select3-selection__choice" ng-repeat="department in vm.form.departments"> + <span>{{department.byName}}</span> + <span class="select3-selection__choice__remove" ng-click="fn.removeDepartment($index)">횞</span> + </span> + </div> + </div> + </div> + + <div class="col-lg-4"> + <div class="form-group mb10"> + <label for="issueAddForm5" class="issue-label"> <span translate="common.period">湲곌컙</span></label> + <input id="issueAddForm5" + tabindex="-1" + type="text" + readonly + class="form-control cursor" + placeholder="{{'issue.clickToSelectDate' | translate}}" + ng-model="vm.form.startCompleteDateRange" + modal-form-auto-scroll + date-format="YYYY-MM-DD" + parent-el="'#createdWidget'" + date-range-picker> + <div class="row"> + <div class="col-xs-12"> + <div id="createdWidget" class="bootstrap-datepicker"></div> + </div> + </div> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label class="issue-label"><span translate="common.attachFiles">�뙆�씪 泥⑤�</span></label> + <div class="filebox input-group"> + <input class="upload-name form-control" + placeholder="{{'users.pleaseSelectFile' | translate}}" + tabindex="-1" + disabled="disabled"> + <label for="uploadFileField"><span + translate="common.selectFile">�뙆�씪�꽑�깮</span></label> + <input id="uploadFileField" + tabindex="-1" + type="file" + class="form-control" + multiple + ng-file-select="fn.onFileSelect($files)"> + </div> + + <div class="select2-selection__choicediv"> + <div class="select2-selection__choice2" ng-repeat="file in vm.form.files"> + <div class="select2-selection__choice2__remove" ng-click="fn.removeUploadFile($index)"> + 횞 + </div> + <div class="ssg-items ssg-items-blocks"> + <div class="ssg-item"> + <div class="item-icon"> + <!-- 臾몄꽌 --> + <i class="os-icon os-icon-file-text" ng-if="file.fileType == 'DOC'"></i> + <!-- 誘몃뵒�뼱 --> + <i class="os-icon os-icon-film" ng-if="file.fileType == 'MEDIA'"></i> + <!-- �씠誘몄�(�뾽濡쒕뱶 �쟾) --> + <i class="os-icon os-icon-documents-07" + ng-if="file.fileType == 'IMAGE'"></i> + <!-- 湲고� --> + <i class="os-icon os-icon-ui-51" ng-if="file.fileType == 'ETC'"></i> + </div> + <div class="item-name"> + <small>{{file.name}}</small> + </div> + <div class="item-amount"> + ({{file.size/1024/1024 | number:2}} MB) + </div> + </div> + </div> + </div> + </div> + </div> + </div> + </div> + <hr> + <div class="row"> + <div class="col-lg-4 fontcolor_green"> + <label class="issue-label"><span class="fontcolor_green" translate="common.detectingInfo">�깘吏��젙蹂�</span></label> + </div> + </div> + + <div class="col-lg-8"> + <div class="row"> + <div class="col-md-12"> + <div class="form-group mgb5" ng-show="vm.form.issueCustomFields.length < 1"> + <label class="issue-label" translate="issue.notIssueTypeCustomFields">�씠�뒋 ���엯�뿉 �뿰寃곕맂 �궗�슜�옄 �젙�쓽 + �븘�뱶媛� �뾾�뒿�땲�떎.</label> + </div> + </div> + + <div class="col-md-6" ng-repeat="issueCustomField in vm.form.issueCustomFields"> + <div class="form-group mgb5"> + <label class="issue-label">{{issueCustomField.customFieldVo.name}}</label> + + <div ng-switch on="issueCustomField.customFieldVo.customFieldType"> + <!-- 湲곕낯 �엯�젰 --> + <div ng-switch-when="INPUT"> + <input type="text" class="form-control input-sm" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01'"> + </div> + + <div ng-switch-when="NUMBER"> + <input type="text" class="form-control input-sm" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01'"> + </div> + + <div ng-switch-when="DATETIME"> + <input type="text" class="form-control input-sm" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01'"> + </div> + + <div ng-switch-when="IP_ADDRESS"> + <input type="text" class="form-control input-sm" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01'"> + </div> + + <div ng-switch-when="SITE"> + <input type="text" class="form-control input-sm" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01'"> + </div> + + <div ng-switch-when="TEL"> + <input type="text" class="form-control input-sm" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01'"> + </div> + + <!-- �떒�씪 ���젆�듃 --> + <div ng-switch-when="SINGLE_SELECT"> + <select class="form-control input-sm issue-select-label" + ng-required="issueCustomField.fieldOption == '01'" + ng-model="issueCustomField.useValues"> + <option value="" value="" translate="common.choose">�꽑�깮�븯�꽭�슂.</option> + <option ng-repeat="customFieldValueVo in issueCustomField.customFieldVo.customFieldValueVos" + value="{{customFieldValueVo.value}}" + ng-selected="$root.selectOption(issueCustomField.useValues, customFieldValueVo.value)"> + {{customFieldValueVo.value}} + </option> + </select> + </div> + + <!-- 硫��떚 ���젆�듃 --> + <div ng-switch-when="MULTI_SELECT"> + <ng-dropdown-multiselect class="multiSelect cursor" + data-input-name="" + modal-form-auto-scroll + selected-model="issueCustomField.useValues" + extra-settings="{ 'idProp' : 'value', 'externalIdProp' : 'value', 'displayProp' : 'value', 'stringTypeOption' : 'true', stopRemoveBodyEvent : true }" + options="issueCustomField.customFieldVo.customFieldValueVos"></ng-dropdown-multiselect> + </div> + </div> + </div> + </div> + </div> + </div> + <hr> + <div ng-show="fn.containsPartner('�뾽泥�')" class="row"> + <div class="col-lg-8 fontcolor_green"> + <label class="issue-label"><span class="fontcolor_green" translate="companyField.info">�뾽泥댁젙蹂�</span> + <span class="select3-selection__choice" style="position: relative; bottom: 2px;"><code class="highlighter-rouge">*</code> �뾽泥� �씠由� �겢由��떆 �꽑�깮�맂 �씠由꾩쓽 �뾽泥� �젙蹂닿� 議고쉶�맗�땲�떎.</span> + </label> + </div> + </div> + + <div ng-show="fn.containsPartner('�뾽泥�')" class="row"> + <div class="col-lg-4"> + <div class="form-group mb10"> + <label class="issue-label"> <span translate="companyField.name">�뾽泥댁씠由�</span> </label> + <js-autocomplete-single data-input-name="issueCompanyField" + selected-model="vm.form.issueCompanyFields" + search="vm.companyName" + source="fn.getIssueCompanyFieldList(vm.companyName, vm.form.issueCompanyFields, vm.autoCompletePage.companyField.page, fn.getIssueCompanyFieldListCallBack)" + page="vm.autoCompletePage.companyField.page" + total-page="vm.autoCompletePage.companyField.totalPage" + input-disabled="false" + translation-texts="{ empty : 'common.emptyCompany' }" + broad-cast="companyFieldEvent" + extra-settings="{ displayProp : 'name' , idProp : 'id', imageable : false, imagePathProp : '', + type : '', maxlength : 200, autoResize : false, stopRemoveBodyEvent : true }"></js-autocomplete-single> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mb10"> + <label for="companyFieldManagerAddForm" class="issue-label"><span translate="companyField.manager">�떞�떦�옄</span></label> + <input id="companyFieldManagerAddForm" + name="companyManager" + 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.companyManager" + ng-maxlength="100" + maxlength="100" + > + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label for="companyFieldTelAddForm" class="issue-label"><span translate="companyField.tel">�쟾�솕踰덊샇</span></label> + <input id="companyFieldTelAddForm" + name="companyTel" + type="text" + class="form-control" + kr-input + ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/" + autocomplete="off" + ng-model="vm.companyTel" + maxlength="20"> + <div ng-show="issueAddForm.companyTel.$error.pattern" class="help-block form-text text-danger" + translate="companyField.invalidTelFormat">�쟾�솕踰덊샇 �삎�떇�씠 留욎� �븡�뒿�땲�떎. xxx-xxx-xxxx �삎�떇�쑝濡� �엯�젰�븯�꽭�슂. + </div> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label for="companyFieldEmailAddForm" class="issue-label"><span translate="companyField.email">�씠硫붿씪</span></label> + <input id="companyFieldEmailAddForm" + name="companyEmail" + type="email" + class="form-control" + autocomplete="off" + maxLength="50" + ng-model="vm.companyEmail" + kr-input + ng-pattern="/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/"> + <div ng-show="issueAddForm.companyEmail.$error.pattern" class="help-block form-text text-danger" + translate="users.invalidEmailFormat">�씠硫붿씪 �삎�떇�씠 留욎� �븡�뒿�땲�떎. + </div> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label for="companyFieldDescAddForm" class="issue-label"><span translate="companyField.memo">鍮꾧퀬</span></label> + <input id="companyFieldDescAddForm" + name="companyMemo" + type="text" + class="form-control" + kr-input + autocomplete="off" + ng-maxlength="200" + ng-model="vm.companyMemo" + maxlength="200"> + </div> + </div> + </div> + <p></p> + <div ng-show="fn.containsPartner('ISP')" class="row"> + <div class="col-lg-8 fontcolor_green"> + <label class="issue-label"><span class="fontcolor_green" translate="ispField.info">ISP �젙蹂�</span> + <span class="select3-selection__choice" style="position: relative; bottom: 2px;"><code class="highlighter-rouge">*</code> ISP �씠由� �겢由��떆 �꽑�깮�맂 �씠由꾩쓽 ISP �젙蹂닿� 議고쉶�맗�땲�떎.</span> + </label> + </div> + </div> + + <div ng-show="fn.containsPartner('ISP')" class="row"> + <div class="col-lg-4"> + <div class="form-group mb10"> + <label class="issue-label"> <span translate="ispField.name">ISP �씠由�</span> </label> + <js-autocomplete-single data-input-name="ispField" + selected-model="vm.form.issueIspFields" + search="vm.ispName" + source="fn.getIssueIspFieldList(vm.ispName, vm.form.issueIspFields, vm.autoCompletePage.ispField.page, fn.getIssueIspFieldListCallBack)" + page="vm.autoCompletePage.ispField.page" + total-page="vm.autoCompletePage.ispField.totalPage" + input-disabled="false" + translation-texts="{ empty : 'common.emptyIsp' }" + broad-cast="ispFieldEvent" + extra-settings="{ displayProp : 'name' , idProp : 'id', imageable : false, imagePathProp : '', + type : '', maxlength : 200, autoResize : false, stopRemoveBodyEvent : true }"></js-autocomplete-single> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mb10"> + <label for="ispFieldCodeAddForm" class="issue-label"><span translate="ispField.code">肄붾뱶</span></label> + <input id="ispFieldCodeAddForm" + name="ispCode" + type="text" + class="form-control" + kr-input + input-regex="[^a-zA-Z0-9 媛�-�옡�꽦-�뀕�뀖-�뀭\u318D\u119E\u11A2\u2022\u2025a\u00B7\uFE55]" + autocomplete="off" + ng-model="vm.ispCode" + ng-maxlength="100" + maxlength="100"> + </div> + </div> + + <div class="col-lg-4"> + <div class="form-group mb10"> + <label for="ispFieldManagerAddForm" class="issue-label"><span translate="ispField.manager">�떞�떦�옄</span></label> + <input id="ispFieldManagerAddForm" + name="ispManager" + type="text" + class="form-control" + kr-input + input-regex="[^a-zA-Z0-9 媛�-�옡�꽦-�뀕�뀖-�뀭\u318D\u119E\u11A2\u2022\u2025a\u00B7\uFE55]" + autocomplete="off" + ng-model="vm.ispManager" + ng-maxlength="100" + maxlength="100"> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label for="ispFieldTelAddForm" class="issue-label"><span translate="ispField.tel">�쟾�솕踰덊샇</span></label> + <input id="ispFieldTelAddForm" + name="ispTel" + type="text" + class="form-control" + kr-input + ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/" + autocomplete="off" + ng-model="vm.ispTel" + maxlength="20"> + <div ng-show="issueAddForm.ispTel.$error.pattern" class="help-block form-text text-danger" + translate="companyField.invalidTelFormat">�쟾�솕踰덊샇 �삎�떇�씠 留욎� �븡�뒿�땲�떎. xxx-xxx-xxxx �삎�떇�쑝濡� �엯�젰�븯�꽭�슂. + </div> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label for="ispFieldEmailAddForm" class="issue-label"><span translate="ispField.email">�씠硫붿씪</span></label> + <input id="ispFieldEmailAddForm" + name="ispEmail" + type="email" + class="form-control" + autocomplete="off" + maxLength="50" + ng-model="vm.ispEmail" + kr-input + ng-pattern="/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/"> + <div ng-show="issueAddForm.ispEmail.$error.pattern" class="help-block form-text text-danger" + translate="users.invalidEmailFormat">�씠硫붿씪 �삎�떇�씠 留욎� �븡�뒿�땲�떎. + </div> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label for="ispFieldDescAddForm" class="issue-label"><span translate="ispField.memo">鍮꾧퀬</span></label> + <input id="ispFieldDescAddForm" + name="ispMemo" + type="text" + class="form-control" + kr-input + autocomplete="off" + ng-model="vm.ispMemo" + ng-maxlength="200" + maxlength="200"> + </div> + </div> + </div> + <p></p> + <div ng-show="fn.containsPartner('�샇�뒪�똿')" class="row"> + <div class="col-lg-8 fontcolor_green"> + <label class="issue-label"><span class="fontcolor_green" translate="hostingField.info">�샇�뒪�똿 �젙蹂�</span> + <span class="select3-selection__choice" style="position: relative; bottom: 2px;"><code class="highlighter-rouge">*</code> �샇�뒪�똿 �씠由� �겢由��떆 �꽑�깮�맂 �씠由꾩쓽 �샇�뒪�똿 �젙蹂닿� 議고쉶�맗�땲�떎.</span> + </label> + </div> + </div> + + <div ng-show="fn.containsPartner('�샇�뒪�똿')" class="row"> + <div class="col-lg-4"> + <div class="form-group mb10"> + <label class="issue-label"> <span translate="hostingField.name">�샇�뒪�똿 �씠由�</span> </label> + <js-autocomplete-single data-input-name="hostingField" + selected-model="vm.form.issueHostingFields" + search="vm.hostingName" + source="fn.getIssueHostingFieldList(vm.hostingName, vm.form.issueHostingFields, vm.autoCompletePage.hostingField.page, fn.getIssueHostingFieldListCallBack)" + page="vm.autoCompletePage.hostingField.page" + total-page="vm.autoCompletePage.hostingField.totalPage" + input-disabled="false" + translation-texts="{ empty : 'common.emptyHosting' }" + broad-cast="hostingFieldEvent" + extra-settings="{ displayProp : 'name' , idProp : 'id', imageable : false, imagePathProp : '', + type : '', maxlength : 200, autoResize : false, stopRemoveBodyEvent : true }"></js-autocomplete-single> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mb10"> + <label for="hostingCodeManagerAdd" class="issue-label"><span translate="hostingField.code">�떞�떦�옄</span></label> + <input id="hostingCodeManagerAdd" + name="hostingCode" + type="text" + class="form-control" + kr-input + input-regex="[^a-zA-Z0-9 媛�-�옡�꽦-�뀕�뀖-�뀭\u318D\u119E\u11A2\u2022\u2025a\u00B7\uFE55]" + autocomplete="off" + ng-model="vm.hostingCode" + ng-maxlength="100" + maxlength="100"> + </div> + </div> + + <div class="col-lg-4"> + <div class="form-group mb10"> + <label for="hostingFieldManagerAdd" class="issue-label"><span translate="hostingField.manager">�떞�떦�옄</span></label> + <input id="hostingFieldManagerAdd" + name="hostingManager" + type="text" + class="form-control" + kr-input + input-regex="[^a-zA-Z0-9 媛�-�옡�꽦-�뀕�뀖-�뀭\u318D\u119E\u11A2\u2022\u2025a\u00B7\uFE55]" + autocomplete="off" + ng-model="vm.hostingManager" + ng-maxlength="100" + maxlength="100"> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label for="hostingFieldTelAdd" class="issue-label"><span translate="hostingField.tel">�쟾�솕踰덊샇</span></label> + <input id="hostingFieldTelAdd" + name="hostingTel" + type="text" + class="form-control" + kr-input + ng-pattern="/^\d{2,3}-\d{3,4}-\d{4}$/" + autocomplete="off" + ng-model="vm.hostingTel" + maxlength="20"> + <div ng-show="issueAddForm.hostingTel.$error.pattern" class="help-block form-text text-danger" + translate="companyField.invalidTelFormat">�쟾�솕踰덊샇 �삎�떇�씠 留욎� �븡�뒿�땲�떎. xxx-xxx-xxxx �삎�떇�쑝濡� �엯�젰�븯�꽭�슂. + </div> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label for="hostingFieldEmailAdd" class="issue-label"><span translate="hostingField.email">�씠硫붿씪</span></label> + <input id="hostingFieldEmailAdd" + name="hostingEmail" + type="email" + class="form-control" + autocomplete="off" + maxLength="50" + ng-model="vm.hostingEmail" + kr-input + ng-pattern="/^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/"> + <div ng-show="issueAddForm.hostingEmail.$error.pattern" class="help-block form-text text-danger" + translate="users.invalidEmailFormat">�씠硫붿씪 �삎�떇�씠 留욎� �븡�뒿�땲�떎. + </div> + </div> + </div> + <div class="col-lg-4"> + <div class="form-group mgb5"> + <label for="hostingFieldDescAdd" class="issue-label"><span translate="hostingField.memo">鍮꾧퀬</span></label> + <input id="hostingFieldDescAdd" + name="hostingMemo" + type="text" + class="form-control" + kr-input + autocomplete="off" + ng-model="vm.hostingMemo" + ng-maxlength="200" + maxlength="200"> + </div> + </div> + </div> + </form> + <hr> + <div class="form-group mb10"> + <label class="issue-label"><span translate="common.content">�궡�슜</span></label> + <summernote + class="summernote" + lang="ko-KR" + summer-note-auto-focus + ng-model="vm.form.description" + data-editor="vm.summerNote.editor" + data-editable="vm.summerNote.editable" + on-image-upload="fn.imageUpload(files)" + target=".note-editable"></summernote> + </div> + </div> +</div> + + +<div class="modal-footer buttons-on-right"> + <div class="pull-left"> + <label> + <input class="form-control issue-continue-checkbox pull-left" type="checkbox" ng-model="vm.infiniteAdd" + tabindex="-1"> + <span translate="issue.continueCreateIssue">�씠 �솕硫댁뿉�꽌 �씠�뒋瑜� 怨꾩냽 �깮�꽦�빀�땲�떎.</span> + </label> + </div> + <button type="button" class="btn btn-md btn-grey" ng-click="fn.cancel()" tabindex="-1"><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(issueAddForm.$invalid) || $root.spinner) ? null : fn.formSubmit()" + ng-disabled="fn.formCheck(issueAddForm.$invalid)" + ng-click="fn.formSubmit()"><span translate="common.save">���옣</span> + </button> +</div> + + diff --git a/src/main/webapp/views/issue/issueDetail.html b/src/main/webapp/views/issue/issueDetail.html index 40df672..4d57762 100644 --- a/src/main/webapp/views/issue/issueDetail.html +++ b/src/main/webapp/views/issue/issueDetail.html @@ -496,6 +496,10 @@ <button type="button" class="btn btn-primary form-control input-sm" ng-click="fn.addRelationIssue()" translate="issue.addRelationIssue">�뿰愿� �씠�뒋 異붽�</button> + + <button type="button" class="btn btn-primary form-control input-sm" + ng-click="fn.AddRelation(vm.viewer.id)" + >�뿰愿� 異붽�</button> </div> </div> -- Gitblit v1.8.0