Index: arms/js/reqGantt.js =================================================================== diff -u -rfee06f81c07e60dd6a8f7f36ea8c2c17bfae651a -r9ad724a6206affabd64da89d2ac99510a2897ab7 --- arms/js/reqGantt.js (.../reqGantt.js) (revision fee06f81c07e60dd6a8f7f36ea8c2c17bfae651a) +++ arms/js/reqGantt.js (.../reqGantt.js) (revision 9ad724a6206affabd64da89d2ac99510a2897ab7) @@ -1486,46 +1486,42 @@ const dayDiff = Math.max(0, diff_day(start, end)); const todayDiff = Math.max(0, diff_day(start, today)); + // 시작일이 오늘보다 미래인 경우 + if (startDate > today) { + return { + dayDiff: dayDiff, + todayDiff: 0, + plan_progress: 0 + }; + } + + // 시작일이 종료일보다 같거나 큰 경우 + if (startDate >= endDate) { + return { + dayDiff: 0, + todayDiff: 0, + plan_progress: 0 + }; + } + + if (endDate <= today) { + return { + dayDiff: dayDiff, + todayDiff: dayDiff, + // plan_progress: 100, + plan_progress: 0 + }; + } + + // 진행률 계산 + // const progress = dayDiff > 0 ? (todayDiff / dayDiff) * 100 : 0; + return { dayDiff: dayDiff, todayDiff: todayDiff, + // plan_progress: Math.min(progress.toFixed(0), 100) plan_progress: 0 }; - - // // 시작일이 오늘보다 미래인 경우 - // if (startDate > today) { - // return { - // dayDiff: dayDiff, - // todayDiff: 0, - // plan_progress: 0 - // }; - // } - // - // // 시작일이 종료일보다 같거나 큰 경우 - // if (startDate >= endDate) { - // return { - // dayDiff: 0, - // todayDiff: 0, - // plan_progress: 0 - // }; - // } - // - // if (endDate <= today) { - // return { - // dayDiff: dayDiff, - // todayDiff: dayDiff, - // plan_progress: 100 - // }; - // } - // - // // 진행률 계산 - // const progress = dayDiff > 0 ? (todayDiff / dayDiff) * 100 : 0; - // - // return { - // dayDiff: dayDiff, - // todayDiff: todayDiff, - // plan_progress: Math.min(progress.toFixed(0), 100) - // }; } function change_input_for_req_date(prefix) {