Merge branch 'feat/inout-list-cal-smaller-2'

This commit is contained in:
2026-11-05 15:08:05 +09:00
8 changed files with 22 additions and 20 deletions
+3 -3
View File
@@ -13,7 +13,7 @@
- 발주 목록 상태 보기(진행 중·완료·종결·취소·전체)는 **사람마다 기억**(2026-11-04) — `inout_settings` 키 `list_status:{이메일}`(마이그레이션 없음, 005 미적용이면 기억만 안 함). 주소에 `status` 가 있으면 저장, 없으면 저장값, 그것도 없으면 진행 중. - 발주 목록 상태 보기(진행 중·완료·종결·취소·전체)는 **사람마다 기억**(2026-11-04) — `inout_settings` 키 `list_status:{이메일}`(마이그레이션 없음, 005 미적용이면 기억만 안 함). 주소에 `status` 가 있으면 저장, 없으면 저장값, 그것도 없으면 진행 중.
- 발주 목록 **입고일** 열(2026-11-05, 입고 예정일과 발주 사이, `db.list_orders` `receipt_dates`) — 여러 날에 나눠 입고하면 칸 안에서 줄바꿈(오래된 날부터), 같은 날 여러 번은 한 번만, 입고 전 `-`. - 발주 목록 **입고일** 열(2026-11-05, 입고 예정일과 발주 사이, `db.list_orders` `receipt_dates`) — 여러 날에 나눠 입고하면 칸 안에서 줄바꿈(오래된 날부터), 같은 날 여러 번은 한 번만, 입고 전 `-`.
- 발주 목록 거르기 줄(2026-11-05) — 상태·공장은 왼쪽, 발주일~[찾기]는 오른쪽(`.io-filter-right`). - 발주 목록 거르기 줄(2026-11-05) — 상태·공장은 왼쪽, 발주일~[찾기]는 오른쪽(`.io-filter-right`).
- 발주 목록 표 머리글(2026-11-05, `.io-list-table`) = 가운데·굵게·`--text-caption` × 111% × 90%·회색 배경, 표 글자 전체도 원래의 90%. 미입고 현황 등 다른 표는 그대로. - 발주 목록 표 머리글(2026-11-05, `.io-list-table`) = 가운데·굵게·`--text-caption` × 111% × 81%·회색 배경, 표 글자 전체도 원래의 81%(90% 두 번). 미입고 현황 등 다른 표는 그대로.
- [남은 수량 모두 채우기]를 한 번 더 누르면(= [채운 수량 되돌리기]) 채우기 전 값으로(2026-10-19, `inout.js`). - [남은 수량 모두 채우기]를 한 번 더 누르면(= [채운 수량 되돌리기]) 채우기 전 값으로(2026-10-19, `inout.js`).
- 초과 입고는 확인 화면 후 허용(트랜잭션 안에서 발주서 잠그고 판단, `confirm_over`). - 초과 입고는 확인 화면 후 허용(트랜잭션 안에서 발주서 잠그고 판단, `confirm_over`).
- **전체 입고 완료(모든 품목 입고 ≥ 발주, 상태 done·over)면 더 입고 못 함**(2026-10-19) — 화면은 입고 칸·[입고 저장]·사진·[남은 수량 채우기]를 흐리게 disabled, 서버 `_add_receipt` 도 잠근 뒤 거절. 입고 기록을 지우면 다시 열림. - **전체 입고 완료(모든 품목 입고 ≥ 발주, 상태 done·over)면 더 입고 못 함**(2026-10-19) — 화면은 입고 칸·[입고 저장]·사진·[남은 수량 채우기]를 흐리게 disabled, 서버 `_add_receipt` 도 잠근 뒤 거절. 입고 기록을 지우면 다시 열림.
@@ -109,8 +109,8 @@
## 오른쪽 달력 (2026-10-21) ## 오른쪽 달력 (2026-10-21)
- 입출고 **모든 화면** 2열(`.io-split` = 왼쪽 `section.io` | 오른쪽 `_calendar.html`, 1100px 미만은 한 열 270px). 스크롤해도 위에 붙음. - 입출고 **모든 화면** 2열(`.io-split` = 왼쪽 `section.io` | 오른쪽 `_calendar.html`, 1100px 미만은 한 열 243px). 스크롤해도 위에 붙음.
달력 크기 = 화면에 따라 270~396px(`clamp(270px, 20.7vw, 396px)`, 2026-11-05 90% 로 줄임, 높이 ×320/300) — 입출고 화면만 ERP 공용 최대 폭 1550px 를 풀어 넓은 화면 여백을 씀(2026-10-21 "여백이 많다, 더 키워 달라"). 달력 크기 = 화면에 따라 243~356px(`clamp(243px, 18.63vw, 356px)`, 2026-11-05 90% 로 두 번 줄임, 높이 ×320/300) — 입출고 화면만 ERP 공용 최대 폭 1550px 를 풀어 넓은 화면 여백을 씀(2026-10-21 "여백이 많다, 더 키워 달라").
글자·칸은 달력 너비 기준 `cqw`(300px 일 때 1cqw = 3px)라 같은 비율로 커진다 — 새 크기 값도 px 대신 cqw 로. 글자·칸은 달력 너비 기준 `cqw`(300px 일 때 1cqw = 3px)라 같은 비율로 커진다 — 새 크기 값도 px 대신 cqw 로.
- 프로젝트 달력 모양(일요일 시작·요일 줄 회색·오늘 검은 동그라미·토 파랑·일/공휴일 빨강 — 공휴일 표는 `project.store.holiday_name` 재사용). - 프로젝트 달력 모양(일요일 시작·요일 줄 회색·오늘 검은 동그라미·토 파랑·일/공휴일 빨강 — 공휴일 표는 `project.store.holiday_name` 재사용).
공휴일 이름은 숫자 아래 한 줄(`.io-cal-hol`, 8.5px — 5글자까지 다 보임, 더 길면 … + 말풍선에 전체 이름). 공휴일 이름은 숫자 아래 한 줄(`.io-cal-hol`, 8.5px — 5글자까지 다 보임, 더 길면 … + 말풍선에 전체 이름).
+1 -1
View File
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% from "inout/_macros.html" import order_badge, progress, due, n, ymd %} {% from "inout/_macros.html" import order_badge, progress, due, n, ymd %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261105d" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261105e" />{% endblock %}
{% block content %} {% block content %}
<div class="io-split">{# 2열 — 왼쪽 화면 | 오른쪽 달력(2026-10-21) #} <div class="io-split">{# 2열 — 왼쪽 화면 | 오른쪽 달력(2026-10-21) #}
@@ -20,7 +20,7 @@
</footer> </footer>
</dialog> </dialog>
{%- endmacro -%} {%- endmacro -%}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261105d" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261105e" />{% endblock %}
{% block content %} {% block content %}
{% set active = order.status in ('open', 'partial') %} {% set active = order.status in ('open', 'partial') %}
@@ -1,5 +1,5 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261105d" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261105e" />{% endblock %}
{% block content %} {% block content %}
<div class="io-split">{# 2열 — 왼쪽 화면 | 오른쪽 달력(2026-10-21) #} <div class="io-split">{# 2열 — 왼쪽 화면 | 오른쪽 달력(2026-10-21) #}
@@ -1,6 +1,6 @@
{% extends "erp_base.html" %} {% extends "erp_base.html" %}
{% from "inout/_macros.html" import due, n, ymd %} {% from "inout/_macros.html" import due, n, ymd %}
{% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261105d" />{% endblock %} {% block head_extra %}<link rel="stylesheet" href="/static/inout.css?v=20261105e" />{% endblock %}
{% block content %} {% block content %}
<div class="io-split">{# 2열 — 왼쪽 화면 | 오른쪽 달력(2026-10-21) #} <div class="io-split">{# 2열 — 왼쪽 화면 | 오른쪽 달력(2026-10-21) #}
+8 -8
View File
@@ -30,12 +30,12 @@
.io-table td.io-items { white-space: normal; min-width: 160px; } .io-table td.io-items { white-space: normal; min-width: 160px; }
.io-num { text-align: right !important; font-variant-numeric: tabular-nums; } .io-num { text-align: right !important; font-variant-numeric: tabular-nums; }
/* 발주 목록 머리글 — 숫자 열도 가운데(.io-num 의 !important 를 덮음) */ /* 발주 목록 머리글 — 숫자 열도 가운데(.io-num 의 !important 를 덮음) */
.io-table.io-list-table thead th { text-align: center !important; font-size: calc(var(--text-caption, 12px) * 1.11 * .9); font-weight: 700; background: var(--color-ghost-gray, #f2f2f2); } .io-table.io-list-table thead th { text-align: center !important; font-size: calc(var(--text-caption, 12px) * 1.11 * .81); font-weight: 700; background: var(--color-ghost-gray, #f2f2f2); }
/* 발주 목록 글자 = 원래 크기의 90% — 칸(13px)·작은 글자(12·11.5·11px) 비율 유지 */ /* 발주 목록 글자 = 원래 크기의 81%(90% 두 번) — 칸(13px)·작은 글자(12·11.5·11px) 비율 유지 */
.io-table.io-list-table tbody td { font-size: 11.7px; } .io-table.io-list-table tbody td { font-size: 10.53px; }
.io-list-table .erp-row-sub, .io-list-table .erp-muted, .io-list-table .io-progress-pct, .io-list-table .io-late { font-size: 10.8px; } .io-list-table .erp-row-sub, .io-list-table .erp-muted, .io-list-table .io-progress-pct, .io-list-table .io-late { font-size: 9.72px; }
.io-list-table .io-badge { font-size: 10.35px; } .io-list-table .io-badge { font-size: 9.32px; }
.io-list-table .io-over-sub, .io-list-table .io-badge-note { font-size: 9.9px; } .io-list-table .io-over-sub, .io-list-table .io-badge-note { font-size: 8.91px; }
.io-code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; } .io-code { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.io-order-no { font-weight: 600; color: var(--color-rich-black); text-decoration: none; font-family: ui-monospace, Consolas, monospace; } .io-order-no { font-weight: 600; color: var(--color-rich-black); text-decoration: none; font-family: ui-monospace, Consolas, monospace; }
.io-order-no:hover { text-decoration: underline; } .io-order-no:hover { text-decoration: underline; }
@@ -355,12 +355,12 @@
달력은 화면 너비에 따라 300~440px(2026-10-21 "달력 오른쪽 여백이 많다 — 더 키워 달라") — 입출고 화면은 ERP 공용 최대 폭(1550px)을 풀어 달력은 화면 너비에 따라 300~440px(2026-10-21 "달력 오른쪽 여백이 많다 — 더 키워 달라") — 입출고 화면은 ERP 공용 최대 폭(1550px)을 풀어
넓은 화면의 빈 여백을 쓴다. 좁은 화면(1100px 미만)은 한 열 — 달력은 아래로. ── */ 넓은 화면의 빈 여백을 쓴다. 좁은 화면(1100px 미만)은 한 열 — 달력은 아래로. ── */
.erp-page:has(> .io-split) { max-width: none; } .erp-page:has(> .io-split) { max-width: none; }
.io-split { display: grid; grid-template-columns: minmax(0, 1fr) clamp(270px, 20.7vw, 396px); gap: 20px; align-items: start; } .io-split { display: grid; grid-template-columns: minmax(0, 1fr) clamp(243px, 18.63vw, 356px); gap: 20px; align-items: start; }
.io-split > .io { min-width: 0; } .io-split > .io { min-width: 0; }
.io-side { min-width: 0; position: sticky; top: 12px; display: flex; flex-direction: column; gap: 6px; container-type: inline-size; } .io-side { min-width: 0; position: sticky; top: 12px; display: flex; flex-direction: column; gap: 6px; container-type: inline-size; }
@media (max-width: 1100px) { @media (max-width: 1100px) {
.io-split { grid-template-columns: minmax(0, 1fr); } .io-split { grid-template-columns: minmax(0, 1fr); }
.io-side { position: static; width: 270px; } .io-side { position: static; width: 243px; }
} }
/* 달력 = 오른쪽 열 너비 × (320/300) 높이 — 프로젝트 달력 모양(.pj-cal)을 작게: 머리(제목 ‹ › 오늘) + 둥근 테두리 안 요일 줄(회색) + 6주. /* 달력 = 오른쪽 열 너비 × (320/300) 높이 — 프로젝트 달력 모양(.pj-cal)을 작게: 머리(제목 ‹ › 오늘) + 둥근 테두리 안 요일 줄(회색) + 6주.
크기는 모두 달력 너비 기준(cqw — 300px 일 때 1cqw = 3px, 예전 300×320 그대로)이라 커지면 글자·칸이 같은 비율로 커진다. */ 크기는 모두 달력 너비 기준(cqw — 300px 일 때 1cqw = 3px, 예전 300×320 그대로)이라 커지면 글자·칸이 같은 비율로 커진다. */
+3 -3
View File
@@ -82,12 +82,12 @@ function check(name, cond, extra) {
const headStyles = await p.locator(".io-table thead th").evaluateAll(function (els) { const headStyles = await p.locator(".io-table thead th").evaluateAll(function (els) {
return els.map(function (el) { const c = getComputedStyle(el); return [c.textAlign, c.fontWeight, c.fontSize, c.backgroundColor].join("|"); }); return els.map(function (el) { const c = getComputedStyle(el); return [c.textAlign, c.fontWeight, c.fontSize, c.backgroundColor].join("|"); });
}); });
check("머리글 모양", headStyles.length > 0 && headStyles.every(function (s) { return /^center\|700\|11\.98\d*px\|rgb\(242, 242, 242\)$/.test(s); }), headStyles); check("머리글 모양", headStyles.length > 0 && headStyles.every(function (s) { return /^center\|700\|10\.7\d*px\|rgb\(242, 242, 242\)$/.test(s); }), headStyles);
const sizeOf = function (sel) { return p.locator(sel).first().evaluate(function (el) { return getComputedStyle(el).fontSize; }); }; const sizeOf = function (sel) { return p.locator(sel).first().evaluate(function (el) { return getComputedStyle(el).fontSize; }); };
check("표 글자 90%", (await sizeOf(".io-table tbody td")) === "11.7px" && (await sizeOf(".io-table .erp-row-sub")) === "10.8px" && (await sizeOf(".io-table .io-progress-pct")) === "10.8px" && (await sizeOf(".io-table .io-badge")) === "10.35px"); check("표 글자 81%", (await sizeOf(".io-table tbody td")) === "10.53px" && (await sizeOf(".io-table .erp-row-sub")) === "9.72px" && (await sizeOf(".io-table .io-progress-pct")) === "9.72px" && (await sizeOf(".io-table .io-badge")) === "9.32px" && (await sizeOf(".io-table .io-over-sub")) === "8.91px" && (await sizeOf(".io-table .io-badge-note")) === "8.91px");
await p.setViewportSize({ width: 2000, height: 900 }); await p.setViewportSize({ width: 2000, height: 900 });
await p.waitForTimeout(100); await p.waitForTimeout(100);
check("달력 최대 396px(440px × 90%)", Math.round((await p.locator(".io-side").boundingBox()).width) === 396, await p.locator(".io-side").boundingBox()); check("달력 최대 356px(440px × 81%)", Math.round((await p.locator(".io-side").boundingBox()).width) === 356, await p.locator(".io-side").boundingBox());
await p.setViewportSize({ width: 1400, height: 900 }); await p.setViewportSize({ width: 1400, height: 900 });
await p.waitForTimeout(100); await p.waitForTimeout(100);
+4 -2
View File
@@ -31,11 +31,13 @@ def main() -> None:
env = jinja2.Environment( env = jinja2.Environment(
loader=jinja2.FileSystemLoader([os.path.join(ROOT, "app", "templates"), os.path.join(ROOT, "app", "modules", "inout", "templates")]), loader=jinja2.FileSystemLoader([os.path.join(ROOT, "app", "templates"), os.path.join(ROOT, "app", "modules", "inout", "templates")]),
autoescape=True, undefined=jinja2.ChainableUndefined) autoescape=True, undefined=jinja2.ChainableUndefined)
base = {"date_holidays": _date_holidays(), "today": date(2026, 10, 5), "user": {"name": "테스트", "email": "t@test.local"}, "nav_items": [], "perms": {"can_order": True, "can_receive": True}} base = {"date_holidays": _date_holidays(), "today": date(2026, 10, 5), "user": {"name": "테스트", "email": "t@test.local"}, "nav_items": [], "perms": {"can_order": True, "can_receive": True, "super": True}}
pages = { pages = {
"inout_form.html": ("inout/order_form.html", {"vals": {"order_date": "2026-10-05", "due_date": ""}, "factories": []}), "inout_form.html": ("inout/order_form.html", {"vals": {"order_date": "2026-10-05", "due_date": ""}, "factories": []}),
"inout_list.html": ("inout/index.html", {"filters": {"from": "2026-10-01", "to": "", "status": "open", "q": "", "factory": ""}, "factories": [], "status_filters": {}, "orders": [ "inout_list.html": ("inout/index.html", {"filters": {"from": "2026-10-01", "to": "", "status": "open", "q": "", "factory": ""}, "factories": [], "status_filters": {}, "orders": [
_order(1, [date(2026, 10, 21), date(2026, 10, 23)]), _order(2, [date(2026, 10, 22)]), _order(3, [])]}), _order(1, [date(2026, 10, 21), date(2026, 10, 23)]), _order(2, [date(2026, 10, 22)]), _order(3, []),
{**_order(4, [date(2026, 11, 2)]), "status": "over", "status_label": "전체 입고 완료",
"summary": {"ordered": 1800, "received": 1820, "remaining": 0, "over": 20, "pct": 100}}]}),
} }
for out, (name, ctx) in pages.items(): for out, (name, ctx) in pages.items():
with open(os.path.join(OUT_DIR, out), "w", encoding="utf-8") as f: with open(os.path.join(OUT_DIR, out), "w", encoding="utf-8") as f: