From c03a3b2ed3a371aea080429a4e3c73aa4144120e Mon Sep 17 00:00:00 2001 From: 이민희 <mhlee@maprex.co.kr> Date: 목, 16 12월 2021 11:07:55 +0900 Subject: [PATCH] - 하위이슈 직접 추가하는 기능 - 이슈 추가 시 ISP,호스팅 정보 추가 안되는 문제 해 --- src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java | 85 ++ src/main/webapp/scripts/app/issue/issue.js | 2 src/main/webapp/scripts/components/issue/issue.service.js | 12 src/main/webapp/scripts/app/issue/issueAddDown.controller.js | 919 ++++++++++++++++++++++++++++ src/main/webapp/scripts/app/issue/issueAdd.controller.js | 62 + src/main/webapp/scripts/app/issue/issueModify.controller.js | 2 src/main/webapp/views/issue/issueAddDown.html | 767 +++++++++++++++++++++++ src/main/webapp/scripts/app/issue/issueAddRelation.controller.js | 2 src/main/java/kr/wisestone/owl/service/IssueService.java | 4 src/main/webapp/scripts/app/issue/issueList.controller.js | 17 src/main/java/kr/wisestone/owl/web/controller/IssueController.java | 15 src/main/webapp/views/issue/issueDetail.html | 5 src/main/webapp/scripts/main.js | 6 13 files changed, 1,868 insertions(+), 30 deletions(-) diff --git a/src/main/java/kr/wisestone/owl/service/IssueService.java b/src/main/java/kr/wisestone/owl/service/IssueService.java index 9d252a4..8bc8349 100644 --- a/src/main/java/kr/wisestone/owl/service/IssueService.java +++ b/src/main/java/kr/wisestone/owl/service/IssueService.java @@ -30,8 +30,12 @@ Issue addRelIssue(IssueForm issueForm, List<MultipartFile> files); + Issue addDownIssue(IssueForm issueForm, List<MultipartFile> files); + Issue addRelIssue(User user, IssueForm issueForm, List<MultipartFile> multipartFiles); + Issue addDownIssue(User user, IssueForm issueForm, List<MultipartFile> multipartFiles); + List<Issue> addApiIssue(IssueApiForm issueApiForm) throws CloneNotSupportedException; List<Issue> modifyIssue(IssueApiForm issueApiForm, List<MultipartFile> files); diff --git a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java index ac72bf9..61764f3 100644 --- a/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java +++ b/src/main/java/kr/wisestone/owl/service/impl/IssueServiceImpl.java @@ -523,6 +523,91 @@ return addRelIssue(user, issueForm, multipartFiles); } + // �븯�쐞�씠�뒋瑜� �깮�꽦�븳�떎. + @Override + @Transactional + public Issue addDownIssue(IssueForm issueForm, List<MultipartFile> multipartFiles) { + User user = this.webAppUtil.getLoginUserObject(); + return addDownIssue(user, issueForm, multipartFiles); + } + + // �븯�쐞�씠�뒋瑜� �깮�꽦�븳�떎. + @Override + @Transactional + public Issue addDownIssue(User user, IssueForm issueForm, List<MultipartFile> multipartFiles) { + // �궗�슜�븯怨� �엳�뒗 �뾽臾� 怨듦컙�씠 �솢�꽦 �긽�깭�씤吏� �솗�씤�븳�떎. �궗�슜 怨듦컙�뿉�꽌 濡쒓렇�씤�븳 �궗�슜�옄媛� 鍮꾪솢�꽦�씤吏� �솗�씤�븳�떎. + Workspace workspace = this.workspaceService.checkUseWorkspace(user, user.getLastWorkspaceId()); + // �봽濡쒖젥�듃 �쑀�슚�꽦 泥댄겕 + Project project = this.projectService.getProject(issueForm.getProjectId()); + // �씠�뒋 �쑀�삎 �쑀�슚�꽦 泥댄겕 + IssueType issueType = this.issueTypeService.getIssueType(issueForm.getIssueTypeId()); + // �슦�꽑�닚�쐞 �쑀�슚�꽦 泥댄겕 + Priority priority = this.priorityService.getPriority(issueForm.getPriorityId()); + // 以묒슂�룄 �쑀�슚�꽦 泥댄겕 + Severity severity = this.severityService.getSeverity(issueForm.getSeverityId()); + + // �젣紐� �쑀�슚�꽦 泥댄겕 + this.verifyTitle(issueForm.getTitle()); + // �궇吏� �쑀�슚�꽦 泥댄겕 + this.checkStartCompleteDate(issueForm.getStartDate(), issueForm.getCompleteDate()); + // �떞�떦 遺��꽌 �쑀�슚�꽦 泥댄겕 + //this.verifyIssueDepartment(project, issueForm); + + // �씠�뒋 �긽�깭 �쑀�삎�씠 '��湲�' �씤 �씠�뒋 �긽�깭 媛��졇�삤湲� + IssueStatus issueStatus = this.issueStatusService.findByIssueStatusTypeIsReady(issueType.getWorkflow()); + + Issue issue = ConvertUtil.copyProperties(issueForm, Issue.class); + issue.setProject(project); + issue.setIssueStatus(issueStatus); + issue.setIssueType(issueType); + issue.setPriority(priority); + issue.setSeverity(severity); + if (issueForm.getParentIssueId() != null){ + Issue parentIssue = this.getIssue(issueForm.getParentIssueId()); + issue.setParentIssue(parentIssue); + } + + issue.setIssueNumber(this.issueNumberGeneratorService.generateIssueNumber(project)); // 媛� �봽濡쒖젥�듃�쓽 怨좎쑀 �씠�뒋 踰덊샇 �깮�꽦 + + issue = this.issueRepository.saveAndFlush(issue); + + issue.setReverseIndex(issue.getId() * -1); // 荑쇰━ �냽�룄 媛쒖꽑�쓣 �쐞�빐 由щ쾭�뒪 �씤�뜳�뒪 �깮�꽦 + // �떞�떦�옄 吏��젙 + //this.issueUserService.modifyIssueUser(issue, project.getWorkspace(), issueForm.getUserIds()); + // �떞�떦遺��꽌 吏��젙 + this.issueDepartmentService.modifyIssueDepartment(issue, user, project.getWorkspace(), issueForm.getDepartmentIds()); + // �뾽泥� �젙蹂� ���옣 + this.issueCompanyService.modifyIssueCompanyField(issue, issueForm.getIssueCompanyFields()); + // ISP �젙蹂� ���옣 + this.issueIspService.modifyIssueIspField(issue, issueForm.getIssueIspFields()); + // HOSTING �젙蹂� ���옣 + this.issueHostingService.modifyIssueHostingField(issue, issueForm.getIssueHostingFields()); + + // 泥⑤� �뙆�씪 ���옣 + // multipartFile �쓣 file Map List 媛앹껜濡� 蹂�寃쏀븳�떎. + List<Map<String, Object>> convertFileMaps = this.convertMultipartFileToFile(multipartFiles); + this.attachedFileService.addAttachedFile(convertFileMaps, issue, user.getAccount()); + + // �뀓�뒪�듃 �뿉�뵒�꽣�뿉 泥⑤��븳 �뙆�씪�쓣 �씠�뒋�� �뿰寃� + this.checkNotHaveIssueIdAttachedFile(issue, issueForm); + // �궗�슜�옄 �젙�쓽 �븘�뱶 ���옣 + this.issueCustomFieldValueService.modifyIssueCustomFieldValue(issue, issueForm.getIssueCustomFields()); + // �씠�뒋 �씠�젰 �깮�꽦 + this.issueHistoryService.addIssueHistory(issue, user, IssueHistoryType.ADD, null); + // �씠�뒋 �쐞�뿕 愿�由� �깮�꽦 + this.issueRiskService.addIssueRisk(issue, project.getWorkspace()); + // �쁺�냽�꽦 而⑦뀓�뒪�듃 鍮꾩슦湲� + this.clear(); + // �씠�뒋 �깮�꽦, �궘�젣�떆 �삁�빟 �씠硫붿씪�뿉 �벑濡앺빐�넃�뒗�떎. + this.reservationIssueEmail(issue, EmailType.ISSUE_ADD); + // �궗�슜�옄 �떆�뒪�뀥 湲곕뒫 �궗�슜 �젙蹂� �닔吏� + + UserVo userVo = ConvertUtil.copyProperties(user, UserVo.class); + log.info(ElasticSearchUtil.makeUserActiveHistoryMessage(userVo, ElasticSearchConstants.ISSUE_ADD)); + + return issue; + } + // �뿰愿��씠�뒋瑜� �깮�꽦�븳�떎. @Override @Transactional diff --git a/src/main/java/kr/wisestone/owl/web/controller/IssueController.java b/src/main/java/kr/wisestone/owl/web/controller/IssueController.java index adcf81d..e9e747d 100644 --- a/src/main/java/kr/wisestone/owl/web/controller/IssueController.java +++ b/src/main/java/kr/wisestone/owl/web/controller/IssueController.java @@ -66,6 +66,21 @@ return this.setSuccessMessage(resJsonData); } + // �븯�쐞�씠�뒋 �깮�꽦 + @RequestMapping(value = "/issue/downIssueAdd", method = RequestMethod.POST) + public + @ResponseBody + Map<String, Object> downIssueAdd(MultipartHttpServletRequest request) { + Map<String, Object> resJsonData = new HashMap<>(); + // �씠�뒋 �깮�꽦 + Issue issue = this.issueService.addDownIssue(IssueForm.make(ConvertUtil.convertJsonToMap(request.getParameter(Constants.REQ_KEY_CONTENT))), request.getFiles("file")); + // 踰꾩쟾 �깮�꽦 + this.issueService.addIssueVersion(issue.getId()); + + resJsonData.put(Constants.RES_KEY_CONTENTS, issue.getId()); //�븯�쐞�씠�뒋 ID + return this.setSuccessMessage(resJsonData); + } + // �씠�뒋 議고쉶 @RequestMapping(value = "/issue/find", method = RequestMethod.POST, produces = MediaType.APPLICATION_JSON_VALUE) public diff --git a/src/main/webapp/scripts/app/issue/issue.js b/src/main/webapp/scripts/app/issue/issue.js index 2c23967..81cc436 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', 'issueAddRelationController', 'issueImportExcelController', + 'issueListTimelineController', 'issueManagerController', 'issueListController', 'issueAddController', 'issueModifyController', 'issueDetailController', 'issueAddRelationController', 'issueAddDownController', 'issueImportExcelController', 'chartLoader', 'jsTable', 'jsTree', 'tableColumnGenerator', 'treeColumnGenerator', 'modalFormAutoScroll', 'summerNote', 'summerNote-ko-KR', 'fullScroll', 'workflowService', 'priorityService', 'issueSearchService', 'issueTableConfigService', 'inputRegex', 'severityService', 'issueTypeService', 'issueTypeCustomFieldService', 'issueService', 'issueStatusService', 'emailTemplateService','issueUserService','issueDepartmentService','issueModifyUserController', 'issueModifyDepartmentController', 'customFieldService', 'issueSearchFieldKeyViewElement', 'issueSearchCustomFieldViewElement', 'tableUserImage', 'fullScroll', 'issueCommentService', 'detectIssueEditor', 'formSubmit', 'issueModifyStatusController', 'downIssueModifyStatusController', 'jsShortCut', diff --git a/src/main/webapp/scripts/app/issue/issueAdd.controller.js b/src/main/webapp/scripts/app/issue/issueAdd.controller.js index 7255a12..52be995 100644 --- a/src/main/webapp/scripts/app/issue/issueAdd.controller.js +++ b/src/main/webapp/scripts/app/issue/issueAdd.controller.js @@ -399,21 +399,26 @@ $scope.vm.companyUrl = result[0].url; $scope.vm.companyMemo = result[0].memo; - $scope.vm.ispName = ispFieldVo.name; - $scope.vm.ispCode = ispFieldVo.code; - $scope.vm.ispManager = ispFieldVo.manager; - $scope.vm.ispTel = ispFieldVo.tel; - $scope.vm.ispEmail = ispFieldVo.email; - $scope.vm.ispUrl = ispFieldVo.url; - $scope.vm.ispMemo = ispFieldVo.memo; - - $scope.vm.hostingName = hostingFieldVo.name; - $scope.vm.hostingCode = hostingFieldVo.code; - $scope.vm.hostingManager = hostingFieldVo.manager; - $scope.vm.hostingTel = hostingFieldVo.tel; - $scope.vm.hostingEmail = hostingFieldVo.email; - $scope.vm.hostingUrl = hostingFieldVo.url; - $scope.vm.hostingMemo = hostingFieldVo.memo; + if (ispFieldVo != null){ + $scope.vm.ispId = ispFieldVo.id; + $scope.vm.ispName = ispFieldVo.name; + $scope.vm.ispCode = ispFieldVo.code; + $scope.vm.ispManager = ispFieldVo.manager; + $scope.vm.ispTel = ispFieldVo.tel; + $scope.vm.ispEmail = ispFieldVo.email; + $scope.vm.ispUrl = ispFieldVo.url; + $scope.vm.ispMemo = ispFieldVo.memo; + } + if (hostingFieldVo != null){ + $scope.vm.hostingId = hostingFieldVo.id; + $scope.vm.hostingName = hostingFieldVo.name; + $scope.vm.hostingCode = hostingFieldVo.code; + $scope.vm.hostingManager = hostingFieldVo.manager; + $scope.vm.hostingTel = hostingFieldVo.tel; + $scope.vm.hostingEmail = hostingFieldVo.email; + $scope.vm.hostingUrl = hostingFieldVo.url; + $scope.vm.hostingMemo = hostingFieldVo.memo; + } }); //ISP�젙蹂� 寃곌낵 媛� Event 泥섎━(set) @@ -472,7 +477,11 @@ ispId : (function () { // ISP �븘�씠�뵒 var ispId = -1; - if ($scope.vm.form.issueIspFields != null && $scope.vm.form.issueIspFields.length > 0) { + if ($scope.vm.form.issueCompanyFields != null && $scope.vm.form.issueCompanyFields.length > 0) { + if ($scope.vm.form.issueCompanyFields[0].ispId != null){ + ispId = $scope.vm.form.issueCompanyFields[0].ispId; + } + }else if ($scope.vm.form.issueIspFields != null && $scope.vm.form.issueIspFields.length > 0) { ispId = $scope.vm.form.issueIspFields[0].id; } return ispId; @@ -480,7 +489,11 @@ hostingId : (function () { // Hosting �븘�씠�뵒 var hostingId = -1; - if ($scope.vm.form.issueHostingFields != null && $scope.vm.form.issueHostingFields.length > 0) { + if ($scope.vm.form.issueCompanyFields != null && $scope.vm.form.issueCompanyFields.length > 0) { + if ($scope.vm.form.issueCompanyFields[0].hostingId != null){ + hostingId = $scope.vm.form.issueCompanyFields[0].hostingId; + } + }else if ($scope.vm.form.issueHostingFields != null && $scope.vm.form.issueHostingFields.length > 0) { hostingId = $scope.vm.form.issueHostingFields[0].id; } return hostingId; @@ -524,7 +537,6 @@ var companyField = $scope.vm.form.issueCompanyFields[0]; issueCompanyFields.push({ - id : companyField.id, companyId : $scope.vm.companyId, name : $scope.vm.companyName, manager : $scope.vm.companyManager, @@ -540,11 +552,11 @@ issueIspFields : (function () { var issueIspFields = []; - if ($scope.vm.form.issueIspFields != null && $scope.vm.form.issueIspFields.length > 0 ){ + if ($scope.vm.form.issueCompanyFields[0].ispFieldVo != null + || $scope.vm.form.issueIspFields != null && $scope.vm.form.issueIspFields.length > 0 ){ var ispField = $scope.vm.form.issueIspFields[0]; - issueIspFields[0] = { - id : ispField.id, + issueIspFields.push({ ispId : $scope.vm.ispId, name : $scope.vm.ispName, code : $scope.vm.ispCode, @@ -553,7 +565,7 @@ email :$scope.vm.ispEmail, url :$scope.vm.ispUrl, memo : $scope.vm.ispMemo - }; + }); } @@ -562,12 +574,11 @@ issueHostingFields : (function () { var issueHostingFields = []; - if ($scope.vm.form.issueHostingFields != null && $scope.vm.form.issueHostingFields.length > 0 ){ - + if ($scope.vm.form.issueCompanyFields[0].hostingFieldVo != null + || $scope.vm.form.issueHostingFields != null && $scope.vm.form.issueHostingFields.length > 0 ){ var hostingField = $scope.vm.form.issueHostingFields[0]; issueHostingFields[0] = { - id : hostingField.id, hostingId : $scope.vm.hostingId, name : $scope.vm.hostingName, code : $scope.vm.hostingCode, @@ -578,7 +589,6 @@ memo : $scope.vm.hostingMemo }; } - return issueHostingFields; })(), diff --git a/src/main/webapp/scripts/app/issue/issueAddDown.controller.js b/src/main/webapp/scripts/app/issue/issueAddDown.controller.js new file mode 100644 index 0000000..0285107 --- /dev/null +++ b/src/main/webapp/scripts/app/issue/issueAddDown.controller.js @@ -0,0 +1,919 @@ +/** + * Created by wisestone on 2017-12-15. + */ +'use strict'; + +define([ + 'app', + 'angular' + ], + function (app, angular) { + app.controller('issueAddDownController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', '$uibModal', '$injector', + '$controller', '$tableProvider', 'parameter' ,'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'Priority', 'Severity','IssueTypeCustomField', '$filter', '$state', + function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, $uibModal, $injector, $controller, $tableProvider, parameter, SweetAlert, $timeout, + $stateParams, $q, Issue, User, AttachedFile, IssueType, Priority, Severity, 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, + addDownIssue : addDownIssue, + }; + + $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 : "", // �뾽泥� �씠硫붿씪 + companyUrl : "", // �뾽泥� url + companyMemo : "", // �뾽泥� 鍮꾧퀬 + ispId : -1, // ISP ID + ispName : "", // ISP 紐� + ispCode : "", // ISP 肄붾뱶 + ispManager : "", // ISP �떞�떦�옄 + ispTel : "", // ISP �쟾�솕踰덊샇 + ispEmail : "", // ISP �씠硫붿씪 + ispUrl : "", // ISP url + ispMemo : "", // ISP 鍮꾧퀬 + hostingId : -1, // �샇�뒪�똿 ID + hostingName : "", // �샇�뒪�똿紐� 寃��깋 + hostingManager : "", // �샇�뒪�똿 �떞�떦�옄 + hostingTel : "", // �샇�뒪�똿 �쟾�솕踰덊샇 + hostingCode : "", // �샇�뒪�똿 肄붾뱶 + hostingEmail : "", // �샇�뒪�똿 �씠硫붿씪 + hostingUrl : "", // �샇�뒪�똿 url + 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) { + var ispFieldVo = result[0].ispFieldVo; + var hostingFieldVo = result[0].hostingFieldVo; + + $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.companyUrl = result[0].url; + $scope.vm.companyMemo = result[0].memo; + + $scope.vm.ispId = ispFieldVo.id; + $scope.vm.ispName = ispFieldVo.name; + $scope.vm.ispCode = ispFieldVo.code; + $scope.vm.ispManager = ispFieldVo.manager; + $scope.vm.ispTel = ispFieldVo.tel; + $scope.vm.ispEmail = ispFieldVo.email; + $scope.vm.ispUrl = ispFieldVo.url; + $scope.vm.ispMemo = ispFieldVo.memo; + + $scope.vm.hostingId = hostingFieldVo.id; + $scope.vm.hostingName = hostingFieldVo.name; + $scope.vm.hostingCode = hostingFieldVo.code; + $scope.vm.hostingManager = hostingFieldVo.manager; + $scope.vm.hostingTel = hostingFieldVo.tel; + $scope.vm.hostingEmail = hostingFieldVo.email; + $scope.vm.hostingUrl = hostingFieldVo.url; + $scope.vm.hostingMemo = hostingFieldVo.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.ispUrl = result[0].url; + $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.hostingUrl = result[0].url; + $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, + companyUrl : $scope.vm.companyUrl, + companyMemo : $scope.vm.companyMemo, + ispName : $scope.vm.ispName, + ispCode : $scope.vm.ispCode, + ispManager : $scope.vm.ispManager, + ispTel : $scope.vm.ispTel, + ispEmail : $scope.vm.ispEmail, + ispUrl : $scope.vm.ispUrl, + ispMemo : $scope.vm.ispMemo, + hostingName : $scope.vm.hostingName, + hostingCode : $scope.vm.hostingCode, + hostingManager : $scope.vm.hostingManager, + hostingTel : $scope.vm.hostingTel, + hostingEmail : $scope.vm.hostingEmail, + hostingUrl : $scope.vm.hostingUrl, + 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 != null && $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, + url :$scope.vm.companyUrl, + 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, + url :$scope.vm.ispUrl, + 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, + url :$scope.vm.hostingUrl, + 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.downAdd({ + 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.addDownIssue(result.data.data); + + $scope.fn.cancel(); + + // �씠�뒋 �긽�꽭 �솕硫� �슂泥� + $rootScope.$broadcast("getIssueDetail", { + id : parameter.id + }); + + } + else { + SweetAlert.error($filter("translate")("issue.failedIssueModify"), result.data.message.message); // �씠�뒋 �닔�젙 �떎�뙣 + } + + $rootScope.spinner = false; + }); + } + + // �뿰愿� �씠�뒋 異붽� + function addDownIssue(downId) { + /*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.relationIssueTypeId, + // issueId : $rootScope.currentDetailIssueId, + issueId : parameter.id, + id : downId, + parentIssueId : parameter.id + }; + + Issue.modifyParentIssue($resourceProvider.getContent( + contents, + $resourceProvider.getPageContent(0, 10))).then(function (result) { + + if (result.data.message.status === "success") { + // �씠�뒋 �긽�꽭 �솕硫� �슂泥� + $rootScope.$broadcast("getIssueDetail", { + id : parameter.id + }); + } + else { + SweetAlert.error($filter("translate")("issue.failedToIssueAddIssueDown"), 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/issueAddRelation.controller.js b/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js index 8b2295b..0c125e6 100644 --- a/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js +++ b/src/main/webapp/scripts/app/issue/issueAddRelation.controller.js @@ -406,6 +406,7 @@ $scope.vm.companyUrl = result[0].url; $scope.vm.companyMemo = result[0].memo; + $scope.vm.ispId = ispFieldVo.id; $scope.vm.ispName = ispFieldVo.name; $scope.vm.ispCode = ispFieldVo.code; $scope.vm.ispManager = ispFieldVo.manager; @@ -414,6 +415,7 @@ $scope.vm.ispUrl = ispFieldVo.url; $scope.vm.ispMemo = ispFieldVo.memo; + $scope.vm.hostingId = hostingFieldVo.id; $scope.vm.hostingName = hostingFieldVo.name; $scope.vm.hostingCode = hostingFieldVo.code; $scope.vm.hostingManager = hostingFieldVo.manager; diff --git a/src/main/webapp/scripts/app/issue/issueList.controller.js b/src/main/webapp/scripts/app/issue/issueList.controller.js index af4011a..cb5a1cb 100644 --- a/src/main/webapp/scripts/app/issue/issueList.controller.js +++ b/src/main/webapp/scripts/app/issue/issueList.controller.js @@ -24,6 +24,7 @@ add : add, // �씠�뒋 �깮�꽦 modify : modify, // �씠�뒋 �닔�젙 addRelationIssueForm : addRelationIssueForm, // �뿰愿� �씠�뒋 異붽� + addDownIssueForm : addDownIssueForm, // �븯�쐞 �씠�뒋 異붽� modifyMultiIssueStatus : modifyMultiIssueStatus, // �씠�뒋 �떎以� �긽�깭 蹂�寃� removes : removes, // �씠�뒋 �궘�젣 addIssueTableConfig : addIssueTableConfig, // �씠�뒋 紐⑸줉 �뀒�씠釉� �꽕�젙 @@ -801,6 +802,22 @@ }); } + function addDownIssueForm(id) { + $uibModal.open({ + templateUrl : 'views/issue/issueAddDown.html', + size : "lg", + controller : 'issueAddDownController', + 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 f4df672..65cf2c2 100644 --- a/src/main/webapp/scripts/app/issue/issueModify.controller.js +++ b/src/main/webapp/scripts/app/issue/issueModify.controller.js @@ -382,6 +382,7 @@ $scope.vm.companyUrl = result[0].url; $scope.vm.companyMemo = result[0].memo; + $scope.vm.ispId = ispFieldVo.id; $scope.vm.ispName = ispFieldVo.name; $scope.vm.ispCode = ispFieldVo.code; $scope.vm.ispManager = ispFieldVo.manager; @@ -390,6 +391,7 @@ $scope.vm.ispUrl = ispFieldVo.url; $scope.vm.ispMemo = ispFieldVo.memo; + $scope.vm.hostingId = hostingFieldVo.id; $scope.vm.hostingName = hostingFieldVo.name; $scope.vm.hostingCode = hostingFieldVo.code; $scope.vm.hostingManager = hostingFieldVo.manager; diff --git a/src/main/webapp/scripts/components/issue/issue.service.js b/src/main/webapp/scripts/components/issue/issue.service.js index e4c3f90..bc4b726 100644 --- a/src/main/webapp/scripts/components/issue/issue.service.js +++ b/src/main/webapp/scripts/components/issue/issue.service.js @@ -50,7 +50,6 @@ return response; }); }, - relAdd : function (conditions) { conditions.url = "issue/relIssueAdd"; return $upload.upload(conditions).progress(function (evt) { @@ -62,6 +61,17 @@ return response; }); }, + downAdd : function (conditions) { + conditions.url = "issue/downIssueAdd"; + 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); diff --git a/src/main/webapp/scripts/main.js b/src/main/webapp/scripts/main.js index 9a8899e..9224480 100644 --- a/src/main/webapp/scripts/main.js +++ b/src/main/webapp/scripts/main.js @@ -179,7 +179,8 @@ /* �씠�뒋 */ 'issueRoute' : 'app/issue/issue', // �씠�뒋�뿉 愿��젴�맂 route �젙蹂� 'issueAddController' : 'app/issue/issueAdd.controller', // �씠�뒋 �깮�꽦 而⑦듃濡ㅻ윭 - 'issueAddRelationController' : 'app/issue/issueAddRelation.controller', // �씠�뒋 �깮�꽦 而⑦듃濡ㅻ윭 + 'issueAddRelationController' : 'app/issue/issueAddRelation.controller', // �뿰愿��씠�뒋 �깮�꽦 而⑦듃濡ㅻ윭 + 'issueAddDownController' : 'app/issue/issueAddDown.controller', // �븯�쐞�씠�뒋 �깮�꽦 而⑦듃濡ㅻ윭 'issueModifyController' : 'app/issue/issueModify.controller', // �씠�뒋 �닔�젙 而⑦듃濡ㅻ윭 'issueDetailController' : 'app/issue/issueDetail.controller', // �씠�뒋 �긽�꽭 而⑦듃濡ㅻ윭 'issueListController' : 'app/issue/issueList.controller', // �씠�뒋 紐⑸줉 而⑦듃濡ㅻ윭 @@ -508,7 +509,8 @@ 'autoCompleteController', 'userInviteController', 'issueAddController', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 - 'issueAddRelationController', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 + 'issueAddRelationController', // �뿰愿� �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 + 'issueAddDownController', //�븯�쐞 �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 'issueService', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 'issueTypeService', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 'priorityService', // �씠�뒋 留뚮뱾湲곗뿉�꽌 �궗�슜 diff --git a/src/main/webapp/views/issue/issueAddDown.html b/src/main/webapp/views/issue/issueAddDown.html new file mode 100644 index 0000000..1cc0a16 --- /dev/null +++ b/src/main/webapp/views/issue/issueAddDown.html @@ -0,0 +1,767 @@ +<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="issueAddDownForm"> + <div class="form-group mb10"> + <label for="issueAddDownForm1" class="issue-label"><span translate="issue.issueTitle">�씠�뒋 �젣紐�</span> <code + class="highlighter-rouge">*</code></label> + <input id="issueAddDownForm1" + 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="issueAddDownForm.title.$touched && issueAddDownForm.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" + input-disabled="vm.form.projects != null ? vm.form.projects.length > 0 : false" + 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="issueAddDownForm4" class="issue-label"> <span + translate="issue.issueType">�씠�뒋 ���엯</span> + <code class="highlighter-rouge">*</code></label> + <select id="issueAddDownForm4" + 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 + disabled> + <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="issueAddDownForm2" class="issue-label"> + <span translate="common.priority">�슦�꽑 �닚�쐞</span> + <code class="highlighter-rouge">*</code> + </label> + <select id="issueAddDownForm2" + 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="issueAddDownForm3" class="issue-label"> <span + translate="common.importance">以묒슂�룄</span> <code + class="highlighter-rouge">*</code></label> + <select id="issueAddDownForm3" + 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.form.issueTypeId, 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="issueAddDownForm5" class="issue-label"> <span translate="common.period">湲곌컙</span></label> + <input id="issueAddDownForm5" + 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-12"> + <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-4" 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" + name="input" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01' || issueCustomField.customFieldVo.requiredData == 'Y'"> + <small class="help-block form-text text-danger" + ng-show="issueCustomField.customFieldVo.requiredData == 'Y'" + ng-if="issueAddDownForm.input.$error.required" + translate="issue.pleaseEnterIssueTypeCustomFields">�빐�떦 �궗�슜�옄�젙�쓽�븘�뱶�뒗 �븘�닔 �엯�젰 媛� �엯�땲�떎. + </small> + </div> + + <div ng-switch-when="NUMBER"> + <input type="text" class="form-control input-sm" + name="number" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01' || issueCustomField.customFieldVo.requiredData == 'Y'"> + <small class="help-block form-text text-danger" + ng-show="issueCustomField.customFieldVo.requiredData == 'Y'" + ng-if="issueAddDownForm.number.$error.required" + translate="issue.pleaseEnterIssueTypeCustomFields">�빐�떦 �궗�슜�옄 �젙�쓽 �븘�뱶�뒗 �븘�닔 �엯�젰 媛� �엯�땲�떎. + </small> + </div> + + <div ng-switch-when="DATETIME"> + <input type="text" class="form-control input-sm" + name="dateTime" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01' || issueCustomField.customFieldVo.requiredData == 'Y'"> + <small class="help-block form-text text-danger" + ng-show="issueCustomField.customFieldVo.requiredData == 'Y'" + ng-if="issueAddDownForm.dateTime.$error.required" + translate="issue.pleaseEnterIssueTypeCustomFields">�빐�떦 �궗�슜�옄 �젙�쓽 �븘�뱶�뒗 �븘�닔 �엯�젰 媛� �엯�땲�떎. + </small> + </div> + + <div ng-switch-when="IP_ADDRESS"> + <input type="text" class="form-control input-sm" + name="ipAddress" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01' || issueCustomField.customFieldVo.requiredData == 'Y'"> + <small class="help-block form-text text-danger" + ng-show="issueCustomField.customFieldVo.requiredData == 'Y'" + ng-if="issueAddDownForm.ipAddress.$error.required" + translate="issue.pleaseEnterIssueTypeCustomFields">�빐�떦 �궗�슜�옄 �젙�쓽 �븘�뱶�뒗 �븘�닔 �엯�젰 媛� �엯�땲�떎. + </small> + </div> + + <div ng-switch-when="SITE"> + <input type="text" class="form-control input-sm" + name="site" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01' || issueCustomField.customFieldVo.requiredData == 'Y'"> + <small class="help-block form-text text-danger" + ng-show="issueCustomField.customFieldVo.requiredData == 'Y'" + ng-if="issueAddDownForm.site.$error.required" + translate="issue.pleaseEnterIssueTypeCustomFields">�빐�떦 �궗�슜�옄 �젙�쓽 �븘�뱶�뒗 �븘�닔 �엯�젰 媛� �엯�땲�떎. + </small> + </div> + + <div ng-switch-when="TEL"> + <input type="text" class="form-control input-sm" + name="tel" + ng-model="issueCustomField.useValues" + maxlength="100" + autocomplete="off" + kr-input + ng-required="issueCustomField.fieldOption == '01' || issueCustomField.customFieldVo.requiredData == 'Y'"> + <small class="help-block form-text text-danger" + ng-show="issueCustomField.customFieldVo.requiredData == 'Y'" + ng-if="issueAddDownForm.tel.$error.required" + translate="issue.pleaseEnterIssueTypeCustomFields">�빐�떦 �궗�슜�옄 �젙�쓽 �븘�뱶�뒗 �븘�닔 �엯�젰 媛� �엯�땲�떎. + </small> + </div> + + <!-- �떒�씪 ���젆�듃 --> + <div ng-switch-when="SINGLE_SELECT"> + <select class="form-control input-sm issue-select-label" + name="singleSelect" + ng-required="issueCustomField.fieldOption == '01' || issueCustomField.customFieldVo.requiredData == 'Y'" + 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> + <small class="help-block form-text text-danger" + ng-show="issueCustomField.customFieldVo.requiredData == 'Y'" + ng-if="issueAddDownForm.singleSelect.$error.required" + translate="issue.pleaseEnterIssueTypeCustomFields">�빐�떦 �궗�슜�옄 �젙�쓽 �븘�뱶�뒗 �븘�닔 �엯�젰 媛� �엯�땲�떎. + </small> + </div> + + <!-- 硫��떚 ���젆�듃 --> + <div ng-switch-when="MULTI_SELECT"> + <ng-dropdown-multiselect class="multiSelect cursor" + name="multiSelect" + ng-required="issueCustomField.customFieldVo.requiredData == 'Y'" + 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> + <small class="help-block form-text text-danger" + ng-show="issueCustomField.customFieldVo.requiredData == 'Y'" + ng-if="issueAddDownForm.multiSelect.$error.required" + translate="issue.pleaseEnterIssueTypeCustomFields">�빐�떦 �궗�슜�옄 �젙�쓽 �븘�뱶�뒗 �븘�닔 �엯�젰 媛� �엯�땲�떎. + </small> + </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> + �뾽泥� �씠由� �겢由��떆 �꽑�깮�맂 �씠由꾩쓽 �뾽泥� �젙蹂닿� 議고쉶�릺硫�, �뾽泥댁젙蹂댁뿉�꽌 異붽��븳 ISP, �샇�뒪�똿 �젙蹂대�� 遺덈윭�샃�땲�떎.</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="issueAddDownForm.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="issueAddDownForm.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="companyFieldUrlAddForm" class="issue-label"><span translate="companyField.url">url</span></label> + <input id="companyFieldUrlAddForm" + name="companyUrl" + type="text" + class="form-control" + kr-input + autocomplete="off" + ng-maxlength="200" + ng-model="vm.companyUrl" + maxlength="200"> + </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> + <input name="ispName" + type="text" + class="form-control" + kr-input + autocomplete="off" + ng-model="vm.ispName" + ng-maxlength="100" + maxlength="100"> + <!--<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="issueAddDownForm.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="issueAddDownForm.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="ispFieldUrlAddForm" class="issue-label"><span translate="companyField.url">url</span></label> + <input id="ispFieldUrlAddForm" + name="ispUrl" + type="text" + class="form-control" + kr-input + autocomplete="off" + ng-maxlength="200" + ng-model="vm.ispUrl" + maxlength="200"> + </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> + <input name="hostingName" + type="text" + class="form-control" + kr-input + autocomplete="off" + ng-model="vm.hostingName" + ng-maxlength="100" + maxlength="100"> + <!--<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="issueAddDownForm.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="issueAddDownForm.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="hostingFieldUrlAddForm" class="issue-label"><span translate="companyField.url">url</span></label> + <input id="hostingFieldUrlAddForm" + name="hostingUrl" + type="text" + class="form-control" + kr-input + autocomplete="off" + ng-maxlength="200" + ng-model="vm.hostingUrl" + maxlength="200"> + </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(issueAddDownForm.$invalid) || $root.spinner) ? null : fn.formSubmit()" + ng-disabled="fn.formCheck(issueAddDownForm.$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 811a577..1fb0269 100644 --- a/src/main/webapp/views/issue/issueDetail.html +++ b/src/main/webapp/views/issue/issueDetail.html @@ -574,6 +574,11 @@ ng-if="vm.viewer.modifyPermissionCheck" ng-click="fn.addDownIssue()" translate="issue.addDownIssue">異붽�</button> + <button type="button" class="btn btn-sm btn-primary btn-roundRel offset-1" + ng-if="vm.viewer.modifyPermissionCheck" + ng-click="fn.addDownIssueForm(vm.viewer.id)"> + <i class="os-icon os-icon-plus"><span></span></i> + </button> </div> </div> -- Gitblit v1.8.0