fix(monthly-comparison): 근태 인라인 수정 — vacation_type_id 응답 추가 + 조퇴 옵션
- API 응답에 attendance_type_id, vacation_type_id, vacation_days 포함 - 드롭다운에 조퇴(id=10) 옵션 추가 - onVacTypeChange에 조퇴→2시간 매핑 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -656,6 +656,7 @@ function editAttendance(date, currentHours, currentVacTypeId) {
|
||||
<option value="1" ${vacTypeId == 1 ? 'selected' : ''}>연차</option>
|
||||
<option value="2" ${vacTypeId == 2 ? 'selected' : ''}>반차</option>
|
||||
<option value="3" ${vacTypeId == 3 ? 'selected' : ''}>반반차</option>
|
||||
<option value="10" ${vacTypeId == 10 ? 'selected' : ''}>조퇴</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="mc-edit-actions">
|
||||
@@ -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) {
|
||||
|
||||
@@ -164,7 +164,7 @@
|
||||
|
||||
<script src="/static/js/tkfb-core.js?v=2026033108"></script>
|
||||
<script src="/js/api-base.js?v=2026031701"></script>
|
||||
<script src="/js/monthly-comparison.js?v=2026040106"></script>
|
||||
<script src="/js/monthly-comparison.js?v=2026040107"></script>
|
||||
<script>initAuth();</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user