From a474c26675810ab28b2e90f7b39d00f0aeeb8d2b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=EA=B9=80=EB=B3=B4=EA=B3=A4?= Date: Fri, 6 Mar 2026 17:46:38 +0900 Subject: [PATCH] =?UTF-8?q?fix:=20[approvals]=20=EA=B7=BC=ED=83=9C?= =?UTF-8?q?=EC=8B=A0=EC=B2=AD=20=EC=A2=85=EB=A3=8C=EC=9D=BC=EB=8F=84=20?= =?UTF-8?q?=EC=A2=85=EB=A3=8C=EC=9D=BC=EC=8B=9C(datetime-local)=EB=A1=9C?= =?UTF-8?q?=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- resources/views/approvals/create.blade.php | 15 ++++++++++----- .../approvals/partials/_leave-form.blade.php | 2 +- 2 files changed, 11 insertions(+), 6 deletions(-) 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">
- +