From 47fcaaa3a3a10ff12a8a02851ae957d0b5bd04a4 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:44:27 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20[approvals]=20=EA=B7=BC=ED=83=9C?= =?UTF-8?q?=EC=8B=A0=EC=B2=AD=20=EC=8B=9C=EC=9E=91=EC=9D=BC=EC=97=90=20?= =?UTF-8?q?=EC=8B=9C=EA=B0=84=20=EC=84=A0=ED=83=9D=20=EA=B8=B0=EB=8A=A5=20?= =?UTF-8?q?=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 근태신청(attendance_request) 선택 시 시작일 input을 datetime-local로 전환 - 라벨도 '시작일' → '시작일시'로 변경 - 휴가/사유서는 기존 date 유지 --- resources/views/approvals/create.blade.php | 16 ++++++++++++++-- .../approvals/partials/_leave-form.blade.php | 2 +- 2 files changed, 15 insertions(+), 3 deletions(-) diff --git a/resources/views/approvals/create.blade.php b/resources/views/approvals/create.blade.php index 600c8d97..2f0440b8 100644 --- a/resources/views/approvals/create.blade.php +++ b/resources/views/approvals/create.blade.php @@ -707,10 +707,22 @@ function switchFormMode(formId) { leaveContainer.style.display = ''; populateLeaveTypes(code); - const today = new Date().toISOString().slice(0, 10); const startEl = document.getElementById('leave-start-date'); const endEl = document.getElementById('leave-end-date'); - if (!startEl.value) startEl.value = today; + const startLabel = document.getElementById('leave-start-label'); + + // 근태신청은 시작일에 시간 선택 가능 + if (code === 'attendance_request') { + startEl.type = 'datetime-local'; + if (startLabel) startLabel.textContent = '시작일시'; + if (!startEl.value) startEl.value = new Date().toISOString().slice(0, 16); + } else { + startEl.type = 'date'; + if (startLabel) startLabel.textContent = '시작일'; + if (!startEl.value) startEl.value = new Date().toISOString().slice(0, 10); + } + + const today = new Date().toISOString().slice(0, 10); if (!endEl.value) endEl.value = today; } else if (code === 'employment_cert') { isCertForm = true; diff --git a/resources/views/approvals/partials/_leave-form.blade.php b/resources/views/approvals/partials/_leave-form.blade.php index cb4a5a8b..8d2c3638 100644 --- a/resources/views/approvals/partials/_leave-form.blade.php +++ b/resources/views/approvals/partials/_leave-form.blade.php @@ -36,7 +36,7 @@ class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:outline- {{-- 시작일 / 종료일 --}}
- +