Index: arms/js/analysisGantt.js =================================================================== diff -u -rfb21200676544040af6e6794fb9f7076dfb287c3 -r4a4ca2d009e6b675d84add5bc72cc4819484154d --- arms/js/analysisGantt.js (.../analysisGantt.js) (revision fb21200676544040af6e6794fb9f7076dfb287c3) +++ arms/js/analysisGantt.js (.../analysisGantt.js) (revision 4a4ca2d009e6b675d84add5bc72cc4819484154d) @@ -172,7 +172,7 @@ var selectedService = $("#selected_pdService").select2("data")[0].text; $("#select_PdService").text(selectedService); - $("#select_Service").text(selectedService); // 선택된 제품(서비스) + $("#select_Service").text(selectedService); // 선택된 제품(서비스) //~> 이벤트 연계 함수 :: Version 표시 jsTree 빌드 bind_VersionData_By_PdService(); @@ -338,7 +338,7 @@ var dataTableRef; - if(selectedType !== "folder") { + if (selectedType !== "folder") { //select node 정보를 가져온다. console.log("tableName:: " + tableName); $.ajax({ @@ -382,7 +382,7 @@ } }) .done(function (data) { - $('#my_modal').modal('show'); + $("#my_modal").modal("show"); $("#folder_tab").get(0).click(); $(".newReqDiv").show(); $(".widget-tabs").children("header").children("ul").children("li:nth-child(1)").show(); //상세보기 @@ -392,7 +392,7 @@ }) .fail(function (e) {}) .always(function () {}); - }else{ + } else { console.log("folder clicked"); var columnList = [ { data: "c_id", defaultContent: "-" }, @@ -406,7 +406,7 @@ var buttonList = []; var jquerySelector = "#req_table"; - var ajaxUrl = "/auth-user/api/arms/reqAdd/" + tableName + "/getChildNodeWithParent.do?c_id="+selectId; + var ajaxUrl = "/auth-user/api/arms/reqAdd/" + tableName + "/getChildNodeWithParent.do?c_id=" + selectId; var jsonRoot = ""; var isServerSide = false; @@ -422,7 +422,6 @@ buttonList, isServerSide ); - } } @@ -443,10 +442,10 @@ var checkboxHtml = '" + - "
" + - iconHtml + - " " + - value.c_title + - "

" + - value.c_contents + - "

" + - "
" + - "" + "T_ARMS_REQ_" + + value.c_id + + "' data-id='" + + value.c_id + + "'>" + + "
" + + iconHtml + + " " + + value.c_title + + "

" + + value.c_contents + + "

" + + "
" + + "" ); firstBranchChecker = false; } else { $("#T_ARMS_REQ_" + value.c_parentid).append( "
    " + + "
  1. " + + "
    " + + iconHtml + + " " + + value.c_title + + "

    " + + value.c_contents + + "

    " + + "
    " + + "
  2. " + + "
" + ); + } + } else { + $("#T_ARMS_REQ_" + value.c_parentid).append( + "
    " + "
  1. " + - "
  2. " + - "
    " + - iconHtml + - " " + - value.c_title + - "

    " + - value.c_contents + - "

    " + - "
    " + - "
  3. " + - "
