Browse Source

Merge pull request 'dev-wahyu' (#65) from dev-wahyu into staging

Reviewed-on: ordo/adw-gantt#65
pull/1/head
farhantock 11 months ago
parent
commit
a52605e8a2
  1. 9
      view-mode/function/ganttSettings.js
  2. 3
      view-mode/function/overlaySCurve.js
  3. 4
      view-mode/index.html

9
view-mode/function/ganttSettings.js

@ -77,15 +77,6 @@ $(document).ready(function() {
} }
} }
} }
else {
// default
// console.log('default');
// $('#select_dayoff option[value="0"]').prop("selected", "selected"); // Sunday
// $('#select_dayoff option[value="6"]').prop("selected", "selected"); // Saturday
// $("#select_dayoff").choices.setValue([0, 6]);
selectDayOffChoices.setChoiceByValue('0');
selectDayOffChoices.setChoiceByValue('6');
}
} }
}else{ }else{
// closeDialog('failed upload') // closeDialog('failed upload')

3
view-mode/function/overlaySCurve.js

@ -98,11 +98,14 @@ function getChartScaleRange(){
function getProgressLine(){ function getProgressLine(){
// As long as the progress data length is same with chart scale range (period) then it's fine. // As long as the progress data length is same with chart scale range (period) then it's fine.
getSCurveData(); getSCurveData();
// console.log("apa ", return_first);
var cumulativePlannedDurations = return_first.data[0].data.percentagePlan; var cumulativePlannedDurations = return_first.data[0].data.percentagePlan;
var cumulativeRealDurations = return_first.data[0].data.percentageReal; var cumulativeRealDurations = return_first.data[0].data.percentageReal;
cumulativeRealDurations[cumulativeRealDurations.length - 1] = Math.ceil(cumulativeRealDurations[cumulativeRealDurations.length - 1]);
var maxPlan = cumulativePlannedDurations[cumulativePlannedDurations.length - 1] var maxPlan = cumulativePlannedDurations[cumulativePlannedDurations.length - 1]
var maxReal = cumulativeRealDurations[cumulativeRealDurations.length - 1] var maxReal = cumulativeRealDurations[cumulativeRealDurations.length - 1]
var dates = return_first.data[0].data.date; var dates = return_first.data[0].data.date;
//jika summary s curve
if (maxReal > 100 || maxPlan > 100) { if (maxReal > 100 || maxPlan > 100) {
var plannedDurations = cumulativePlannedDurations.map((item) => { var plannedDurations = cumulativePlannedDurations.map((item) => {
return item/maxPlan*100; return item/maxPlan*100;

4
view-mode/index.html

@ -12,8 +12,8 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bbbootstrap/libraries@main/choices.min.css"> <link rel="stylesheet" href="https://cdn.jsdelivr.net/gh/bbbootstrap/libraries@main/choices.min.css">
<script src="../codebase/dhtmlxganttpro.js?v=7.1.8"></script> <script src="../codebase/dhtmlxgantt801.js?v=8.0.1"></script>
<link rel="stylesheet" href="../codebase/dhtmlxgantt.css?v=7.1.8"> <link rel="stylesheet" href="../codebase/dhtmlxgantt801.css?v=8.0.1">
<link rel="stylesheet" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css"> <link rel="stylesheet" href="https://cdn.datatables.net/1.11.3/css/jquery.dataTables.min.css">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css" <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.4/css/all.min.css"
integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ==" integrity="sha512-1ycn6IcaQQ40/MKBW2W4Rhis/DbILU74C1vSrLJxCq57o941Ym01SwNsOMqvEBFlcgUa6xLiPY/NS5R+E6ztJQ=="

Loading…
Cancel
Save