diff --git a/src/function/ganttConfig.js b/src/function/ganttConfig.js index 503c2ef..d4cb84b 100644 --- a/src/function/ganttConfig.js +++ b/src/function/ganttConfig.js @@ -296,7 +296,6 @@ var allColumns = [ if(text.type=="project" || text.type=="milestone"){ return; } - activityName = text.kode_sortname || text.text; let html = ``; var assign_material = text.assign_material @@ -355,8 +354,6 @@ var allColumns = [ if(text.type=="project" || text.type=="milestone"){ return; } - activityName = text.kode_sortname || text.text; - $("#report_activity_title").html(`Report Activity ${activityName}`) let html = text.jobs_done ? text.jobs_done : 0; return `
${html} diff --git a/src/function/ganttEvent.js b/src/function/ganttEvent.js index cae6cc4..92c72fd 100644 --- a/src/function/ganttEvent.js +++ b/src/function/ganttEvent.js @@ -12,6 +12,8 @@ gantt.attachEvent("onAfterTaskAdd", function(id,item){ gantt.attachEvent("onTaskRowClick", function(id,row){ activityId = id; + var activity = gantt.getTaskBy("id", id); + activityName = activity[0].name; }); gantt.ext.inlineEditors.attachEvent("onBeforeEditStart", function(state){ diff --git a/src/function/reportActivity.js b/src/function/reportActivity.js index 02a82dd..b404248 100644 --- a/src/function/reportActivity.js +++ b/src/function/reportActivity.js @@ -266,8 +266,8 @@ $(document).ready(function () { }); $('#modal_report_activity').on('show.bs.modal', function (event) { + $("#report_activity_title").html(`Report Activity ${activityName}`) tableRa.draw(); - console.log("oke"); }); $('#modal_report_activity_material').on('show.bs.modal', function (event) {