From e60f829f9d975a88673f0e6922f1c9c1228f89ea Mon Sep 17 00:00:00 2001 From: wyu <kknd09321@nate.com> Date: 금, 03 12월 2021 18:30:33 +0900 Subject: [PATCH] 사용자정의 필드 날짜 수정, 프로젝트 생성시 대쉬보드 이동 오류 수정 --- src/main/webapp/scripts/components/utils/autoComplete.controller.js | 76 +++++++++++++++++++++++++++++++++++--- 1 files changed, 70 insertions(+), 6 deletions(-) diff --git a/src/main/webapp/scripts/components/utils/autoComplete.controller.js b/src/main/webapp/scripts/components/utils/autoComplete.controller.js index 1dd6f18..004e327 100644 --- a/src/main/webapp/scripts/components/utils/autoComplete.controller.js +++ b/src/main/webapp/scripts/components/utils/autoComplete.controller.js @@ -23,6 +23,7 @@ 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"); @@ -36,8 +37,10 @@ $scope.fn.getIssueDepartmentList = getIssueDepartmentList; // �떞�떦�옄 -> �떞�떦遺��꽌 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. $scope.fn.getIssueIspFieldList = getIssueIspFieldList; // ISP 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. $scope.fn.getIssueHostingFieldList = getIssueHostingFieldList; // �샇�뒪�똿 紐⑸줉 �젙蹂대�� 議고쉶�븳�떎. - $scope.fn.getCompanyList = getCompanyList; // �뾽泥�/isp/�샇�뒪�똿 紐⑸줉 議고쉶 + $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 = { @@ -62,7 +65,8 @@ }); return excludeIds; - })() + })(), + issueId : $rootScope.currentDetailIssueId }; var deferred = $q.defer(); @@ -123,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 = []; @@ -370,9 +381,9 @@ return deferred.promise; } - function getCompanyList(query, excludeList, page, callBack) { + function getPartnerList(query, excludeList, page, callBack) { var conditions = { - hostingName : query, + partnerName : query, excludeIds : (function () { var excludeIds = []; @@ -386,7 +397,7 @@ var deferred = $q.defer(); - HostingField.getCompanyList($resourceProvider.getContent( // �럹�씠吏� �뾽�뜲�씠�듃媛� �븘�슂�븳 而댄룷�꼳�듃 �씪寃쎌슦, page �뾽�뜲�씠�듃媛� �엳�쓣 寃쎌슦 湲곕낯 10媛쒖뵫 媛��졇�삤怨� �븘�땺寃쎌슦 25媛쒖뵫 媛��졇�삩�떎. + 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)) { @@ -397,6 +408,40 @@ } 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"); // "�씠�뒋 �쑀�삎 紐⑸줉 議고쉶 �떎�뙣" } }); @@ -436,6 +481,25 @@ return deferred.promise; } + + function getMailTargetAll(excludeList) { + var deferred = $q.defer(); + + var partners = $scope.vm.partners.slice(); + if (excludeList != null && excludeList.length > 0) { + for (let i = partners.length - 1 ; i >= 0 ; i--) { + excludeList.forEach(function (exclude) { + if (partners[i].id === exclude.id) { + partners.splice(i, 1); + } + }); + } + } + + deferred.resolve(partners); + + return deferred.promise; + } } ]); } -- Gitblit v1.8.0