diff --git a/edit-mode/function/reportActivity.js b/edit-mode/function/reportActivity.js index e9d58aa..c0771f6 100644 --- a/edit-mode/function/reportActivity.js +++ b/edit-mode/function/reportActivity.js @@ -588,6 +588,10 @@ $(document).ready(function () { assignMaterialId = $(this).data('id'); materialName = $(this).data('material-name'); + var attributeString = this.outerHTML; + if (attributeString.includes('"=""')) { + materialName = materialName + '"'; + } // console.log(" okeee ",{ assignMaterialId, activityId, materialName }); $("#report_activity_material_title").html(`Report Activity Actual ${materialName}`) $("#modal_report_activity").hide(); @@ -619,6 +623,10 @@ $(document).ready(function () { $("#table_report").on("click", ".btn-lihat-plan", function () { assignMaterialId = $(this).data('id'); materialName = $(this).data('material-name'); + var attributeString = this.outerHTML; + if (attributeString.includes('"=""')) { + materialName = materialName + '"'; + } // console.log(" okeee ",{ assignMaterialId, activityId, materialName }); $("#report_activity_material_title").html(`Report Activity Plan ${materialName}`) $("#modal_report_activity").hide(); diff --git a/view-mode/function/ganttConfig.js b/view-mode/function/ganttConfig.js index 1b62b0f..1ce3594 100644 --- a/view-mode/function/ganttConfig.js +++ b/view-mode/function/ganttConfig.js @@ -379,7 +379,7 @@ gantt.templates.task_class = function (start, end, task) { return classes.join(' '); } }; - +let dataOverdue = []; gantt.templates.rightside_text = function (start, end, task) { if (task.planned_end) { if (end.getTime() > task.planned_end.getTime()) { @@ -398,6 +398,15 @@ gantt.templates.rightside_text = function (start, end, task) { end_date: end, task: task }, 'day'); + let found = dataOverdue.find((element) => element.id == task.id); + if (!found) { + dataOverdue.push({ + id: task.id, + text: task.text, + overdue: overdue + }) + } + window.parent.postMessage({ type: 'dataOverdueUpdate', dataOverdue: dataOverdue }, '*'); var text = "Overdue: " + overdue + " days"; return text; } @@ -493,7 +502,7 @@ var zoomConfig = { ] }; gantt.ext.zoom.init(zoomConfig); -gantt.ext.zoom.setLevel("week"); +gantt.ext.zoom.setLevel("month"); function zoomIn(){ gantt.ext.zoom.zoomIn();