fix(tkuser): 장기근속 5년 정확 경과 체크 + 수동부여 연도 입력

- autoGrantLongServiceLeave: 연도 차이 → 정확한 기념일 경과 확인
  (today < anniversaryDate이면 스킵)
- 수동 배정 모달에 "배정 연도" 필드 추가 (탭 연도 의존 제거)
- 장기근속 만료일 = null 유지 (기존 동작 그대로)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Hyungi Ahn
2026-03-31 08:26:43 +09:00
parent a30482ec34
commit b2ce691ef9
3 changed files with 25 additions and 17 deletions

View File

@@ -353,6 +353,7 @@ function openVacBalanceModal(editId) {
document.getElementById('vacBalModalTitle').textContent = '연차 배정';
const year = document.getElementById('vacYear')?.value || new Date().getFullYear();
document.getElementById('vbYear').value = year;
document.getElementById('vbExpiresAt').value = `${year}-12-31`;
// 사용자 셀렉트 (부서별 optgroup)
@@ -422,11 +423,10 @@ document.getElementById('vacBalanceForm').addEventListener('submit', async e =>
})});
showToast('수정되었습니다.');
} else {
const year = document.getElementById('vacYear')?.value || new Date().getFullYear();
await api('/vacations/balances', { method: 'POST', body: JSON.stringify({
user_id: parseInt(document.getElementById('vbUser').value),
vacation_type_id: parseInt(document.getElementById('vbType').value),
year: parseInt(year),
year: parseInt(document.getElementById('vbYear').value),
total_days: parseFloat(document.getElementById('vbTotalDays').value) || 0,
used_days: parseFloat(document.getElementById('vbUsedDays').value) || 0,
balance_type: document.getElementById('vbBalanceType').value,