feat(z01): 열 제목 눌러 차례 — 누르기 전엔 표시 없음(원본 차례) · 오름→내림→원본 · 세우기는 서버 몫(sort·desc 보냄 · 서버가 거절하면 누른 표시 지움) · 제목은 서버가 준 sortable 열만 눌림(눌렀는데 그대로인 화면 막음)
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016VBGFXB9AbJBwXP19z75Qq
This commit is contained in:
@@ -25,9 +25,17 @@ _RUNNER = """
|
||||
import { writeFileSync } from "node:fs";
|
||||
import {
|
||||
cellInfo, cellText, clampPage, columnTitle, latestOnly, pageCount, parseCellInput, rowCells,
|
||||
boldSegments, noticeLines, outdatedBanner, shownColumns, valueWithUnit,
|
||||
boldSegments, nextSort, noticeLines, outdatedBanner, shownColumns, valueWithUnit,
|
||||
} from "./Z01_MasterData_UI_Cells.js";
|
||||
|
||||
// 열 제목 누르기 — 없음 → 오름 → 내림 → 없음(원본 차례) · 다른 열을 누르면 그 열 오름부터
|
||||
const sorts = [
|
||||
nextSort(null, "price_krw"),
|
||||
nextSort({ key: "price_krw", desc: false }, "price_krw"),
|
||||
nextSort({ key: "price_krw", desc: true }, "price_krw"),
|
||||
nextSort({ key: "price_krw", desc: true }, "item_code"),
|
||||
];
|
||||
|
||||
// 표 수준 알림 — 서버가 한 벌로 목록을 줌(첫 줄 「새로 만드는 프로젝트부터」) · 글자에 **굵게** 가 섞임
|
||||
const notices = [
|
||||
noticeLines(["여기서 고친 값은 **새로 만드는 프로젝트부터** 쓰임", "법이 정한 값 — 고치면…"]),
|
||||
@@ -168,6 +176,7 @@ writeFileSync(process.argv[2], JSON.stringify({
|
||||
banners,
|
||||
notices,
|
||||
bolds,
|
||||
sorts,
|
||||
}));
|
||||
"""
|
||||
|
||||
@@ -276,3 +285,10 @@ def test_칸_글자와_숨김_열(tmp_path: Path) -> None:
|
||||
],
|
||||
[{"text": "굵게 없음", "bold": False}],
|
||||
]
|
||||
# 세 번째 누르면 원본 차례로 — 누르기 전에는 차례 표시가 아예 없어야 함
|
||||
assert got["sorts"] == [
|
||||
{"key": "price_krw", "desc": False},
|
||||
{"key": "price_krw", "desc": True},
|
||||
None,
|
||||
{"key": "item_code", "desc": False},
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user