| | |
| | | typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : |
| | | typeof define === 'function' && define.amd ? define(factory) : |
| | | global.moment = factory() |
| | | }(this, (function () { 'use strict'; |
| | | }(this, (function () { 'use strict'}))); |
| | |
| | | ], |
| | | function (app, angular) { |
| | | app.controller('issueAddController', ['$scope', '$rootScope', '$log', '$resourceProvider', '$uibModalInstance', '$uibModal', '$injector', |
| | | '$controller', '$tableProvider', 'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'Priority', 'Severity', 'IssueTypeCustomField', '$filter', '$state', |
| | | '$controller', '$tableProvider', 'SweetAlert', '$timeout', '$stateParams', '$q', 'Issue', 'User', 'AttachedFile', 'IssueType', 'HostingField','Priority', 'Severity', 'IssueTypeCustomField', '$filter', '$state', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $uibModalInstance, $uibModal, $injector, $controller, $tableProvider, SweetAlert, $timeout, |
| | | $stateParams, $q, Issue, User, AttachedFile, IssueType, Priority, Severity, IssueTypeCustomField, $filter, $state) { |
| | | $stateParams, $q, Issue, User, AttachedFile, IssueType, HostingField, Priority, Severity, IssueTypeCustomField, $filter, $state) { |
| | | |
| | | $scope.fn = { |
| | | cancel : cancel, // 팝업 창 닫기 |
| | |
| | | $scope.$watch("vm.form.projects", function (newValue, oldValue) { |
| | | if (angular.isDefined(newValue)) { |
| | | if (newValue.length < 1) { |
| | | $scope.vm.form.users = []; |
| | | $scope.vm.form.departments = []; |
| | | $scope.vm.form.issueCustomFields = []; |
| | | } |
| | | |
| | | // 이슈 유형에 연결된 사용자 정의 필드 가져오기 |
| | | $scope.fn.getIssueTypeCustomFields(); |
| | | else { |
| | | if ($rootScope.isDefined($scope.vm.issueTypeId)) { |
| | | $scope.fn.getIssueTypeCustomFields(); |
| | | } |
| | | } |
| | | } |
| | | }); |
| | | |
| | | $scope.$watch("vm.form.issueTypeId", function (newValue, oldValue) { |
| | | $scope.vm.partnerVos = $scope.fn.getPartners(); |
| | | }); |
| | | |
| | | // 섬머노트 이미지 업로드 |
| | |
| | | }); |
| | | } |
| | | return result; |
| | | |
| | | } |
| | | |
| | | // 담당자 autocomplete page 업데이트트 |
| | |
| | | ], |
| | | function (app, angular) { |
| | | 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) { |
| | | '$controller', '$injector', 'SweetAlert', '$timeout', 'Issue', 'IssueComment', 'IssueRelation', 'AttachedFile', 'Priority', 'Severity','IssueStatus', 'HostingField', 'IssueTableConfig', '$filter', |
| | | function ($scope, $rootScope, $log, $resourceProvider, $tableProvider, $state, $uibModal, $q, $controller, $injector, SweetAlert, $timeout, Issue, IssueComment, IssueRelation, AttachedFile, Priority, Severity, IssueStatus, HostingField, IssueTableConfig, $filter) { |
| | | |
| | | // IssueListController vm, fn 변수 상속. |
| | | |
| | |
| | | $scope.fn.getRelTableConfigs = getRelTableConfigs; |
| | | $scope.fn.getDownTableConfigs = getDownTableConfigs; |
| | | $scope.fn.containsPartner = containsPartner; |
| | | $scope.fn.getPartners = getPartners; |
| | | |
| | | // 이슈 목록 컨트롤러 vm, fn 상속 중 |
| | | $scope.vm.viewer = {}; |
| | | $scope.vm.viewer = []; |
| | | $scope.vm.images = []; // 첨부된 파일 중 이미지 파일 |
| | | $scope.vm.activeTab = "ALL"; // 활동 내역 탭 |
| | | // 이슈 상태 변경 표시 여부 |
| | |
| | | }); |
| | | } |
| | | |
| | | // 업체/ISP/호스팅 이름이 포함 여부 확인 |
| | | function containsPartner(name) { |
| | | var result = false; |
| | | |
| | | if ($scope.vm.viewer.usePartnerVo != null) { |
| | | $scope.vm.viewer.usePartnerVo.forEach(function (partnerVo) { |
| | | if (name === partnerVo.name) { |
| | | result = true; |
| | | } |
| | | }); |
| | | } |
| | | return result; |
| | | |
| | | } |
| | | |
| | | // 이슈 상세 정보 조회 |
| | | function getIssueDetail() { |
| | | // 초기화 해야할 할목을 지정하여 다른 이슈를 클릭할 때 초기화해준다. |
| | |
| | | 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); |
| | | // 활동 이력 만들기 |
| | |
| | | }); |
| | | } |
| | | |
| | | |
| | | // =================================================================================== |
| | | |
| | | // 업체/ISP/호스팅 이름이 포함 여부 확인 |
| | | function containsPartner(name) { |
| | | var result = false; |
| | | // 일단 viewer를 맨위에 선언해 {} 이렇게 선언해 두었는데 값들이 어떤식으로 변환이 됬는지는 |
| | | // 몰라서 배열로 넘어와서 초기값을 배열로 바꾸었더니 이슈 상세에서는 보인다 |
| | | // 이제 이슈 추가에서 값이 어떻게 넘어오는지 확인해보자! |
| | | if ($scope.vm.viewer.usePartnerVos != null) { |
| | | $scope.vm.viewer.usePartnerVos.forEach(function (partnerVo) { |
| | | if (name === partnerVo.name) { |
| | | result = true; |
| | | } |
| | | }); |
| | | } |
| | | return result; |
| | | |
| | | } |
| | | // 이슈 이미지 미리 보기 만들기 |
| | | function makePreviewImages(attachedFileVos) { |
| | | // 미리보기 이미지 초기화 |
| | |
| | | }); |
| | | } |
| | | |
| | | function getPartners() { |
| | | |
| | | HostingField.getPartnerList($resourceProvider.getContent( |
| | | {}, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.partnerVos = result.data.data.usePartnerVos; |
| | | } |
| | | }); |
| | | |
| | | } |
| | | |
| | | // 특정 사용자에게 이슈를 메일로 발송 |
| | | function sendMail(issueId, projectId) { |
| | | $uibModal.open({ |
| | |
| | | priorityId : "", // 우선순위 아이디 |
| | | severityId : "", // 중요도 아이디 |
| | | issueStatusId : "", // 이슈 상태 아이디 |
| | | // users : [], // 담당자 |
| | | users : [], // 담당자 |
| | | departments : [], // 담당부서 |
| | | files : [], // 업로드 파일 |
| | | attachedFiles : [], // 섬머노트로 파일 업로드를 할 경우 서버에서 pk를 따고 issue id와 연동 작업이 필요하다. |
| | |
| | | {}, |
| | | $resourceProvider.getPageContent(0, 1))).then(function (result) { |
| | | if (result.data.message.status === "success") { |
| | | $scope.vm.partnerVos = result.data.content; |
| | | $scope.vm.partnerVos = result.data.data.usePartnerVos; |
| | | } |
| | | }); |
| | | |