diff --git a/resources/views/approvals/create.blade.php b/resources/views/approvals/create.blade.php index 2f0440b8..14807ce0 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -710,20 +710,25 @@ function switchFormMode(formId) { const startEl = document.getElementById('leave-start-date'); const endEl = document.getElementById('leave-end-date'); const startLabel = document.getElementById('leave-start-label'); + const endLabel = document.getElementById('leave-end-label'); - // 근태신청은 시작일에 시간 선택 가능 + // 근태신청은 시작일/종료일에 시간 선택 가능 if (code === 'attendance_request') { startEl.type = 'datetime-local'; + endEl.type = 'datetime-local'; if (startLabel) startLabel.textContent = '시작일시'; + if (endLabel) endLabel.textContent = '종료일시'; if (!startEl.value) startEl.value = new Date().toISOString().slice(0, 16); + if (!endEl.value) endEl.value = new Date().toISOString().slice(0, 16); } else { startEl.type = 'date'; + endEl.type = 'date'; if (startLabel) startLabel.textContent = '시작일'; - if (!startEl.value) startEl.value = new Date().toISOString().slice(0, 10); + if (endLabel) endLabel.textContent = '종료일'; + const today = new Date().toISOString().slice(0, 10); + if (!startEl.value) startEl.value = today; + if (!endEl.value) endEl.value = today; } - - const today = new Date().toISOString().slice(0, 10); - if (!endEl.value) endEl.value = today; } else if (code === 'employment_cert') { isCertForm = true; certContainer.style.display = ''; diff --git a/resources/views/approvals/partials/_leave-form.blade.php b/resources/views/approvals/partials/_leave-form.blade.php index 8d2c3638..89b07715 100644 --- a/resources/views/approvals/partials/_leave-form.blade.php +++ b/resources/views/approvals/partials/_leave-form.blade.php @@ -41,7 +41,7 @@ class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline- class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline-none focus:ring-2 focus:ring-blue-500">