" ); } }); @@ -1038,11 +1034,11 @@ function formatUser(jsonData) { var $container = $( "
" + - "
" + - "
" + - "
" + - "
" + - "
" + "
" + + "
" + + "
" + + "
" + + "" ); $container.find(".select2-result-jsonData__username").text(jsonData.username); @@ -1328,21 +1324,18 @@ $(".edit_btn_group").addClass("hidden"); $(".jira_btn_group").addClass("hidden"); $(".newReqDiv").hide(); - - } else if (target == "#edit") { $(".edit_btn_group").removeClass("hidden"); $(".jira_btn_group").addClass("hidden"); $(".newReqDiv").hide(); - } else if (target == "#jira") { $(".edit_btn_group").addClass("hidden"); $(".jira_btn_group").removeClass("hidden"); $(".newReqDiv").hide(); console.log("jira tab click event"); //1-1. 제품(서비스) 아이디를 기준으로, -- $('#selected_pdService').val() - console.log("selected_pdService::::" + $('#selected_pdService').val()); // service id + console.log("selected_pdService::::" + $("#selected_pdService").val()); // service id console.log("selectedId::::" + selectedId); // jsTree ID //1-2. 요구사항 jsTree ID 가져와서 -- selectedId @@ -1351,25 +1344,21 @@ //제품 서비스 셀렉트 박스 데이터 바인딩 //요구사항 클릭하면 자세히보기 탭으로 가니까 이 로직은 유효하다. - var tableName = "T_ARMS_REQADD_" + $("#selected_pdService").val(); console.log("jira selectedId" + selectedId); console.log("jira tableName" + tableName); - console.log("jira datatables_jira_project 완료 " ); - + console.log("jira datatables_jira_project 완료 "); } else if (target == "#report") { $(".newReqDiv").show(); $(".edit_btn_group").addClass("hidden"); - }else if (target == "#doc") { + } else if (target == "#doc") { $(".edit_btn_group").addClass("hidden"); $(".jira_btn_group").addClass("hidden"); $(".newReqDiv").hide(); - } else if (target == "#history") { $(".edit_btn_group").addClass("hidden"); $(".jira_btn_group").addClass("hidden"); $(".newReqDiv").hide(); - } }); } @@ -1386,18 +1375,18 @@ // $("input:checkbox[name=jiraVerList]:checked").each(function (i, iVal) { // chk_Val.push(iVal.value); // }); - console.log(" jiraCheckId :: "+JSON.stringify(jiraCheckId)); + console.log(" jiraCheckId :: " + JSON.stringify(jiraCheckId)); //반영할 테이블 네임 값 셋팅 var tableName = "T_ARMS_REQADD_" + $("#selected_pdService").val(); // check box 값 = jiraCheckId $.ajax({ url: "/auth-user/api/arms/reqAdd/" + tableName + "/updateNode.do", data: { - c_id: selectedId, // reqAdd id - c_req_pdservice_versionset_link: "[]", //c_req_pdservice_versionset_link + c_id: selectedId, // reqAdd id + c_req_pdservice_versionset_link: "[]", //c_req_pdservice_versionset_link c_jira_link: "independent", - c_req_etc: JSON.stringify(jiraCheckId) //c_req_etc, c_jira_ver_link + c_req_etc: JSON.stringify(jiraCheckId) //c_req_etc, c_jira_ver_link }, type: "POST", progress: true @@ -1422,38 +1411,40 @@ // Gantt Chart /////////////////////////////////////////////////////////////////////////////// function setGanttTasks(data) { - return data.sort((a, b) => a.c_issue_create_date - b.c_issue_create_date).reduce((acc, cur) => { - const task = { - id: String(cur.c_id), - assignee: cur.c_issue_assignee, - reporter: cur.c_issue_reporter, - name: cur.c_title, - start: getDate(cur.c_req_start_date), - end: getDate(cur.c_req_end_date), - progress: 20, - dependencies: `${cur.c_parentid}`, - priority: cur.c_issue_priority_name, - custom_class: cur.c_issue_priority_name, // optional - type: cur.c_type, - etc: cur.c_etc, - tmm: '', - p_work: '', - t_period: '', - tpp: '', - result: '', - plan: '', - performance: '', - level: cur.c_level - } + return data + .sort((a, b) => a.c_parentid - b.c_parentid || a.c_issue_create_date - b.c_issue_create_date) + .reduce((acc, cur) => { + const task = { + id: String(cur.c_id), + assignee: cur.c_issue_assignee, + reporter: cur.c_issue_reporter, + name: cur.c_title, + start: getDate(cur.c_req_start_date), + end: getDate(cur.c_req_end_date), + progress: 20, + dependencies: `${cur.c_parentid}`, + priority: cur.c_issue_priority_name, + custom_class: cur.c_issue_priority_name, // optional + type: cur.c_type, + etc: cur.c_etc, + tmm: "", + p_work: "", + t_period: "", + tpp: "", + result: "", + plan: "", + performance: "", + level: cur.c_level + }; - if (cur.c_parentid === 2) { - acc.push(task); - } else { - acc.splice((acc.findIndex(item => item.id === cur.c_parentid) + 1), 0, task); - } + if (cur.c_parentid === 2) { + acc.push(task); + } else { + acc.splice(acc.findIndex((item) => item.id === cur.c_parentid) + 1, 0, task); + } - return acc; - }, []); + return acc; + }, []); } function getStatusMonitorData(selectId, endPointUrl) { @@ -1468,24 +1459,24 @@ 200: function (data) { if (!isEmpty(data)) { // const tasks = setGanttTasks(data); - console.log('####################### setGanttTasks ::', setGanttTasks(data)) + console.log("####################### setGanttTasks ::", setGanttTasks(data)); gantt = new Gantt( "#gantt-target", setGanttTasks(data), { language: "kr" }, { - name: '작업', - etc: '비고', + name: "작업", + etc: "비고", start: "시작일", end: "완료일", - tmm: '총 작업량', - p_work: '계획작업', - t_period: '총 기간', - tpp: '계획기간', + tmm: "총 작업량", + p_work: "계획작업", + t_period: "총 기간", + tpp: "계획기간", assignee: "담당", - result: '산출물', - plan: '계획', - performance: '실적' + result: "산출물", + plan: "계획", + performance: "실적" }, modalOpen ); @@ -1512,7 +1503,7 @@ function modalOpen(item) { selectedId = item.id; selectedType = item.type; - if (item.type === 'default') setDetailAndEditViewTab(); + if (item.type === "default") setDetailAndEditViewTab(); else dataTableLoad(); } @@ -1528,4 +1519,4 @@ $(".modal-body") .find(".cke_contents:eq(0)") .css("height", height + "px"); -} \ No newline at end of file +} Index: reference/jquery-plugins/gantt-0.6.1/src/gantt.scss =================================================================== diff -u -r86899af947e6d368e84ef9845527d306059ffa24 -r4a4ca2d009e6b675d84add5bc72cc4819484154d --- reference/jquery-plugins/gantt-0.6.1/src/gantt.scss (.../gantt.scss) (revision 86899af947e6d368e84ef9845527d306059ffa24) +++ reference/jquery-plugins/gantt-0.6.1/src/gantt.scss (.../gantt.scss) (revision 4a4ca2d009e6b675d84add5bc72cc4819484154d) @@ -67,7 +67,7 @@ @for $i from 1 through 3 { &.indent-#{$i} { - padding-left: 20px * $i + padding-left: 20px * $i; } } } Index: reference/jquery-plugins/gantt-0.6.1/src/table.js =================================================================== diff -u -r86899af947e6d368e84ef9845527d306059ffa24 -r4a4ca2d009e6b675d84add5bc72cc4819484154d --- reference/jquery-plugins/gantt-0.6.1/src/table.js (.../table.js) (revision 86899af947e6d368e84ef9845527d306059ffa24) +++ reference/jquery-plugins/gantt-0.6.1/src/table.js (.../table.js) (revision 4a4ca2d009e6b675d84add5bc72cc4819484154d) @@ -39,7 +39,7 @@ const $td = document.createElement('td'); $td.textContent = task[content]; - if (content === 'name' && (task.level > 2)) { + if (content === 'name' && task.level > 2) { $td.className = `indent-${task.level}`; }