diff --git a/app/modules/performance/calc.py b/app/modules/performance/calc.py index 16d5617..c430e3e 100644 --- a/app/modules/performance/calc.py +++ b/app/modules/performance/calc.py @@ -110,7 +110,8 @@ def fmt_md(d: date) -> str: def day_label(d: date) -> str: - return f"{WEEKDAYS_KO[d.weekday()]} {fmt_md(d)}" + """일자별 표 날짜 — mm/dd(요일), 예: 09/01(화).""" + return f"{d.month:02d}/{d.day:02d}({WEEKDAYS_KO[d.weekday()]})" @dataclass diff --git a/app/modules/performance/templates/performance/index.html b/app/modules/performance/templates/performance/index.html index ece17db..a7e0148 100644 --- a/app/modules/performance/templates/performance/index.html +++ b/app/modules/performance/templates/performance/index.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {%- macro won(v) -%} {%- if v is none -%} @@ -239,4 +239,4 @@ } | tojson }} {% endblock %} -{% block scripts %}{% endblock %} +{% block scripts %}{% endblock %} diff --git a/app/modules/performance/templates/performance/settings.html b/app/modules/performance/templates/performance/settings.html index 26de82c..99e7a08 100644 --- a/app/modules/performance/templates/performance/settings.html +++ b/app/modules/performance/templates/performance/settings.html @@ -1,6 +1,6 @@ {% extends "erp_base.html" %} -{% block head_extra %}{% endblock %} +{% block head_extra %}{% endblock %} {%- macro when(v) -%}{{ (v or '')[:16] | replace('T', ' ') or '—' }}{%- endmacro -%} @@ -155,4 +155,4 @@ {% endblock %} -{% block scripts %}{% endblock %} +{% block scripts %}{% endblock %} diff --git a/app/modules/performance/tests/test_performance.py b/app/modules/performance/tests/test_performance.py index f4cb766..bd9389b 100644 --- a/app/modules/performance/tests/test_performance.py +++ b/app/modules/performance/tests/test_performance.py @@ -172,7 +172,7 @@ def test_main_table_week(): cells = _cells_for(days, ["a", "b"]) rows = calc.main_table(p, ["a", "b"], cells, today=date(2026, 9, 30), holidays={"2026-10-03": "개천절"}) assert [r["kind"] for r in rows] == ["day"] * 7 + ["week"] - assert rows[0]["label"] == "월 9/28" and rows[6]["label"] == "일 10/4" + assert rows[0]["label"] == "09/28(월)" and rows[6]["label"] == "10/04(일)" assert rows[5]["holiday"] == "개천절" and rows[2]["today"] and rows[3]["future"] week = rows[-1] assert week["cells"]["a"] == {"gross": 70_000, "commission": 7_000, "net": 63_000} diff --git a/app/static/performance.css b/app/static/performance.css index 2bf3cfb..d6ed4bc 100644 --- a/app/static/performance.css +++ b/app/static/performance.css @@ -109,12 +109,13 @@ a.perf-seg.is-active, a.perf-seg.is-active:link, a.perf-seg.is-active:visited { .perf-zero { color: #c9c9c9; } .perf-na::before { content: ""; } .perf-th-total, .perf-td-total { background: #f6f6f6; font-weight: 600; } -.perf-main .perf-td-label { min-width: 88px; } +/* 날짜 열 너비 고정(210px) — 공휴일 이름이 날짜 오른쪽에 붙는다 */ +.perf-main thead th.perf-th-label, .perf-main .perf-td-label { width: 210px; min-width: 210px; max-width: 210px; box-sizing: border-box; overflow: hidden; text-overflow: ellipsis; } .perf-row-day.is-sat .perf-td-label { color: var(--perf-sat); } .perf-row-day.is-sun .perf-td-label { color: var(--perf-sun); } .perf-row-day.is-today .perf-td-label::after { content: "오늘"; margin-left: 6px; font-size: 10px; padding: 0 5px; border-radius: 999px; background: var(--color-deep-black); color: #fff; vertical-align: 1px; } .perf-row-day.is-future td, .perf-row-month.is-future td, .perf-year tr.is-future td { color: #c9c9c9; } -.perf-hol { display: block; font-size: 10.5px; font-weight: 400; } +.perf-hol { display: inline; margin-left: 6px; font-size: 11px; font-weight: 400; } .perf-row-week th, .perf-row-week td { background: #f3f3f3; font-weight: 600; border-bottom: 1px solid var(--perf-line); } .perf-row-week .perf-td-total { background: #e9e9e9; } .perf-row-total th, .perf-row-total td { background: var(--color-deep-black); color: #fff; font-weight: 600; border-bottom: 0; } @@ -215,3 +216,11 @@ td.is-link:hover { background: #eef2ff; text-decoration: underline; } .perf-diff-bad { color: var(--perf-down); font-weight: 600; } .perf-diff-ok { color: #0f8a3a; } .perf-link { background: none; border: 0; padding: 0; color: inherit; font: inherit; text-decoration: underline dotted; cursor: pointer; } + +/* 주문 내역 창 — 열 제목은 가운데·굵게·150%, 창을 스크롤해도 위에 고정 */ +.perf-ev-wrap { overflow: visible; } +.perf-ev-table thead th, .perf-ev-table thead th.perf-th-label { + text-align: center; font-weight: 700; font-size: 18px; color: var(--color-deep-black, #111); + position: sticky; top: -12px; z-index: 2; +} +.perf-ev-table td.perf-ev-kind-cancel { font-style: italic; text-decoration: line-through; color: #9a9a9a; } diff --git a/app/static/performance.js b/app/static/performance.js index dc19c62..2a74e43 100644 --- a/app/static/performance.js +++ b/app/static/performance.js @@ -188,7 +188,8 @@ sum += r.amount; if (r.amount >= 0) sales += r.amount; else minus += r.amount; return '
| 매출일 | 구분 | 주문번호 | ' + '상품명 | 수량 | 금액 | 주문일 | ' + '결제일 | 상태 |
|---|