Commit a0e1d90d by Ha Jonguk

プロジェクト一覧の定期点検対応

parent e9d85210
......@@ -520,16 +520,33 @@ HOME_CHECK.renderAddProject = function(post) {
id: "list_" + post.projectId,
class: "read"
});
var taskInfo = $("<div/>", {class: "taskInfoDiv"});
var codeAndExpiration = $("<ul/>", {class: "codeAndExpiration"});
var startDate = "-/-/-";
var endDate = "-/-/-";
startDate = post.projectStartDate.replace(/-/g, '/');
endDate = post.projectEndDate.replace(/-/g, '/');
var taskInfo = $("<div/>", {class: "taskInfoDiv"});
var codeAndExpiration = $("<ul/>", {class: "codeAndExpiration"});
var dateStr = " ~ ";
var periodStr = "期間:";
var isInspect = post.projectReportType == "1";
var hasInspectTask = post.reportStartDate && post.reportEndDate;
if (isInspect) {
periodStr = "作業期間:";
if (hasInspectTask) {
startDate = post.reportStartDate.replace(/-/g, '/');
endDate = post.reportEndDate.replace(/-/g, '/');
dateStr = periodStr + startDate + dateStr + endDate;
} else {
dateStr = periodStr + "作業データがありません。";
}
} else {
startDate = post.projectStartDate.replace(/-/g, '/');
endDate = post.projectEndDate.replace(/-/g, '/');
dateStr = periodStr + startDate + dateStr + endDate;
}
codeAndExpiration.append($("<li/>", {class: "period"}).text(dateStr));
codeAndExpiration.append($("<li/>", {class: "period"}).text("期間:" + startDate + " ~ " + endDate));
taskInfo.append(codeAndExpiration);
taskInfo.append($("<p/>").text(post.projectName));
......@@ -539,19 +556,23 @@ HOME_CHECK.renderAddProject = function(post) {
var actionBtnDiv = $("#actionBtnDiv").clone().attr("id", post.projectId + "_actionBtnDiv");
actionBtnDiv.css("display", "flex");
$(actionBtnDiv.children()[0]).on("click", function() {
//CHK.reportMode = "1";
HOME_CHECK.createSession(post.projectId, post.projectType, post.projectReportType);
});
$(actionBtnDiv.children()[1]).hide();
if (isInspect && !hasInspectTask) {
$(actionBtnDiv.children()[0]).find('img').attr("src","img/check/icon_working_off.png");
} else {
$(actionBtnDiv.children()[0]).on("click", function() {
//CHK.reportMode = "1";
HOME_CHECK.createSession(post.projectId, post.projectType, post.projectReportType);
});
}
$(actionBtnDiv.children()[1]).hide();
if (post.relatedContentList.length > 0) {
$(actionBtnDiv.children()[2]).on("click", function() {
HOME_CHECK.initContentView(post.relatedContentList, null, post.projectName);
});
} else {
$(actionBtnDiv.children()[2]).find('img').attr("src","img/check/ic_common_content_off.png");
$(actionBtnDiv.children()[2]).find('img').attr("src","img/check/icon_document_reference_off.png");
$(actionBtnDiv.children()[2]).prop("disabled", true);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment