From 424867c3809bb49bd1cc8a8db10bf656d8617a1d Mon Sep 17 00:00:00 2001 From: wyu <kknd09321@nate.com> Date: 수, 01 12월 2021 11:49:25 +0900 Subject: [PATCH] 이메일 수정 진행중 , 이슈 상세 및 이슈 리스트 수정 --- src/main/webapp/scripts/components/utils/autoComplete.controller.js | 191 ++++++++++++++++++++++++++++++++++++++++++++--- 1 files changed, 178 insertions(+), 13 deletions(-) diff --git a/src/main/webapp/scripts/components/utils/autoComplete.controller.js b/src/main/webapp/scripts/components/utils/autoComplete.controller.js index 3d9aed3..1b527bf 100644 --- a/src/main/webapp/scripts/components/utils/autoComplete.controller.js +++ b/src/main/webapp/scripts/components/utils/autoComplete.controller.js @@ -22,6 +22,8 @@ var UserWorkspace = $injector.get("UserWorkspace"); var IspField = $injector.get("IspField"); var HostingField = $injector.get("HostingField"); + var IssueType = $injector.get("IssueType"); + var CustomField = $injector.get("CustomField"); var $log = $injector.get("$log"); var SweetAlert = $injector.get("SweetAlert"); @@ -31,10 +33,14 @@ $scope.fn.getIssueList = getIssueList; // �씪媛� 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. $scope.fn.getWorkflowList = getWorkflowList; // �썙�겕�뵆濡쒖슦 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. $scope.fn.getUserDepartmentList = getUserDepartmentList; // 遺��꽌 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. - $scope.fn.getCompanyFieldList = getCompanyFieldList; // �뾽泥� 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. + $scope.fn.getIssueCompanyFieldList = getIssueCompanyFieldList; // �뾽泥� 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. $scope.fn.getIssueDepartmentList = getIssueDepartmentList; // �떞�떦�옄 -> �떞�떦遺��꽌 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. - $scope.fn.getIspFieldList = getIspFieldList; // ISP 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. - $scope.fn.getHostingFieldList = getHostingFieldList; // �샇�뒪�똿 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. + $scope.fn.getIssueIspFieldList = getIssueIspFieldList; // ISP 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. + $scope.fn.getIssueHostingFieldList = getIssueHostingFieldList; // �샇�뒪�똿 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. + $scope.fn.getPartnerList = getPartnerList; // �뾽泥�/isp/�샇�뒪�똿 紐⑸줉 議고쉶 + $scope.fn.getIssueTypeList = getIssueTypeList; // �씠�뒋 �쑀�삎 紐⑸줉 議고쉶 + $scope.fn.getCustomFieldList = getCustomFieldList; // �궗�슜�옄 �젙�쓽 �븘�뱶 紐⑸줉 議고쉶 + $scope.fn.getMailTargetAll = getMailTargetAll; // �궗�슜�옄 �젙�쓽 �븘�뱶 紐⑸줉 議고쉶 function getUserList(query, excludeList, page, callBack) { var conditions = { @@ -59,7 +65,8 @@ }); return excludeIds; - })() + })(), + issueId : $rootScope.currentDetailIssueId }; var deferred = $q.defer(); @@ -120,9 +127,16 @@ return deferred.promise; } - function getIssueList(query, excludeList, page, callBack) { + function getIssueList(query, issueTypeId, excludeList, page, callBack) { var conditions = { name : query, + issueTypeIds : (function () { + var ids = []; + + ids.push(issueTypeId); + + return ids; + })(), excludeIds : (function () { var excludeIds = []; @@ -191,7 +205,6 @@ function getUserDepartmentList(query, excludeList, page, callBack) { var conditions = { departmentName : query, - departmentId : $rootScope.department.id, excludeIds : (function () { //excludeIds : �젣�쇅 �븷 由ъ뒪�듃 var excludeIds = []; angular.forEach(excludeList, function (exclude) { @@ -219,7 +232,7 @@ return deferred.promise; } - function getCompanyFieldList(query, excludeList, page, callBack) { + function getIssueCompanyFieldList(query, excludeList, page, callBack) { var conditions = { companyName : query, excludeIds : (function () { @@ -258,6 +271,17 @@ var conditions = { departmentName : query, userId : $rootScope.user.id, + projectId : (function () { + var projectId = ""; + + if ($rootScope.isDefined($scope.vm.form)) { + angular.forEach($scope.vm.form.projects, function (project) { + projectId = project.id; + }); + } + + return projectId; + })(), excludeIds : (function () { var excludeIds = []; @@ -272,8 +296,8 @@ var deferred = $q.defer(); - - UserWorkspace.departmentFind($resourceProvider.getContent( // �럹�씠吏� �뾽�뜲�씠�듃媛� �븘�슂�븳 而댄룷�꼳�듃 �씪寃쎌슦, page �뾽�뜲�씠�듃媛� �엳�쓣 寃쎌슦 湲곕낯 10媛쒖뵫 媛��졇�삤怨� �븘�땺寃쎌슦 25媛쒖뵫 媛��졇�삩�떎. + //�봽濡쒖젥�듃�뿉 �냽�빐�엳�뒗 �떞�떦遺��꽌 李얘린 + UserWorkspace.findProjectDepartment($resourceProvider.getContent( // �럹�씠吏� �뾽�뜲�씠�듃媛� �븘�슂�븳 而댄룷�꼳�듃 �씪寃쎌슦, page �뾽�뜲�씠�듃媛� �엳�쓣 寃쎌슦 湲곕낯 10媛쒖뵫 媛��졇�삤怨� �븘�땺寃쎌슦 25媛쒖뵫 媛��졇�삩�떎. conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) { if (result.data.message.status === "success") { if ($rootScope.isDefined(callBack)) { @@ -290,7 +314,7 @@ return deferred.promise; } - function getIspFieldList(query, excludeList, page, callBack) { + function getIssueIspFieldList(query, excludeList, page, callBack) { var conditions = { ispName : query, excludeIds : (function () { @@ -305,8 +329,6 @@ }; var deferred = $q.defer(); - - IspField.find($resourceProvider.getContent( // �럹�씠吏� �뾽�뜲�씠�듃媛� �븘�슂�븳 而댄룷�꼳�듃 �씪寃쎌슦, page �뾽�뜲�씠�듃媛� �엳�쓣 寃쎌슦 湲곕낯 10媛쒖뵫 媛��졇�삤怨� �븘�땺寃쎌슦 25媛쒖뵫 媛��졇�삩�떎. conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) { @@ -325,7 +347,7 @@ return deferred.promise; } - function getHostingFieldList(query, excludeList, page, callBack) { + function getIssueHostingFieldList(query, excludeList, page, callBack) { var conditions = { hostingName : query, excludeIds : (function () { @@ -358,6 +380,149 @@ return deferred.promise; } + + function getPartnerList(query, excludeList, page, callBack) { + var conditions = { + partnerName : query, + excludeIds : (function () { + var excludeIds = []; + + angular.forEach(excludeList, function (exclude) { + excludeIds.push(exclude.id); + }); + + return excludeIds; + })() + }; + + var deferred = $q.defer(); + + HostingField.getPartnerList($resourceProvider.getContent( // �럹�씠吏� �뾽�뜲�씠�듃媛� �븘�슂�븳 而댄룷�꼳�듃 �씪寃쎌슦, page �뾽�뜲�씠�듃媛� �엳�쓣 寃쎌슦 湲곕낯 10媛쒖뵫 媛��졇�삤怨� �븘�땺寃쎌슦 25媛쒖뵫 媛��졇�삩�떎. + conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) { + if (result.data.message.status === "success") { + if ($rootScope.isDefined(callBack)) { + callBack(result); + } + + deferred.resolve(result.data.content); + } + else { + SweetAlert.swal($filter("translate")("common.failedToProjectListLookUp"), result.data.message.message, "error"); // "�봽濡쒖젥�듃 紐⑸줉 議고쉶 �떎�뙣" + } + }); + + return deferred.promise; + } + + function getCustomFieldList(query, excludeList, page, callBack) { + var conditions = { + name : query, + excludeIds : (function () { + var excludeIds = []; + + angular.forEach(excludeList, function (exclude) { + excludeIds.push(exclude.id); + }); + + return excludeIds; + })() + }; + + var deferred = $q.defer(); + + CustomField.find($resourceProvider.getContent( // �럹�씠吏� �뾽�뜲�씠�듃媛� �븘�슂�븳 而댄룷�꼳�듃 �씪寃쎌슦, page �뾽�뜲�씠�듃媛� �엳�쓣 寃쎌슦 湲곕낯 10媛쒖뵫 媛��졇�삤怨� �븘�땺寃쎌슦 25媛쒖뵫 媛��졇�삩�떎. + conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) { + if (result.data.message.status === "success") { + + if ($rootScope.isDefined(callBack)) { + callBack(result); + } + + deferred.resolve(result.data.data); + } + else { + SweetAlert.swal($filter("translate")("issue.failedToIssueTypeListLookup"), result.data.message.message, "error"); // "�씠�뒋 �쑀�삎 紐⑸줉 議고쉶 �떎�뙣" + } + }); + + return deferred.promise; + } + + function getIssueTypeList(query, excludeList, page, callBack) { + var conditions = { + name : query, + excludeIds : (function () { + var excludeIds = []; + + angular.forEach(excludeList, function (exclude) { + excludeIds.push(exclude.id); + }); + + return excludeIds; + })() + }; + + var deferred = $q.defer(); + + IssueType.find($resourceProvider.getContent( // �럹�씠吏� �뾽�뜲�씠�듃媛� �븘�슂�븳 而댄룷�꼳�듃 �씪寃쎌슦, page �뾽�뜲�씠�듃媛� �엳�쓣 寃쎌슦 湲곕낯 10媛쒖뵫 媛��졇�삤怨� �븘�땺寃쎌슦 25媛쒖뵫 媛��졇�삩�떎. + conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) { + if (result.data.message.status === "success") { + + if ($rootScope.isDefined(callBack)) { + callBack(result); + } + + deferred.resolve(result.data.data); + } + else { + SweetAlert.swal($filter("translate")("issue.failedToIssueTypeListLookup"), result.data.message.message, "error"); // "�씠�뒋 �쑀�삎 紐⑸줉 議고쉶 �떎�뙣" + } + }); + + return deferred.promise; + } + + function getMailTargetAll(query, excludeList, page, callBack) { + var conditions = { + id : query, + excludeIds : (function () { + var excludeIds = []; + + angular.forEach(excludeList, function (exclude) { + excludeIds.push(exclude.id); + }); + + return excludeIds; + })(), + partnersEmailIds : (function () { + var partnersEmailIds = []; + + angular.forEach($scope.vm.form.partners, function (partner) { + partnersEmailIds.push(partner.email); + }); + + return partnersEmailIds; + })(), + }; + var deferred = $q.defer(); + + Issue.findMailTargetAll($resourceProvider.getContent( // �럹�씠吏� �뾽�뜲�씠�듃媛� �븘�슂�븳 而댄룷�꼳�듃 �씪寃쎌슦, page �뾽�뜲�씠�듃媛� �엳�쓣 寃쎌슦 湲곕낯 10媛쒖뵫 媛��졇�삤怨� �븘�땺寃쎌슦 25媛쒖뵫 媛��졇�삩�떎. + conditions, $resourceProvider.getPageContent($rootScope.isDefined(page) ? page : 0, $rootScope.isDefined(page) ? 10 : 25))).then(function (result) { + if (result.data.message.status === "success") { + + if ($rootScope.isDefined(callBack)) { + callBack(result); + } + + deferred.resolve(result.data.data); + } + else { + SweetAlert.swal($filter("translate")("issue.failedToIssueTypeListLookup"), result.data.message.message, "error"); // "�씠�뒋 �쑀�삎 紐⑸줉 議고쉶 �떎�뙣" + } + }); + + return deferred.promise; + } } ]); } -- Gitblit v1.8.0