Index: arms/js/reqGantt.js =================================================================== diff -u -ra72ca8934c3ff330832fcaf5555afeb781073d54 -re51fec74971306793fd2a75a4d74f3a1b61b8d40 --- arms/js/reqGantt.js (.../reqGantt.js) (revision a72ca8934c3ff330832fcaf5555afeb781073d54) +++ arms/js/reqGantt.js (.../reqGantt.js) (revision e51fec74971306793fd2a75a4d74f3a1b61b8d40) @@ -745,13 +745,16 @@ .addClass("active"); } - $("#editview_req_state").children(".btn.active").removeClass("active"); - if (!isEmpty(ajaxData.reqStateEntity)) { - var selectReqStateID = "editview_req_state_options" + ajaxData.reqStateEntity.c_id; - $("#" + selectReqStateID) - .parent() - .addClass("active"); - } + $("#editview_req_state input[name='editview_req_state_options']:checked").prop("checked", false); + let stateRadioButtons = $("#editview_req_state input[type='radio']"); + stateRadioButtons.each(function () { + if (ajaxData.reqStateEntity && ajaxData.reqStateEntity.c_id == $(this).val()) { + $(this).parent().addClass("active"); + $(this).prop("checked", true); + } else { + $(this).prop("checked", false); + } + }); // -------------------- reviewer setting -------------------- // //reviewer clear @@ -1043,8 +1046,11 @@ ? "5" : $("#addview_req_priority .btn.active input").val(); let select_req_difficulty_link = $("#addview_req_difficulty .btn.active input").val() === undefined ? "5" : $("#addview_req_difficulty .btn.active input").val(); - let select_req_state_link = $("#addview_req_state .btn.active input").val() === undefined - ? "10" : $("#addview_req_state .btn.active input").val(); + let select_req_state_link = $("#addview_req_state input[name='addview_req_state_options']:checked").val(); + if (select_req_state_link === undefined) { + alert("요구사항 상태가 선택되지 않았습니다."); + return false; + } let start_date_value = $("#addview_req_start_date").val(); let c_req_start_date; @@ -1582,7 +1588,6 @@ priority: cur.state, custom_class: cur.status, // optional type: cur.c_type, - etc: cur.c_req_etc, manager: cur.c_req_manager, result: cur.c_req_output, level: cur.c_level, @@ -1599,11 +1604,20 @@ common_object.end = getDate(cur.c_req_end_date); } - if (cur.c_type === "folder") { - common_object.etc = "폴더"; + if (cur && cur.c_type === "folder") { + common_object.etc = ` 폴더`; } else { - common_object.etc = cur.reqStateEntity.c_title; + // 비고란 아이콘 및 상태명 + if (cur.reqStateEntity && cur.reqStateEntity.c_title && cur.reqStateEntity.reqStateCategoryEntity && cur.reqStateEntity.reqStateCategoryEntity.c_category_icon) { + // 카테고리 연결 상태 + common_object.etc = cur.reqStateEntity.reqStateCategoryEntity.c_category_icon + " "+ cur.reqStateEntity.c_title; + } + else if (cur.reqStateEntity && cur.reqStateEntity.c_title) { + // 카테고리 미 연결 상태 + common_object.etc = cur.reqStateEntity.c_title; + } + common_object.total_resource = cur.c_req_total_resource == null ? 0 : cur.c_req_total_resource; common_object.plan_resource = cur.c_req_plan_resource == null ? 0 : cur.c_req_plan_resource; // common_object.total_resource = cur.c_req_total_time == null ? 0 : cur.c_req_total_time; @@ -1835,15 +1849,7 @@ data: "etc", title: "비고", render: (data, row) => { - let iconClass = mappingStateIconClass(data); - let iconWrapper = $("") - .addClass(iconClass); - - let textWrapper = $("") - .text(" " + data); - - let parentElement = $("
").append(iconWrapper).append(textWrapper); - + let parentElement = $("").append(data); return parentElement[0]; } }, @@ -1918,9 +1924,10 @@ // 모달 /////////////////////////////////////////////////////////////////////////////// function updateNodeModalOpen(item) { + req_state_setting("editview_req_state", false); + selectedId = item.id; selectedType = item.type; - // $(".widget-tabs").children("header").children("ul").children("li:nth-child(1)").hide(); //상세보기 $(".widget-tabs").children("header").children("ul").children("li:nth-child(1)").hide(); //편집하기 $(".widget-tabs").children("header").children("ul").children("li:nth-child(2)").hide(); //리스트보기 @@ -1960,6 +1967,8 @@ } function addNodeModalOpen(parentId) { + req_state_setting("addview_req_state", false); + //제품(서비스) 데이터 바인딩 parentIdOfSelected = parentId; var selectedPdServiceText = $("#selected_pdService").select2("data")[0].text; @@ -1989,7 +1998,7 @@ $("#addview_req_priority").children(".btn.active").removeClass("active"); $("#addview_req_difficulty").children(".btn.active").removeClass("active"); - $("#addview_req_state").children(".btn.active").removeClass("active"); + $("#addview_req_state input[name='addview_req_state_options']:checked").prop("checked", false); CKEDITOR.instances.add_tabmodal_editor.setData($("").text("요구사항 내용을 기록합니다."));