Browse Source

Merge pull request 'dev-wahyu' (#69) from dev-wahyu into staging

Reviewed-on: ordo/adw-gantt#69
pull/1/head
farhantock 1 year ago
parent
commit
dd3a773749
  1. 8
      edit-mode/function/reportActivity.js
  2. 13
      view-mode/function/ganttConfig.js

8
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();

13
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 = "<b style='color: red;'>Overdue: " + overdue + " days</b>";
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();

Loading…
Cancel
Save