Browse Source

Merge pull request 'dev-ibnu' (#67) from dev-ibnu into staging

Reviewed-on: ordo/adw-gantt#67
pull/1/head
ibnu 11 months ago
parent
commit
a7487e4d07
  1. 9
      edit-mode/function/ganttConfig.js

9
edit-mode/function/ganttConfig.js

@ -320,7 +320,10 @@ 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;
}
@ -480,10 +483,14 @@ 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("Bobot tidak boleh lebih dari 100%!");
gantt.alert("Progress tidak boleh lebih dari 100%!");
return;
}
let bobot = text.bobot_planning
let actual = (progress * bobot) / 100
return roundToTwo(actual);

Loading…
Cancel
Save