Index: arms/js/reqStatus.js
===================================================================
diff -u -r3bc58e3047d0d1fd29614ed446a56c086227e49e -r4203354817820765e430dc6b778054f2e7845057
--- arms/js/reqStatus.js (.../reqStatus.js) (revision 3bc58e3047d0d1fd29614ed446a56c086227e49e)
+++ arms/js/reqStatus.js (.../reqStatus.js) (revision 4203354817820765e430dc6b778054f2e7845057)
@@ -4,6 +4,9 @@
var selectedPdServiceId; // 제품(서비스) 아이디
var selectedVersionId; // 선택된 버전 아이디
var reqStatusDataTable;
+var reqIssueAndItsSubtasksTable;
+var reqIssueAlongWithTable;
+var deletedIssueTable;
var dataTableRef;
var selectedIssue; //선택한 이슈
@@ -301,11 +304,11 @@
}
// 통계로드
- statisticsLoad($("#selected_pdService").val(), selectedVersionId);
+ //statisticsLoad($("#selected_pdService").val(), selectedVersionId);
// 진행상태 가져오기
- progressLoad($("#selected_pdService").val(), selectedVersionId);
+ //progressLoad($("#selected_pdService").val(), selectedVersionId);
// 작업자 정보
- resourceLoad($("#selected_pdService").val(), selectedVersionId);
+ //resourceLoad($("#selected_pdService").val(), selectedVersionId);
var endPointUrl = "/T_ARMS_REQSTATUS_" + $("#selected_pdService").val() + "/requirement-linkedissue.do?version="+selectedVersionId;
// 이슈리스트 데이터테이블
@@ -349,11 +352,11 @@
console.log(selectedVersionId);
// 통계로드
- statisticsLoad($("#selected_pdService").val(), selectedVersionId);
+ //($("#selected_pdService").val(), selectedVersionId);
// 진행상태 가져오기
- progressLoad($("#selected_pdService").val(), selectedVersionId);
+ //progressLoad($("#selected_pdService").val(), selectedVersionId);
// 작업자 정보
- resourceLoad($("#selected_pdService").val(), selectedVersionId);
+ //resourceLoad($("#selected_pdService").val(), selectedVersionId);
var endPointUrl = "/T_ARMS_REQSTATUS_" + $("#selected_pdService").val() + "/requirement-linkedissue.do?version="+selectedVersionId;
// 이슈리스트 데이터테이블
@@ -621,7 +624,7 @@
"defaultContent": "
N/A
",
"targets": "_all"
}];
- var orderList = [[2, "asc"]];
+ var orderList = [[0, "asc"]];
var rowsGroupList = [];
var buttonList = [];
@@ -662,14 +665,14 @@
var columnList = [
{ name: "parentReqKey", title: "부모 요구사항 키", data: "parentReqKey", visible: false },
{
- className: "details-control",
+ name: "icon",
+ title: "",
+ data: null,
orderable: false,
- data: null,
- title: '',
- defaultContent: '',
render: function(data, type, row) {
return row.children && row.children.length > 0 ? '' : '';
},
+ className: "details-control",
visible: true
},
{
@@ -711,30 +714,32 @@
if (isEmpty(data) || data === "false") {
return "N/A
";
} else {
- let displayText = data;
- let color = "#f8f8f8"; // 기본 텍스트 색상
- if (row.deleted && row.deleted.deleted_isDeleted === true) {
- displayText = "" + data + "";
- } else if (row.deleted && row.deleted.deleted_isDeleted === false) {
- color = "#808080";
- }
- if (!isEmpty(row.isReq) && row.isReq == true) {
- color = "#a4c6ff";
- }
- // data-row 에 API에 맞는 param 설정 예정.
-
+ let displayText = data;
+ let color = "#f8f8f8"; // 기본 텍스트 색상
let btn_data_row1 = {
pdServiceVersions : row.pdServiceVersions.join(","),
cReqLink : row.creqLink
};
- return ("" + displayText +
- $("")
- .append($(''))
- .attr("data-toggle", "modal")
- .attr("data-target","#reqIssue_alongWith_modal")
- .attr("data-row", JSON.stringify(btn_data_row1)).prop("outerHTML") +
- "
");
-
+ // 삭제 여부
+ if (row.deleted && row.deleted.deleted_isDeleted === true) {
+ displayText = "" + data + "";
+ }
+ else if (row.deleted && row.deleted.deleted_isDeleted === false) {
+ color = "#808080";
+ }
+ // 요구사항 이슈 여부
+ if (!isEmpty(row.isReq) && row.isReq === true) {
+ color = "#a4c6ff";
+ return ("" + displayText +
+ $("")
+ .append($(''))
+ .attr("data-toggle", "modal")
+ .attr("data-target","#reqIssue_alongWith_modal")
+ .attr("data-row", JSON.stringify(btn_data_row1)).prop("outerHTML") +
+ "
");
+ } else {
+ return ("" + displayText + "
");
+ }
}
return data;
},
@@ -1088,10 +1093,13 @@
// 데이터 테이블 데이터 렌더링 이후 콜백 함수.
function dataTableCallBack(settings, json) {
- console.log("check");
+ console.log("check");
+ if (settings.nTable.id !== "reqstatustable") {
+ return;
+ }
// 테이블 행 클릭 이벤트 (하위 이슈 조회)
- $('#reqstatustable tbody').on('click', 'td.details-control', function() {
+ $('#reqstatustable tbody').off('click', 'td.details-control').on('click', 'td.details-control', function() {
const tr = $(this).closest('tr');
const row = reqStatusDataTable.row(tr);
const icon = $(this).find('i');
@@ -1571,7 +1579,7 @@
var isServerSide = false;
var errorMode = false;
- reqStatusDataTable = dataTable_build(
+ reqIssueAndItsSubtasksTable = dataTable_build(
jquerySelector,
ajaxUrl,
jsonRoot,
@@ -1815,7 +1823,7 @@
var isServerSide = false;
var errorMode = false;
- reqStatusDataTable = dataTable_build(
+ reqIssueAlongWithTable = dataTable_build(
jquerySelector,
ajaxUrl,
jsonRoot,
@@ -2021,7 +2029,7 @@
var selectList = {};
var isServerSide = false;
- reqStatusDataTable = dataTable_build(
+ deletedIssueTable = dataTable_build(
jquerySelector,
ajaxUrl,
jsonRoot,
@@ -2046,7 +2054,7 @@
const checkboxes = document.querySelectorAll('.rowCheckbox:checked');
checkboxes.forEach(checkbox => {
- const rowData = reqStatusDataTable.row(checkbox.closest('tr')).data();
+ const rowData = deletedIssueTable.row(checkbox.closest('tr')).data();
checkedData.push(rowData);
});