diff --git a/app/modules/vacation/CLAUDE.md b/app/modules/vacation/CLAUDE.md index bb1f3c1..7119d86 100644 --- a/app/modules/vacation/CLAUDE.md +++ b/app/modules/vacation/CLAUDE.md @@ -9,7 +9,7 @@ - **신청 화면**(2026-11-02, `form.html`) = 위 휴가 종류 라디오(고르면 검은 배경·흰 굵은 글씨) · 왼쪽 붙박이 달력(공용 `ErpDatePop.mountRange` — 팝업과 같은 `.pj-dp-*` 서식, 첫 클릭 시작일·둘째 클릭 종료일·셋째 새로, 하루 = 동그라미, 기간 = 둥근 막대, 반차 = 클릭마다 하루) · 오른쪽 시작일·종료일(읽기 전용, 달력이 채움)·구분·예상 일수·사유 · 아래 결재 라인. 하루짜리는 종료 구분을 숨기고 보내지 않는다(서버 compute_days 도 시작 구분만 씀). 시작일·종료일 숨긴 칸은 브라우저 필수 검사가 안 돼 `vacation.js` 가 제출 전 확인. - 공휴일 = 국경일·대체공휴일(`router._red_holidays` → `db.holiday_map`, 작년~내년, `#vac-holidays`) — 달력 빨강·이름 + 예상 일수에서도 뺀다(서버 compute_days 와 같은 표). + 공휴일 = 국경일·대체공휴일(`router._red_holidays` → `db.holiday_map`, 작년~내년, `#vac-holidays`) — 달력 빨강·이름(10.5px, 달력 폭 380px 라야 "석가탄신일"이 안 잘림) + 예상 일수에서도 뺀다(서버 compute_days 와 같은 표). 옵션의 입사일 버튼은 그대로 `ErpDatePop.enhance`(팝업). 테스트 `tests/js/vacation_datepop.browser.test.js`(`render_vacation.py`). ## 협의자 결재 (2026-11-02, 마이그레이션 `vacation_db_003_consults.sql`) diff --git a/app/modules/vacation/templates/vacation/detail.html b/app/modules/vacation/templates/vacation/detail.html index 3eb815c..1dbc3ea 100644 --- a/app/modules/vacation/templates/vacation/detail.html +++ b/app/modules/vacation/templates/vacation/detail.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% import "vacation/_macros.html" as vm %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/vacation/templates/vacation/form.html b/app/modules/vacation/templates/vacation/form.html index 43d30b3..b8cf26d 100644 --- a/app/modules/vacation/templates/vacation/form.html +++ b/app/modules/vacation/templates/vacation/form.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% import "vacation/_macros.html" as vm %} -{% block head_extra %} +{% block head_extra %} {#- 달력 = ERP 공용 달력 서식(2026-11-02, erp-datepop mountRange) -#} {% endblock %} diff --git a/app/modules/vacation/templates/vacation/index.html b/app/modules/vacation/templates/vacation/index.html index 48dc42c..3459b99 100644 --- a/app/modules/vacation/templates/vacation/index.html +++ b/app/modules/vacation/templates/vacation/index.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/vacation/templates/vacation/mine.html b/app/modules/vacation/templates/vacation/mine.html index 0e5a9e3..e05c15f 100644 --- a/app/modules/vacation/templates/vacation/mine.html +++ b/app/modules/vacation/templates/vacation/mine.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% import "vacation/_macros.html" as vm %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/modules/vacation/templates/vacation/options.html b/app/modules/vacation/templates/vacation/options.html index b6e6875..dfe1f01 100644 --- a/app/modules/vacation/templates/vacation/options.html +++ b/app/modules/vacation/templates/vacation/options.html @@ -2,7 +2,7 @@ {#- 휴가 옵션(2026-10-27) — 승인자·승인 통보자·잔여 연차(수정 = ERP 관리자·승인자·통보자, 나머지는 보기만) + 내 Gmail 연결(누구나). 메일: 제출 = 승인자·통보자(+ 협의자마다 자기 몫), 협의 완료·승인·반려 = 승인자·통보자·신청자. 보내는 사람 = 처리한 사람 본인 Gmail(없으면 회사 메일). -#} -{% block head_extra %} +{% block head_extra %} {% endblock %} diff --git a/app/modules/vacation/templates/vacation/pending.html b/app/modules/vacation/templates/vacation/pending.html index 56b28f6..68d3719 100644 --- a/app/modules/vacation/templates/vacation/pending.html +++ b/app/modules/vacation/templates/vacation/pending.html @@ -1,7 +1,7 @@ {% extends "erp_base.html" %} {% import "vacation/_macros.html" as vm %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {% block content %}
diff --git a/app/static/vacation.css b/app/static/vacation.css index e3c0bfc..4fd1c69 100644 --- a/app/static/vacation.css +++ b/app/static/vacation.css @@ -175,9 +175,11 @@ .vac-type input:checked + span::before { border: 4px solid #fff; background: #000; } .vac-type input:focus-visible + span { outline: 2px solid var(--vac-black); outline-offset: 2px; } -.vac-form-main { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 24px; align-items: start; } +.vac-form-main { display: grid; grid-template-columns: 380px minmax(0, 1fr); gap: 24px; align-items: start; } @media (max-width: 760px) { .vac-form-main { grid-template-columns: minmax(0, 1fr); } } .vac-range-cal { border: 1px solid var(--vac-ash); border-radius: 12px; padding: 12px; font-size: 13px; } +/* 붙박이 달력은 팝업보다 칸이 넓다 — 공휴일 이름을 공용 9px 보다 크게 */ +.vac-range-cal .pj-dp-hol { font-size: 10.5px; padding: 0; letter-spacing: -.6px; } .vac-form-side { display: flex; flex-direction: column; min-width: 0; } .vac-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); diff --git a/tests/js/render_vacation.py b/tests/js/render_vacation.py index 57788a5..59f68d4 100644 --- a/tests/js/render_vacation.py +++ b/tests/js/render_vacation.py @@ -26,7 +26,7 @@ def main() -> None: ctx = {"user": {"email": "kim@test.local", "name": "김철수", "picture": ""}, "is_admin": False, "is_approver": False, "nav_items": [], "page_title": "휴가 신청", "page_subtitle": "", "mode": "new", "req": None, "default_date": "2026-10-27", "vacation_types": list(VACATION_TYPES), "halves": list(HALVES), - "half_labels": HALF_LABELS, "holidays": {"2026-10-03": "개천절", "2026-10-09": "한글날", "2026-12-25": "성탄절"}, + "half_labels": HALF_LABELS, "holidays": {"2026-10-01": "부처님오신날", "2026-10-03": "개천절", "2026-10-09": "한글날", "2026-12-25": "성탄절"}, # 10-01 = 가장 긴 이름(석가탄신일) 칸 맞춤 확인용 "consult_ready": True, "consult_chosen": {}, "members": [{"email": "lee@test.local", "name": "이팀장", "picture": ""}, {"email": "park@test.local", "name": "박과장", "picture": ""}, {"email": "choi@test.local", "name": "최대리", "picture": ""}], diff --git a/tests/js/vacation_datepop.browser.test.js b/tests/js/vacation_datepop.browser.test.js index 0edfa7f..61420f9 100644 --- a/tests/js/vacation_datepop.browser.test.js +++ b/tests/js/vacation_datepop.browser.test.js @@ -78,6 +78,11 @@ function check(name, cond, extra) { return { hol: hol.classList.contains("is-sun") && hol.textContent, sat: document.querySelector('#vac-cal .pj-dp-day[data-iso="2026-10-24"]').classList.contains("is-sat"), left: box.right <= side.left }; }); check("공용 달력 서식 — 공휴일 빨강·이름, 토 파랑, 달력은 왼쪽", cal.hol === "9한글날" && cal.sat && cal.left, cal); + const holName = await p.evaluate(function () { + const h = document.querySelector('#vac-cal .pj-dp-day[data-iso="2026-10-01"] .pj-dp-hol'); + return { text: h.textContent, size: parseFloat(getComputedStyle(h).fontSize), clipped: h.scrollWidth > h.clientWidth }; + }); + check("공휴일 이름 10.5px, 가장 긴 이름(석가탄신일)도 안 잘림", holName.text === "석가탄신일" && holName.size === 10.5 && !holName.clipped, holName); // 하루 = 동그라미, 시작·종료 칸 자동, 종료 구분은 숨김(하루는 시작 구분만) await day("2026-10-20");