| | |
| | | 'angular' |
| | | ], |
| | | function (app, angular) { |
| | | app.controller('issueDetailController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$tableProvider', '$state', '$uibModal', 'SweetAlert', '$timeout', 'Issue', 'IssueComment', 'IssueRelation', 'AttachedFile', 'IssueStatus', 'IssueTableConfig', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $tableProvider, $state, $uibModal, SweetAlert, $timeout, Issue, IssueComment, IssueRelation, AttachedFile, IssueStatus, IssueTableConfig, $filter) { |
| | | app.controller('issueDetailController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$tableProvider', '$state', '$uibModal', '$q', |
| | | '$controller', '$injector', 'SweetAlert', '$timeout', 'Issue', 'IssueComment', 'IssueRelation', 'AttachedFile', 'Priority', 'Severity','IssueStatus', 'IssueTableConfig', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $tableProvider, $state, $uibModal, $q, $controller, $injector, SweetAlert, $timeout, Issue, IssueComment, IssueRelation, AttachedFile, Priority, Severity, IssueStatus, IssueTableConfig, $filter) { |
| | | |
| | | // IssueListController vm, fn 변수 상속. |
| | | |
| | | $scope.fn.getIssueDetail = getIssueDetail; // 이슈 상세 정보 가져오기 |
| | | $scope.fn.setRelTableColumn = setRelTableColumn; |
| | | $scope.fn.setTableColumnDown = setTableColumnDown; |
| | | $scope.fn.setDownTableColumn = setDownTableColumn; |
| | | $scope.fn.addComment = addComment; // 댓글 등록 |
| | | $scope.fn.removeComment = removeComment; // 댓글 삭제 |
| | | $scope.fn.getCommentList = getCommentList; // 댓글 목록 가져오기 |
| | |
| | | $scope.fn.updateActiveHistory = updateActiveHistory; // 활동 내역에서 전체 보기 탭을 눌렀을 때 댓글, 기록 정보를 업데이트 한다. |
| | | $scope.fn.getChangeIssueStatusList = getChangeIssueStatusList; // 이슈의 현재 상태에서 변경 가능한 이슈 샅태 목록 가져오기 |
| | | $scope.fn.modifyIssueStatus = modifyIssueStatus; // 이슈 상태 변경 |
| | | $scope.fn.modifyDownIssueStatus = modifyDownIssueStatus; //하위 이슈 상태 변경 |
| | | $scope.fn.modifyIssueUser = modifyIssueUser; // 이슈 담당자 변경 |
| | | $scope.fn.modifyIssueDepartment = modifyIssueDepartment; // 이슈 담당부서 변경 |
| | | $scope.fn.initReload = initReload; // 초기화 해야할 할목을 지정하여 다른 이슈를 클릭할 때 초기화해준다. |
| | | $scope.fn.sendMail = sendMail; // 특정 사용자에게 이슈 정보를 메일로 발송 |
| | | $scope.fn.sendMail = sendMail; |
| | | $scope.fn.sendMailAll = sendMailAll; |
| | | $scope.fn.sendMailVo = sendMailVo; |
| | | $scope.fn.getParameters = getParameters; |
| | | $scope.fn.getParametersAll = getParametersAll; |
| | | // 특정 사용자에게 이슈 정보를 메일로 발송 |
| | | $scope.fn.versionView = versionView; // 버전 정보를 표시한다. |
| | | $scope.fn.reservation = reservation; // 예약 정보를 확인 및 변경 한다. |
| | | $scope.fn.getIssueListCallBack = getIssueListCallBack; |
| | | $scope.fn.getDownIssueListCallBack = getDownIssueListCallBack; |
| | | $scope.fn.addRelationIssue = addRelationIssue; // 연관 이슈 추가 |
| | | $scope.fn.addDownIssue = addDownIssue; // 하위 이슈 추가 |
| | | $scope.fn.addRelationIssueTableConfig = addRelationIssueTableConfig; // 연관 이슈 목록 테이블 설정 |
| | | $scope.fn.addDownIssueTableConfig = addDownIssueTableConfig; // 하위 이슈 목록 테이블 설정 |
| | | $scope.fn.getRelTableConfigs = getRelTableConfigs; |
| | | $scope.fn.setRelTableConfigs = setRelTableConfigs; |
| | | $scope.fn.setDownTableConfigs = setDownTableConfigs; |
| | | $scope.fn.containsPartner = containsPartner; |
| | | $scope.fn.onActivate = onActivate; |
| | | $scope.fn.issueBack = issueBack; |
| | | |
| | | // 이슈 목록 컨트롤러 vm, fn 상속 중 |
| | | $scope.vm.viewer = {}; |
| | | $scope.vm.viewer = {}; // 현재 이슈 |
| | | $scope.vm.images = []; // 첨부된 파일 중 이미지 파일 |
| | | $scope.vm.activeTab = "ALL"; // 활동 내역 탭 |
| | | // 이슈 상태 변경 표시 여부 |
| | |
| | | |
| | | $scope.vm.form = { |
| | | issues : [], //연관 일감 |
| | | issuesDown : [] // 하위 일감 |
| | | issuesDown : [], // 하위 일감 |
| | | issuesDownStatus : [], //하위 이슈 상태 |
| | | issueCompanyVos : [], |
| | | issueIspVos : [], |
| | | issueHostingVos : [] |
| | | }; |
| | | |
| | | |
| | |
| | | |
| | | $scope.vm.issueName = ""; // 선택된 연관 일감 이름 |
| | | $scope.vm.issueId = ""; // |
| | | $scope.vm.issueTypeId = ""; |
| | | $scope.vm.autoCompletePage = { |
| | | issue : { |
| | | page : 0, |
| | |
| | | |
| | | function changeDetailView(issue) { |
| | | // 이슈 번호를 저장한 후 이슈 목록으로 이동한다. |
| | | // $rootScope.$broadcast("makeIssueSearch", issue); |
| | | //$rootScope.$broadcast("makeIssueSearch",issue); |
| | | $scope.$parent.tableEvent.changeDetailView(issue.id); |
| | | $scope.fn.onActivate(); |
| | | } |
| | | |
| | | // 하위 일감 삭제 |
| | | // 상위 이슈 클릭시 상위 이슈로 이동 |
| | | function issueBack() { |
| | | $rootScope.currentDetailIssueId = $scope.vm.viewer.parentIssueVo.id |
| | | $rootScope.$broadcast("getIssueDetail", {id: $rootScope.currentDetailIssueId}); |
| | | } |
| | | |
| | | function onActivate() { |
| | | window.scroll(0,240); |
| | | } |
| | | |
| | | angular.extend(this, $controller('autoCompleteController', {$scope : $scope, $injector : $injector})); |
| | | |
| | | // 이슈 목록 데이터 갱신 |
| | | $scope.$on("getIssueList", function () { |
| | | $scope.fn.getIssueDetail(); |
| | | }); |
| | | |
| | | // 하위 이슈 삭제 |
| | | function removeDownIssue(id) { |
| | | // 삭제 알림 |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("issue.downIssueRemove"), // 연관 일감 삭제 |
| | | title : $filter("translate")("issue.downIssueRemove"), // 하위 이슈 삭제 |
| | | text : $filter("translate")("issue.wantToDeleteSelectIssue"), |
| | | type : "warning", |
| | | showCancelButton : true, |
| | |
| | | |
| | | } |
| | | |
| | | // 연관 일감 삭제 |
| | | // 연관 이슈 삭제 |
| | | function removeRelationIssue(id) { |
| | | // 삭제 알림 |
| | | SweetAlert.swal({ |
| | | title : $filter("translate")("issue.relationIssueRemove"), // 연관 일감 삭제 |
| | | title : $filter("translate")("issue.relationIssueRemove"), // 연관 이슈 삭제 |
| | | text : $filter("translate")("issue.wantToDeleteSelectIssue"), |
| | | type : "warning", |
| | | showCancelButton : true, |
| | |
| | | $scope.vm.autoCompletePage.issue.totalPage = result.data.page.totalPage; |
| | | } |
| | | |
| | | // 테이블의 연관 이슈 컬럼을 만들어준다. |
| | | function setRelTableColumn(issueTableConfig) { |
| | | function getDownIssueListCallBack(result) { |
| | | $scope.vm.autoCompletePage.issue.totalPage = result.data.page.totalPage; |
| | | } |
| | | |
| | | // 연관 이슈 컬럼 |
| | | switch(issueTableConfig.key) { |
| | | // 테이블의 연관 이슈 컬럼을 만들어준다. |
| | | function setRelTableColumn(Rel_issueTableConfig) { |
| | | |
| | | // 연관 이슈 컬럼 |
| | | switch(Rel_issueTableConfig.key) { |
| | | |
| | | // 연관 이슈 구분 |
| | | case "RELATION_ISSUE_TYPE" : |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueType") |
| | |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_RELATION_TYPE")) |
| | | break; |
| | | // 연관 이슈 제목 |
| | | case "RELATION_ISSUE_TITLE" : |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueTitle") |
| | |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_RELATION_MOVE")) |
| | | break; |
| | | case "PRIORITY" : // 우선순위 |
| | | case "PRIORITY" : // 연관 이슈 우선순위 |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("common.priority") |
| | | .setDName("priorityName") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Rel_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("COMMON_PRIORITY")); |
| | | .setDRenderer("REL_COMMON_PRIORITY")); |
| | | break; |
| | | case "SEVERITY" : // 중요도 |
| | | case "SEVERITY" : // 연관 이슈 중요도 |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("common.importance") |
| | | .setDName("severityName") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Rel_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("COMMON_SEVERITY")); |
| | | .setDRenderer("REL_COMMON_SEVERITY")); |
| | | break; |
| | | case "ISSUE_TYPE" : // 이슈 타입 |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.issueType") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDName("issueTypeName")); |
| | | break; |
| | | case "ASSIGNEE_TEAM" : // 담당부서 |
| | | case "ASSIGNEE_TEAM" : // 연관 이슈 담당부서 |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("common.assigneeTeam") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Rel_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("ISSUE_DEPARTMENT")); |
| | | .setDRenderer("REL_ISSUE_DEPARTMENT")); |
| | | break; |
| | | case "REGISTER" : // 등록자 |
| | | |
| | | case "REGISTER" : // 연관 이슈 등록자 |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("common.register") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Rel_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("REGISTER")); |
| | | .setDRenderer("REL_REGISTER")); |
| | | break; |
| | | case "PERIOD" : // 기간 |
| | | case "PERIOD" : // 연관 이슈 기간 |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("common.period") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Rel_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("ISSUE_DUE_DATE")); |
| | | .setDRenderer("REL_ISSUE_DUE_DATE")); |
| | | break; |
| | | case "MODIFY_DATE" : // 최근 변경일 |
| | | case "MODIFY_DATE" : // 연관 이슈 최근 변경일 |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("common.lastChangeDate") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Rel_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDName("modifyDate")); |
| | | break; |
| | | } |
| | | |
| | | // 사용자 정의 필드 컬럼 |
| | | if (issueTableConfig.key.indexOf("CUSTOM_FIELD_") !== -1) { |
| | | if (Rel_issueTableConfig.key.indexOf("CUSTOM_FIELD_") !== -1) { |
| | | // 만약 이슈 테이블 컬럼명이 표시되지 않으면 이쪽이 문제 |
| | | for (var count in $scope.vm.customFields) { |
| | | var customField = $scope.vm.customFields[count]; |
| | | |
| | | if (customField.id === Number(issueTableConfig.key.substring(13))) { |
| | | if (customField.id === Number(Rel_issueTableConfig.key.substring(13))) { |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName(customField.name) |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Rel_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setColumnHint(customField) |
| | | .setDRenderer("ISSUE_CUSTOM_FIELD_VALUE_VIEW")); |
| | | .setDRenderer("REL_ISSUE_CUSTOM_FIELD_VALUE_VIEW")); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | // 하위 이슈 테이블 설정 |
| | | function makeTableConfigsDown() { |
| | | $scope.vm.downTableConfigs = []; |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.downIssueTitle") |
| | | .setDType("renderer") |
| | | .setHWidth("width-60 bold") |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_DOWN_MOVE")) |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueDelete") |
| | | .setDType("renderer") |
| | | .setHWidth("width-10 bold") |
| | | .setDRenderer("ISSUE_DOWN_DELETE") |
| | | .setHSort(false) |
| | | .setDAlign("text-center")) |
| | | angular.forEach($scope.vm.relTableConfigs, function (issueTableConfig) { |
| | | // 표시 대상인 컬럼만 화면에 그려준다. |
| | | if (issueTableConfig.display) { |
| | | // 테이블의 컬럼을 만들어준다. |
| | | $scope.fn.setTableColumnDown(issueTableConfig); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 테이블의 컬럼을 만들어준다. |
| | | function setTableColumnDown(issueTableConfig) { |
| | | if (issueTableConfig == null) return; |
| | | // 테이블의 하위 이슈 컬럼을 만들어준다. |
| | | function setDownTableColumn(Down_issueTableConfig) { |
| | | // if (issueTableConfig == null) return; |
| | | |
| | | // 일반 컬럼 |
| | | switch(issueTableConfig.key) { |
| | | case "PRIORITY" : // 우선순위 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | // 하위 이슈 컬럼 |
| | | switch(Down_issueTableConfig.key) { |
| | | // 하위 이슈 제목 |
| | | case "DOWN_ISSUE_TITLE" : |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.downIssueTitle") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + Down_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("ISSUE_DOWN_MOVE")); |
| | | break; |
| | | |
| | | case "ISSUE_DOWN_STATUS_TYPE" : // 이슈 상태 |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.issueStatus") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + Down_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("ISSUE_DOWN_STATUS_TYPE")); |
| | | break; |
| | | |
| | | case "PRIORITY" : // 하위 이슈 우선순위 |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("common.priority") |
| | | .setDName("priorityName") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Down_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("COMMON_PRIORITY")); |
| | | .setDRenderer("DOWN_COMMON_PRIORITY")); |
| | | break; |
| | | case "SEVERITY" : // 중요도 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("common.importance") |
| | | .setDName("severityName") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Down_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("COMMON_SEVERITY")); |
| | | break; |
| | | case "ISSUE_TYPE" : // 이슈 타입 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | .setHName("issue.issueType") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDName("issueTypeName")); |
| | | .setDRenderer("DOWN_COMMON_SEVERITY")); |
| | | break; |
| | | case "ASSIGNEE_TEAM" : // 담당부서 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("common.assigneeTeam") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Down_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("ISSUE_DEPARTMENT")); |
| | | .setDRenderer("DOWN_ISSUE_DEPARTMENT")); |
| | | break; |
| | | case "REGISTER" : // 등록자 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("common.register") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Down_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("REGISTER")); |
| | | .setDRenderer("DOWN_REGISTER")); |
| | | break; |
| | | case "PERIOD" : // 기간 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("common.period") |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Down_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDRenderer("ISSUE_DUE_DATE")); |
| | | .setDRenderer("DOWN_ISSUE_DUE_DATE")); |
| | | break; |
| | | case "MODIFY_DATE" : // 최근 변경일 |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("common.lastChangeDate") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Down_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setDName("modifyDate")); |
| | | break; |
| | | } |
| | | |
| | | // 사용자 정의 필드 컬럼 |
| | | if (issueTableConfig.key.indexOf("CUSTOM_FIELD_") === -1) { |
| | | if (Down_issueTableConfig.key.indexOf("CUSTOM_FIELD_") !== -1) { |
| | | // 만약 이슈 테이블 컬럼명이 표시되지 않으면 이쪽이 문제 |
| | | for (var count in $scope.vm.customFields) { |
| | | var customField = $scope.vm.customFields[count]; |
| | | |
| | | if (customField.id === Number(issueTableConfig.key.substring(13))) { |
| | | $scope.vm.tableConfigs.push($tableProvider.config() |
| | | if (customField.id === Number(Down_issueTableConfig.key.substring(13))) { |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName(customField.name) |
| | | .setDType("renderer") |
| | | .setHWidth("bold " + issueTableConfig.width) |
| | | .setHWidth("bold " + Down_issueTableConfig.width) |
| | | .setDAlign("text-center") |
| | | .setColumnHint(customField) |
| | | .setDRenderer("ISSUE_CUSTOM_FIELD_VALUE_VIEW")); |
| | | .setDRenderer("DOWN_ISSUE_CUSTOM_FIELD_VALUE_VIEW")); |
| | | break; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | |
| | | |
| | | // 연관 이슈 테이블 설정 |
| | | function makeTableConfigs() { |
| | | function makeRelTableConfigs() { |
| | | $scope.vm.relTableConfigs = []; |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueType") |
| | | .setDType("renderer") |
| | | .setHWidth("width-30 bold") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-30-p bold") |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_RELATION_TYPE")) |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueTitle") |
| | | .setDType("renderer") |
| | | .setHWidth("width-60 bold") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-60-p bold") |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_RELATION_MOVE")) |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueDelete") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-20-p bold") |
| | | .setDRenderer("ISSUE_RELATION_DELETE") |
| | | .setHSort(false) |
| | | .setDAlign("text-center")) |
| | | |
| | | angular.forEach($scope.vm.issueTableConfigs, function (issueTableConfig) { |
| | | angular.forEach($scope.vm.relTableConfigs, function (Rel_issueTableConfig) { |
| | | // 표시 대상인 컬럼만 화면에 그려준다. |
| | | if (issueTableConfig.display) { |
| | | if (Rel_issueTableConfig.display) { |
| | | // 테이블의 컬럼을 만들어준다. |
| | | $scope.fn.setRelTableColumn(issueTableConfig); |
| | | $scope.fn.setRelTableColumn(Rel_issueTableConfig); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 하위 이슈 테이블 설정 |
| | | function makeDownTableConfigs() { |
| | | $scope.vm.downTableConfigs = []; |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.downIssueTitle") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-60-p bold") |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_DOWN_MOVE")) |
| | | if($scope.vm.viewer.modifyPermissionCheck){ |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueDelete") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-20-p bold") |
| | | .setDRenderer("ISSUE_DOWN_DELETE") |
| | | .setHSort(false) |
| | | .setDAlign("text-center")) |
| | | } |
| | | |
| | | angular.forEach($scope.vm.downTableConfigs, function (Down_issueTableConfig) { |
| | | // 표시 대상인 컬럼만 화면에 그려준다. |
| | | if (Down_issueTableConfig.display) { |
| | | // 테이블의 컬럼을 만들어준다. |
| | | $scope.fn.setDownTableColumn(Down_issueTableConfig); |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 연관 이슈 테이블 설정 |
| | | function setRelTableConfigs(issueTableConfigVo) { |
| | | if (issueTableConfigVo == null) { |
| | | makeRelTableConfigs(); |
| | | return; |
| | | } |
| | | var issueTableConfigs = issueTableConfigVo.issueTableConfigs; |
| | | |
| | | function getRelTableConfigs() { |
| | | var content = { |
| | | issueId : $scope.vm.viewer.id |
| | | // 연관 슈 목록 테이블 설정 값을 가져와서 적용한다. |
| | | if ($rootScope.isDefined(issueTableConfigs)) { |
| | | // 이슈 테이블 설정 정보를 저장 한다. |
| | | |
| | | $scope.vm.issueRelTableConfigs = []; |
| | | $scope.vm.issueRelTableConfigs = JSON.parse(issueTableConfigs); |
| | | $scope.vm.issueRelTableConfigs.sort(function (a, b) { |
| | | return a.position < b.position ? -1 : a.position > b.position ? 1 : 0; |
| | | }); |
| | | |
| | | $scope.vm.relTableConfigs = []; |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueType") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-30-p bold") |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_RELATION_TYPE")) |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueTitle") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-60-p bold") |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_RELATION_MOVE")) |
| | | angular.forEach($scope.vm.issueRelTableConfigs, function (Rel_issueTableConfig) { |
| | | // 표시 대상인 컬럼만 화면에 그려준다. |
| | | if (Rel_issueTableConfig.display) { |
| | | // 테이블의 컬럼을 만들어준다. |
| | | $scope.fn.setRelTableColumn(Rel_issueTableConfig); |
| | | |
| | | } |
| | | }); |
| | | $scope.vm.relTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueDelete") |
| | | .setDType("renderer") |
| | | .setHWidth("width-20-p bold") |
| | | .setDRenderer("ISSUE_RELATION_DELETE") |
| | | .setHSort(false) |
| | | .setDAlign("text-center")) |
| | | |
| | | } else { |
| | | makeRelTableConfigs(); |
| | | } |
| | | |
| | | } |
| | | |
| | | // 하위 이슈 상세 조회 결과 설정 |
| | | function setDownTableConfigs(issueTableConfigVo) { |
| | | if (issueTableConfigVo == null) return; |
| | | var issueTableConfigs = issueTableConfigVo.issueTableConfigs; |
| | | |
| | | // 연관 슈 목록 테이블 설정 값을 가져와서 적용한다. |
| | | if ($rootScope.isDefined(issueTableConfigs)) { |
| | | // 이슈 테이블 설정 정보를 저장 한다. |
| | | $scope.vm.issueDownTableConfigs = []; |
| | | $scope.vm.issueDownTableConfigs = JSON.parse(issueTableConfigs); |
| | | $scope.vm.issueDownTableConfigs.sort(function (a, b) { |
| | | return a.position < b.position ? -1 : a.position > b.position ? 1 : 0; |
| | | }); |
| | | $scope.vm.downTableConfigs = []; |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.downIssueTitle") |
| | | .setDType("renderer") |
| | | .setDAlign("text-center") |
| | | .setHWidth("width-60-p bold") |
| | | .setHSort(false) |
| | | .setDRenderer("ISSUE_DOWN_MOVE")) |
| | | angular.forEach($scope.vm.issueDownTableConfigs, function (Down_issueTableConfig) { |
| | | // 표시 대상인 컬럼만 화면에 그려준다. |
| | | if (Down_issueTableConfig.display) { |
| | | // 테이블의 컬럼을 만들어준다. |
| | | $scope.fn.setDownTableColumn(Down_issueTableConfig); |
| | | } |
| | | }); |
| | | $scope.vm.downTableConfigs.push($tableProvider.config() |
| | | .setHName("issue.relationIssueDelete") |
| | | .setDType("renderer") |
| | | .setHWidth("width-20-p bold") |
| | | .setDRenderer("ISSUE_DOWN_DELETE") |
| | | .setHSort(false) |
| | | .setDAlign("text-center")) |
| | | |
| | | } else { |
| | | makeDownTableConfigs(); |
| | | } |
| | | } |
| | | |
| | | // 연관 이슈 추가 |
| | | 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.relationIssueType.id, |
| | | issueId : $rootScope.currentDetailIssueId, |
| | | relationIssueId : $scope.vm.form.issues[0].id, |
| | | priorityName : $scope.vm.priorityName |
| | | }; |
| | | |
| | | IssueTableConfig.relationDetail($resourceProvider.getContent( |
| | | content, |
| | | $resourceProvider.getPageContent(0, 0))).then(function (result) { |
| | | IssueRelation.add($resourceProvider.getContent( |
| | | contents, |
| | | $resourceProvider.getPageContent(0, 10))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | var issueTableConfigs = result.data.data; |
| | | |
| | | // 연관 슈 목록 테이블 설정 값을 가져와서 적용한다. |
| | | if ($rootScope.isDefined(issueTableConfigs)) { |
| | | // 이슈 테이블 설정 정보를 저장 한다. |
| | | $scope.vm.issueRelTableConfigs = []; |
| | | $scope.vm.issueRelTableConfigs = JSON.parse(issueTableConfigs); |
| | | $scope.vm.issueRelTableConfigs.sort(function (a, b) { |
| | | return a.position < b.position ? -1 : a.position > b.position ? 1 : 0; |
| | | }); |
| | | |
| | | angular.forEach($scope.vm.issueRelTableConfigs, function (issueTableConfig) { |
| | | // 표시 대상인 컬럼만 화면에 그려준다. |
| | | if (issueTableConfig.display) { |
| | | // 테이블의 컬럼을 만들어준다. |
| | | $scope.fn.setRelTableColumn(issueTableConfig); |
| | | } |
| | | }); |
| | | |
| | | } else { |
| | | makeTableConfigs(); |
| | | } |
| | | |
| | | $scope.fn.getIssueDetail(); |
| | | } |
| | | else { |
| | | SweetAlert.swal($filter("translate")("issue.errorRemovableIssueStatusList"), result.data.message.message, "error"); // "이동 가능한 이슈 상태 목록 조회 오류" |
| | | SweetAlert.error($filter("translate")("issue.failedToIssueAddIssueRelation"), result.data.message.message); // "연관일감 생성 실패" |
| | | } |
| | | }); |
| | | |
| | | |
| | | } |
| | | |
| | | |
| | | // 하위 이슈 추가 |
| | | function addDownIssue() { |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 연관 이슈 추가 |
| | | 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.relationIssueType.id, |
| | | issueId : $rootScope.currentDetailIssueId, |
| | | relationIssueId : $scope.vm.form.issues[0].id |
| | | }; |
| | | |
| | | 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); // "연관일감 생성 실패" |
| | | } |
| | | }); |
| | | } |
| | | |
| | | // 이슈명을 클릭하면 이슈 상세 정보를 조회한다. |
| | | // $rootScope.$on("getIssueDetail", function (event, args) { |
| | | // $scope.vm.viewer.id = args["id"]; |
| | | // $scope.fn.getIssueDetail(); |
| | | // }); |
| | | |
| | | // 이슈명을 클릭하면 이슈 상세 정보를 조회한다. |
| | | // $scope.$on("getIssueDetail", function (event, args) { |
| | | // $scope.vm.viewer.id = args["id"]; |
| | | // $scope.fn.getIssueDetail(); |
| | | // }); |
| | | |
| | | // 이메일 보낸후 상세화면 갱신 |
| | | // $rootScope.$on("getIssueDetail", function (event, args) { |
| | | // $scope.fn.getIssueDetail(); |
| | | // }); |
| | | |
| | | $scope.$on("getIssueDetail", function (event, args) { |
| | | $scope.vm.viewer.id = args["id"]; |
| | | $scope.fn.getIssueDetail(); |
| | | }); |
| | | |
| | | $scope.$watch(function() { |
| | | return $rootScope.currentDetailIssueId; |
| | | }, function() { |
| | | if ($rootScope.currentDetailIssueId != null) { |
| | | $scope.vm.viewer.id = $rootScope.currentDetailIssueId; |
| | | $scope.fn.getIssueDetail(); |
| | | } |
| | | }, true); |
| | | |
| | | // 초기화 해야할 할목을 지정하여 다른 이슈를 클릭할 때 초기화해준다. |
| | | function initReload() { |
| | | $scope.vm.editor.issueStatus = false; |
| | | $scope.vm.issueForm.issueStatusList = []; |
| | | $scope.vm.issueForm.issueStatusId = ""; |
| | | if ($scope.$root.$$phase !== '$apply' && $scope.$root.$$phase !== '$digest') { |
| | | $scope.$apply(); |
| | | } |
| | | $scope.vm.issueTypeId = $rootScope.getCurrentIssueTypeId(); |
| | | // if ($scope.$root.$$phase !== '$apply' && $scope.$root.$$phase !== '$digest') { |
| | | // $scope.$apply(); |
| | | // } |
| | | } |
| | | |
| | | // 이슈 상태 변경 |
| | |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | issueIds : [$scope.vm.viewer.id] |
| | | issueIds : [$scope.vm.viewer.id], |
| | | projectId : $scope.vm.viewer.projectVo.id, |
| | | downIssuesStatus : $scope.vm.form.issuesDownStatus |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function modifyDownIssueStatus() { |
| | | $uibModal.open({ |
| | | templateUrl : 'views/issue/downIssueModifyStatus.html', |
| | | size : "md", |
| | | controller : 'downIssueModifyStatusController', |
| | | backdrop : 'static', |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | issueTypeId : $scope.vm.viewer.issueTypeVo.id, |
| | | issueIds : [$scope.vm.viewer.id], |
| | | downIssues : $scope.vm.viewer.issueDownVos, |
| | | projectId : $scope.vm.viewer.projectVo.id |
| | | }; |
| | | } |
| | | } |
| | |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | departmentVos : [$scope.vm.form.issues[0].departmentVos], |
| | | id : [$scope.vm.form.issues[0].id], |
| | | projectId : [$scope.vm.form.issues[0].projectVo.id], |
| | | project : [$scope.vm.form.issues[0].projectVo] |
| | | departmentVos : $scope.vm.form.issues[0].departmentVos, |
| | | id : $scope.vm.form.issues[0].id, |
| | | projectId : $scope.vm.form.issues[0].projectVo.id, |
| | | project : $scope.vm.form.issues[0].projectVo, |
| | | issueTypeId : $scope.vm.form.issues[0].issueTypeVo.id |
| | | }; |
| | | } |
| | | } |
| | |
| | | // 연관 이슈 목록 테이블 설정 |
| | | function addRelationIssueTableConfig() { |
| | | $uibModal.open({ |
| | | templateUrl : 'views/issue/issueRelationTableConfig.html', |
| | | templateUrl : 'views/issue/issueAddRelationTableConfig.html', |
| | | size : "lg", |
| | | controller : 'issueAddRelationTableConfigController', |
| | | backdrop : 'static', |
| | | resolve : {} |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | issueTypeId : $scope.vm.viewer.issueTypeVo.id |
| | | |
| | | }; |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | |
| | | // 하위 이슈 목록 테이블 설정 |
| | | function addDownIssueTableConfig() { |
| | | $uibModal.open({ |
| | | templateUrl : 'views/issue/issueDownTableConfig.html', |
| | | templateUrl : 'views/issue/issueAddDownTableConfig.html', |
| | | size : "lg", |
| | | controller : 'issueAddDownTableConfigController', |
| | | backdrop : 'static', |
| | | resolve : {} |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | issueTypeId : $scope.vm.viewer.issueTypeVo.id |
| | | }; |
| | | |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | |
| | | }); |
| | | } |
| | | |
| | | // 업체/ISP/호스팅 이름이 포함 여부 확인 |
| | | function containsPartner(name) { |
| | | var result = false; |
| | | |
| | | if ($scope.vm.viewer.usePartnerVos != null) { |
| | | $scope.vm.viewer.usePartnerVos.forEach(function (partnerVo) { |
| | | if (name === partnerVo.name) { |
| | | result = true; |
| | | } |
| | | }); |
| | | } |
| | | return result; |
| | | |
| | | } |
| | | |
| | | // 이슈 상세 정보 조회 |
| | | function getIssueDetail() { |
| | | // 초기화 해야할 할목을 지정하여 다른 이슈를 클릭할 때 초기화해준다. |
| | | $scope.fn.initReload(); |
| | | |
| | | $scope.fn.getRelTableConfigs(); |
| | | // $scope.fn.getRelTableConfigs(); |
| | | // $scope.fn.getDownTableConfigs(); |
| | | |
| | | Issue.detail($resourceProvider.getContent( |
| | | Issue.detail($resourceProvider.getContent( |
| | | {id : $scope.vm.viewer.id, deep : "02"}, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | |
| | | if (result.data.message.status === "success") { |
| | | if (angular.isDefined(result.data.data)) { |
| | | |
| | | $scope.vm.viewer = angular.copy(result.data.data); |
| | | // 이슈 이미지 미리 보기 만들기 |
| | | $scope.fn.makePreviewImages(result.data.data.attachedFileVos); |
| | |
| | | // 이슈에서 사용자가 선택한 사용자 정의 필드 값을 입력 폼에 셋팅한다. |
| | | $scope.fn.setUseValueByIssueTypeCustomFields(result.data.data.issueCustomFieldValueVos); |
| | | |
| | | |
| | | // 연관 일감 |
| | | $scope.vm.issueName = ""; |
| | | $scope.vm.form.issues = []; |
| | | $scope.vm.form.issues.push(result.data.data); |
| | | $scope.vm.form.issuesDown = []; |
| | | $scope.vm.form.issuesDownStatus = [];// 하위이슈 상태 |
| | | $scope.vm.form.issuesDown.push(result.data.data); |
| | | |
| | | // makeTableConfigs(); |
| | | // $scope.vm.relTableConfigs = result.data.relTableConfigs; |
| | | var issueTableConfigVos = result.data.data.issueTableConfigVos; |
| | | $scope.fn.setRelTableConfigs(issueTableConfigVos[0]); |
| | | $scope.fn.setDownTableConfigs(issueTableConfigVos[1]); |
| | | |
| | | angular.forEach(result.data.data.issueRelationVos, function (issueRelationVo){ |
| | | issueRelationVo.relationIssueTypeName = $scope.vm.relationIssueTypes[issueRelationVo.relationIssueType].name; |
| | | $scope.vm.form.issues.push(issueRelationVo.issueRelation); |
| | | }); |
| | | // 연관 이슈 반복문 |
| | | if (result.data.data.issueRelationVos !== null) { |
| | | angular.forEach(result.data.data.issueRelationVos, function (issueRelationVo){ |
| | | issueRelationVo.relationIssueTypeName = $scope.vm.relationIssueTypes[issueRelationVo.relationIssueType].name; |
| | | $scope.vm.form.issues.push(issueRelationVo.issueRelation); |
| | | }); |
| | | } |
| | | |
| | | // makeTableConfigsDown(); |
| | | // $scope.vm.downTableConfigs = result.data.downTableConfigs; |
| | | angular.forEach(result.data.data.issueDownVos, function (issueDownVo){ |
| | | $scope.vm.form.issuesDown.push(issueDownVo.issue); |
| | | }); |
| | | |
| | | // 하위 이슈 반목문 |
| | | if (result.data.data.issueDownVos !== null){ |
| | | angular.forEach(result.data.data.issueDownVos, function (issueDownVo){ |
| | | //$scope.vm.form.issuesDown.push(issueDownVo.issueDown); |
| | | $scope.vm.form.issuesDown.push(issueDownVo); |
| | | $scope.vm.form.issuesDownStatus.push(issueDownVo.issueStatusVo.issueStatusType); |
| | | }); |
| | | } |
| | | $scope.vm.viewer.issueRelationVos = result.data.data.issueRelationVos; |
| | | $scope.vm.viewer.issueDownVos = result.data.data.issueDownVos; |
| | | |
| | | if ($rootScope.workProject.id > -1 && result.data.data.projectVo !== null) { |
| | | $rootScope.changeLastProject(result.data.data.projectVo.id); |
| | | } |
| | | |
| | | } |
| | | } |
| | | else { |
| | |
| | | switch (issueTypeCustomField.customFieldVo.customFieldType) { |
| | | case "INPUT" : |
| | | case "SINGLE_SELECT" : |
| | | case "NUMBER" : |
| | | case "DATETIME" : |
| | | case "IP_ADDRESS" : |
| | | case "EMAIL" : |
| | | case "SITE" : |
| | | case "TEL" : |
| | | issueTypeCustomField.useValues = ""; |
| | | break; |
| | | |
| | |
| | | |
| | | // 활동 이력 만들기 |
| | | function makeActiveHistory() { |
| | | $scope.vm.viewer.activeHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); |
| | | $scope.vm.viewer.activeHistory.sort(function (a, b) { |
| | | if ($scope.vm.viewer.issueDownVos != null && $scope.vm.viewer.issueDownVos.length > 0) { |
| | | $scope.vm.viewer.activeHistory = ""; |
| | | $scope.vm.viewer.activeParentHistory = ""; |
| | | $scope.vm.viewer.activeDownHistory = ""; |
| | | $scope.vm.viewer.activeDownAllHistory = ""; |
| | | // 하위이슈 히스토리 |
| | | for (var i=0; i<$scope.vm.viewer.issueDownVos.length; i++){ |
| | | $scope.vm.viewer.activeDownHistory = $scope.vm.viewer.issueDownVos[i].issueHistoryVos.concat($scope.vm.viewer.issueDownVos[i+1].issueHistoryVos); |
| | | i++; |
| | | } |
| | | for (var i=0; i<$scope.vm.viewer.activeDownHistory.length; i++){ |
| | | $scope.vm.viewer.activeDownHistory[i].description |
| | | = "<div class='dot'>하위이슈 : "+$scope.vm.viewer.activeDownHistory[i].title+"</div>" + $scope.vm.viewer.activeDownHistory[i].description; |
| | | } |
| | | $scope.vm.viewer.activeDownHistory.sort(function (a, b) { //내림차순 |
| | | return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; |
| | | }); |
| | | |
| | | // 하위이슈 댓글 히스토리 |
| | | for (var i=0; i<$scope.vm.viewer.issueDownVos.length; i++) { |
| | | $scope.vm.viewer.downComment = $scope.vm.viewer.issueDownVos[i].issueCommentVos.concat($scope.vm.viewer.issueDownVos[i+1].issueCommentVos); |
| | | i++; |
| | | } |
| | | /*for (var i=0; i<$scope.vm.viewer.downComment.length; i++){ |
| | | $scope.vm.viewer.downComment[i].description |
| | | = $scope.vm.viewer.downComment[i].title +"의 댓글 : "+ $scope.vm.viewer.downComment[i].description; |
| | | }*/ |
| | | $scope.vm.viewer.issueDownVos.sort(function (a, b) { //내림차순 |
| | | return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; |
| | | }); |
| | | |
| | | $scope.vm.viewer.activeDownAllHistory = $scope.vm.viewer.downComment.concat($scope.vm.viewer.activeDownHistory); |
| | | $scope.vm.viewer.activeParentHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); |
| | | $scope.vm.viewer.activeHistory = $scope.vm.viewer.activeParentHistory.concat($scope.vm.viewer.activeDownAllHistory); |
| | | |
| | | }else { |
| | | $scope.vm.viewer.activeHistory = $scope.vm.viewer.issueCommentVos.concat($scope.vm.viewer.issueHistoryVos); |
| | | } |
| | | $scope.vm.viewer.activeHistory.sort(function (a, b) { //내림차순 |
| | | return a.registerDate > b.registerDate ? -1 : a.registerDate < b.registerDate ? 1 : 0; |
| | | }); |
| | | } |
| | |
| | | |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.viewer.issueCommentVos = result.data.data; |
| | | $scope.fn.updateActiveHistory(); |
| | | } |
| | | else { |
| | | SweetAlert.swal({ |
| | |
| | | }); |
| | | } |
| | | |
| | | function sendMailVo(partnerVos) { |
| | | $scope.fn.sendMail($scope.fn.getParametersAll(), $scope.fn.getParameters(null, partnerVos)); |
| | | } |
| | | |
| | | function sendMailAll() { |
| | | var param = $scope.fn.getParametersAll(); |
| | | $scope.fn.sendMail(param, param); |
| | | } |
| | | |
| | | // 특정 사용자에게 이슈를 메일로 발송 |
| | | function sendMail(issueId, projectId) { |
| | | function sendMail(partnersAll, partners) { |
| | | $uibModal.open({ |
| | | templateUrl : 'views/issue/issueSendMail.html', |
| | | templateUrl : 'views/issue/issueSendMailPartners.html', |
| | | size : "md", |
| | | controller : 'issueSendMailController', |
| | | controller : 'issueSendMailPartnersController', |
| | | backdrop : 'static', |
| | | resolve : { |
| | | parameter : function () { |
| | | return { |
| | | issueId : issueId, |
| | | projectId : projectId |
| | | }; |
| | | parameter : { |
| | | partnersAll : partnersAll, |
| | | partners : partners, |
| | | issueId : $scope.vm.viewer.id, |
| | | projectId : $scope.vm.viewer.projectVo.id, |
| | | } |
| | | } |
| | | }); |
| | | } |
| | | |
| | | function getParametersAll() { |
| | | var params = $scope.fn.getParameters(null, $scope.vm.viewer.issueCompanyVos); |
| | | params = $scope.fn.getParameters(params, $scope.vm.viewer.issueIspVos); |
| | | params = $scope.fn.getParameters(params, $scope.vm.viewer.issueHostingVos); |
| | | |
| | | if (params != null && params.length > 0) { |
| | | for (let i = 0; i < params.length; i++) { |
| | | params[i].id = i; |
| | | } |
| | | } |
| | | return params; |
| | | } |
| | | |
| | | function getParameters(sourceArr, partnerVos) { |
| | | var excludeVos = sourceArr != null ? sourceArr.slice() : []; |
| | | |
| | | angular.forEach(partnerVos, function (vo) { |
| | | var account = { |
| | | account : vo.email |
| | | } |
| | | Object.assign(vo, account) |
| | | |
| | | excludeVos.push(vo); |
| | | }); |
| | | |
| | | return excludeVos; |
| | | } |
| | | |
| | | // 변경 정보를 확인한다. |
| | |
| | | } |
| | | }); |
| | | } |
| | | |
| | | } |
| | | ]); |
| | | } |