From 0cc37d77737c5dbd2dae4ac4218943a238a29801 Mon Sep 17 00:00:00 2001 From: Hyungi Ahn Date: Wed, 1 Apr 2026 09:18:31 +0900 Subject: [PATCH] =?UTF-8?q?fix(monthly-comparison):=20=EA=B7=BC=ED=83=9C?= =?UTF-8?q?=20=EC=9D=B8=EB=9D=BC=EC=9D=B8=20=EC=88=98=EC=A0=95=20=E2=80=94?= =?UTF-8?q?=20vacation=5Ftype=5Fid=20=EC=9D=91=EB=8B=B5=20=EC=B6=94?= =?UTF-8?q?=EA=B0=80=20+=20=EC=A1=B0=ED=87=B4=20=EC=98=B5=EC=85=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - API 응답에 attendance_type_id, vacation_type_id, vacation_days 포함 - 드롭다운에 조퇴(id=10) 옵션 추가 - onVacTypeChange에 조퇴→2시간 매핑 Co-Authored-By: Claude Opus 4.6 (1M context) --- .../api/controllers/monthlyComparisonController.js | 5 ++++- system1-factory/web/js/monthly-comparison.js | 2 ++ system1-factory/web/pages/attendance/monthly-comparison.html | 2 +- 3 files changed, 7 insertions(+), 2 deletions(-) diff --git a/system1-factory/api/controllers/monthlyComparisonController.js b/system1-factory/api/controllers/monthlyComparisonController.js index b61b957..49a7ec8 100644 --- a/system1-factory/api/controllers/monthlyComparisonController.js +++ b/system1-factory/api/controllers/monthlyComparisonController.js @@ -98,7 +98,10 @@ async function buildComparisonData(userId, year, month) { attendance: attend ? { total_work_hours: parseFloat(attend.total_work_hours), attendance_type: attend.attendance_type_name || '', - vacation_type: attend.vacation_type_name || null + attendance_type_id: attend.attendance_type_id || null, + vacation_type: attend.vacation_type_name || null, + vacation_type_id: attend.vacation_type_id || null, + vacation_days: attend.vacation_days ? parseFloat(attend.vacation_days) : null } : null, status, hours_diff: hoursDiff diff --git a/system1-factory/web/js/monthly-comparison.js b/system1-factory/web/js/monthly-comparison.js index f09bc69..b851f57 100644 --- a/system1-factory/web/js/monthly-comparison.js +++ b/system1-factory/web/js/monthly-comparison.js @@ -656,6 +656,7 @@ function editAttendance(date, currentHours, currentVacTypeId) { +
@@ -672,6 +673,7 @@ function onVacTypeChange(date) { if (vacType === '1') hoursInput.value = '0'; // 연차 → 0시간 else if (vacType === '2') hoursInput.value = '4'; // 반차 → 4시간 else if (vacType === '3') hoursInput.value = '6'; // 반반차 → 6시간 + else if (vacType === '10') hoursInput.value = '2'; // 조퇴 → 2시간 } async function saveAttendance(date) { diff --git a/system1-factory/web/pages/attendance/monthly-comparison.html b/system1-factory/web/pages/attendance/monthly-comparison.html index cb5512d..c9aab78 100644 --- a/system1-factory/web/pages/attendance/monthly-comparison.html +++ b/system1-factory/web/pages/attendance/monthly-comparison.html @@ -164,7 +164,7 @@ - +