|
|
|
@ -52,7 +52,7 @@ $(document).ready(function() {
|
|
|
|
|
// renderChoiceLimit: 5
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
$('#gantt_setting_btn').on('click', async function() {
|
|
|
|
|
$('#gantt_setting_btn').on('click', async function() { |
|
|
|
|
const result = await axiosInstance |
|
|
|
|
.get(VERSION_GANTT_EDIT_URL, HEADER) |
|
|
|
|
.then(res => res) |
|
|
|
@ -96,7 +96,7 @@ $(document).ready(function() {
|
|
|
|
|
$('#modal_gantt_setting').modal('show'); |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
// $('#gantt_setting_btn').on('click', async function() {
|
|
|
|
|
// $('#gantt_setting_btn').on('click', async function() {
|
|
|
|
|
// $('#modal_gantt_setting').modal('show');
|
|
|
|
|
// // $('#')
|
|
|
|
|
// });
|
|
|
|
@ -114,7 +114,7 @@ $(document).ready(function() {
|
|
|
|
|
var dayoff = $('#select_dayoff').val(); |
|
|
|
|
// console.log('dayoff', dayoff);
|
|
|
|
|
// if (dayoff.length < 1) return alert('Please add a day off');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
dayoff = dayoff.map(item => parseInt(item)); |
|
|
|
|
// console.log('dayoff after', dayoff);
|
|
|
|
|
var workdays = _.difference(days, dayoff); |
|
|
|
@ -222,7 +222,7 @@ async function initHolidays(){
|
|
|
|
|
dataHolidays.map((val, index) => { |
|
|
|
|
// let day = moment(val.date).format("YYYY-MM-DD");
|
|
|
|
|
var a = moment(val.date); |
|
|
|
|
var b = moment(a).add(val.duration, 'days');
|
|
|
|
|
var b = moment(a).add(val.duration, 'days'); |
|
|
|
|
for (var m = moment(a); m.isBefore(b); m.add(1, 'days')) { |
|
|
|
|
let holiday = new Date(m.format('YYYY-MM-DD')); |
|
|
|
|
// console.log("cek holiday", holiday)
|
|
|
|
@ -240,7 +240,7 @@ async function initHolidays(){
|
|
|
|
|
gantt.render(); |
|
|
|
|
}, |
|
|
|
|
error: function (data) { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
} |
|
|
|
@ -394,7 +394,7 @@ window.addEventListener("click", function(event){
|
|
|
|
|
function setBaseline() { |
|
|
|
|
var box = gantt.confirm({ |
|
|
|
|
text: "Set Baseline?", |
|
|
|
|
ok:"Yes",
|
|
|
|
|
ok:"Yes", |
|
|
|
|
cancel:"No", |
|
|
|
|
callback: async function(result){ |
|
|
|
|
if(result){ |
|
|
|
@ -436,7 +436,7 @@ function setSynchronize() {
|
|
|
|
|
// });
|
|
|
|
|
gantt.confirm({ |
|
|
|
|
text: "Plase set baseline before continue.", |
|
|
|
|
ok:"Set Baseline",
|
|
|
|
|
ok:"Set Baseline", |
|
|
|
|
cancel:"Cancel", |
|
|
|
|
callback: async function(result) { |
|
|
|
|
if (result) { |
|
|
|
@ -449,7 +449,7 @@ function setSynchronize() {
|
|
|
|
|
|
|
|
|
|
var box = gantt.confirm({ |
|
|
|
|
text: "Synchronize to Report Activity?", |
|
|
|
|
ok:"Yes",
|
|
|
|
|
ok:"Yes", |
|
|
|
|
cancel:"No", |
|
|
|
|
callback: async function(result){ |
|
|
|
|
if(result){ |
|
|
|
|