Browse Source

temp: reenable editor

pull/1/head
Muhammad Sulaiman Yusuf 2 years ago
parent
commit
5c019beaaf
  1. 10
      edit-mode/function/ganttConfig.js

10
edit-mode/function/ganttConfig.js

@ -347,14 +347,17 @@ var allColumns = [
</div>`
} },
// { name: "status", label: "Status", align: "center", editor: editor.status, resize: true },
{ name: "bobot_planning", label: "Bobot Activity (%)", align: "center", resize: true, min_width: 115, template: function (text) {
{ name: "bobot_planning", label: "Bobot Activity (%)", align: "center", editor: editor.bobot_planning, resize: true, min_width: 115, template: function (text) {
if(text.bobot_planning > 100){
gantt.alert("Bobot tidak boleh lebih dari 100%!");
}
if(!text.bobot_planning){
return
}
let bobot_planning = parseFloat(text.bobot_planning);
return roundToTwo(bobot_planning);
} },
{ name: "progress", label: "Actual Progress (%)", align: "center", min_width: 125, template: function (text) {
{ name: "progress", label: "Actual Progress (%)", align: "center", editor: progressEditor ,min_width: 125, template: function (text) {
let progress = text.progress
progress = progress*100
return roundToTwo(progress);
@ -362,6 +365,9 @@ var allColumns = [
{ name:"progress_actual", label: "Total Actual Progress (%)", align: "center", min_width: 150, template: function (text) {
let progress = text.progress
progress = progress*100
if(progress > 100){
gantt.alert("Bobot tidak boleh lebih dari 100%!");
}
let bobot = text.bobot_planning
let actual = (progress*bobot) / 100
return roundToTwo(actual);

Loading…
Cancel
Save