Browse Source

update log and alert

pull/1/head
ibnu 11 months ago
parent
commit
6b0ca97b8f
  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) { 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); let bobot = parseFloat(text.bobot_planning);
console.log("bobot roundToTwo ", roundToTwo(bobot));
console.log("bobot toFixed ", bobot.toFixed(2));
if (bobot.toFixed(2) > 100) { if (bobot.toFixed(2) > 100) {
gantt.alert("Bobot tidak boleh lebih dari 100%!"); gantt.alert("Bobot tidak boleh lebih dari 100%!");
return; return;
} }
@ -480,10 +483,14 @@ var allColumns = [
name: "progress_actual", label: "Total Actual Progress (%)", align: "center", min_width: 150, template: function (text) { name: "progress_actual", label: "Total Actual Progress (%)", align: "center", min_width: 150, template: function (text) {
let progress = text.progress let progress = text.progress
progress = progress * 100 progress = progress * 100
console.log("progress roundToTwo ", roundToTwo(progress));
console.log("progress toFixed ", progress.toFixed(2));
if (progress.toFixed(2) > 100) { if (progress.toFixed(2) > 100) {
gantt.alert("Bobot tidak boleh lebih dari 100%!"); gantt.alert("Progress tidak boleh lebih dari 100%!");
return; return;
} }
let bobot = text.bobot_planning let bobot = text.bobot_planning
let actual = (progress * bobot) / 100 let actual = (progress * bobot) / 100
return roundToTwo(actual); return roundToTwo(actual);

Loading…
Cancel
Save