|
|
|
@ -114,13 +114,13 @@ var colHeader = '<div class="gantt_grid_head_cell"><i style="margin-right:5px;"
|
|
|
|
|
colContent = function (task) { |
|
|
|
|
var hasChild = gantt.hasChild(task.id); |
|
|
|
|
var optionsContent = '<div class="align-left">'; |
|
|
|
|
optionsContent += '<i title="Add Activity" class="fa gantt_button_grid gantt_grid_add fa-plus icon-action f-blue-sky" onclick="clickGridButton(' + task.id + ', \'add\')"></i> '; |
|
|
|
|
optionsContent += '<i title="Delete Activity" class="fa gantt_button_grid gantt_grid_delete fa-times icon-action f-red" onclick="clickGridButton(' + task.id + ', \'delete\')"></i> '; |
|
|
|
|
optionsContent += '<i title="Set Baseline Activity" class="fa gantt_button_grid gantt_grid_delete fa-grip-lines icon-action f-blue-sky" onclick="clickGridButton(' + task.id + ', \'set-baseline-activity\')"></i> '; |
|
|
|
|
optionsContent += '<i title="Add Milestone" class="fa gantt_button_grid gantt_grid_add fab fa-jira icon-action f-black" onclick="addMilestone(' + task.id + ')"></i> '; |
|
|
|
|
optionsContent += !hasChild ? '<i title="Upload Document" class="fa gantt_button_grid gantt_grid_delete fa-file icon-action f-orange" onclick="clickGridButton(' + task.id + ', \'upload\')"></i> ' : ''; |
|
|
|
|
optionsContent += !hasChild ? '<i title="Show Comments" class="fa gantt_button_grid gantt_grid_delete fa-comment icon-action f-black" onclick="clickGridButton(' + task.id + ', \'comment\')"></i> ' : ''; |
|
|
|
|
optionsContent += !hasChild ? '<i title="Activity Location" class="fa fas gantt_button_grid gantt_grid_delete fa-map-marked icon-action f-green" onclick="openActivityMap(' + task.id + ')"></i> ' : ''; |
|
|
|
|
optionsContent += '<i title="Add Activity ' + task.name + '" class="fa gantt_button_grid gantt_grid_add fa-plus icon-action f-blue-sky" onclick="clickGridButton(' + task.id + ', \'' + task.name + '\', \'add\')"></i> '; |
|
|
|
|
optionsContent += '<i title="Delete Activity ' + task.name + '" class="fa gantt_button_grid gantt_grid_delete fa-times icon-action f-red" onclick="clickGridButton(' + task.id + ', \'' + task.name + '\', \'delete\')"></i> '; |
|
|
|
|
optionsContent += '<i title="Set Baseline Activity ' + task.name + '" class="fa gantt_button_grid gantt_grid_delete fa-grip-lines icon-action f-blue-sky" onclick="clickGridButton(' + task.id + ', \'' + task.name + '\', \'set-baseline-activity\')"></i> '; |
|
|
|
|
optionsContent += '<i title="Add Milestone ' + task.name + '" class="fa gantt_button_grid gantt_grid_add fab fa-jira icon-action f-black" onclick="addMilestone(' + task.id + ')"></i> '; |
|
|
|
|
optionsContent += !hasChild ? '<i title="Upload Document ' + task.name + '" class="fa gantt_button_grid gantt_grid_delete fa-file icon-action f-orange" onclick="clickGridButton(' + task.id + ', \'' + task.name + '\', \'upload\')"></i> ' : ''; |
|
|
|
|
optionsContent += !hasChild ? '<i title="Show Comments ' + task.name + '" class="fa gantt_button_grid gantt_grid_delete fa-comment icon-action f-black" onclick="clickGridButton(' + task.id + ', \'' + task.name + '\', \'comment\')"></i> ' : ''; |
|
|
|
|
optionsContent += !hasChild ? '<i title="Activity Location ' + task.name + '" class="fa fas gantt_button_grid gantt_grid_delete fa-map-marked icon-action f-green" onclick="openActivityMap(' + task.id + ')"></i> ' : ''; |
|
|
|
|
optionsContent += '</div>'; |
|
|
|
|
return (optionsContent); |
|
|
|
|
}; |
|
|
|
@ -238,7 +238,7 @@ function addWithParent(id) {
|
|
|
|
|
no = no + 1; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
function clickGridButton(id, action) { |
|
|
|
|
function clickGridButton(id, name, action) { |
|
|
|
|
switch (action) { |
|
|
|
|
case "edit": |
|
|
|
|
gantt.showLightbox(id); |
|
|
|
@ -257,7 +257,7 @@ function clickGridButton(id, action) {
|
|
|
|
|
}); |
|
|
|
|
break; |
|
|
|
|
case "set-baseline-activity": |
|
|
|
|
setBaselineActivity(id); |
|
|
|
|
setBaselineActivity(id, name); |
|
|
|
|
break; |
|
|
|
|
case "upload": |
|
|
|
|
showDocuments(id); |
|
|
|
@ -347,10 +347,7 @@ var allColumns = [
|
|
|
|
|
{ |
|
|
|
|
name: "bobot_planning", label: "Bobot (%)", align: "center", editor: editor.bobot_planning, resize: true, min_width: 115, template: function (text) { |
|
|
|
|
let bobot = parseFloat(text.bobot_planning); |
|
|
|
|
console.log("bobot roundToTwo ", roundToTwo(bobot)); |
|
|
|
|
console.log("bobot toFixed ", bobot.toFixed(2)); |
|
|
|
|
if (bobot.toFixed(2) > 100) { |
|
|
|
|
|
|
|
|
|
gantt.alert("Bobot tidak boleh lebih dari 100%!"); |
|
|
|
|
return; |
|
|
|
|
} |
|
|
|
@ -512,9 +509,6 @@ var allColumns = [
|
|
|
|
|
name: "progress_actual", label: "Total Actual Progress (%)", align: "center", min_width: 150, template: function (text) { |
|
|
|
|
let progress = text.progress |
|
|
|
|
progress = progress * 100 |
|
|
|
|
|
|
|
|
|
console.log("progress roundToTwo ", roundToTwo(progress)); |
|
|
|
|
console.log("progress toFixed ", progress.toFixed(2)); |
|
|
|
|
if (progress.toFixed(2) > 100) { |
|
|
|
|
gantt.alert("Progress tidak boleh lebih dari 100%!"); |
|
|
|
|
return; |
|
|
|
|