feat(b09-print): B09 좌측 하단 [인쇄 미리보기] 단추 — 초안 입구(B09_Draft_Print_UI)가 DRAFT.actions 에 넣음 · 영역 셋 이음 끝 (302-1)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01QfHKQs7J3hQELKMWQMUJEy
This commit is contained in:
@@ -0,0 +1,22 @@
|
||||
/* =============================================================================
|
||||
* B09_Draft_Print_UI.ts
|
||||
* 인쇄 미리보기 등록 입구(PLAN 302-1 · 초안) — B09 셸이 `import.meta.glob("./draft/*_UI.ts")` 로 불러올 때
|
||||
* 좌측 하단 고정 줄(`DRAFT.actions`)에 [인쇄 미리보기] 단추 → #/b09-print(`…_Print_Route`)
|
||||
* draft 폴더째 지우면 단추 · 길 · 서버 길이 함께 사라짐
|
||||
* ========================================================================== */
|
||||
|
||||
import type { RoutePath } from "@config/config_frontend";
|
||||
import { createButton } from "@ui/ui_template_elements";
|
||||
import { navigateTo } from "../../A00_Common/router";
|
||||
import { DRAFT } from "../B09_Estimation_UI_Tabs";
|
||||
import { ROUTE } from "./B09_Draft_Print_Route";
|
||||
|
||||
DRAFT.actions.push(() => {
|
||||
const button = createButton({
|
||||
label: "인쇄 미리보기",
|
||||
variant: "ghost",
|
||||
onClick: () => navigateTo(ROUTE.path as RoutePath),
|
||||
});
|
||||
button.dataset.b09Print = "";
|
||||
return button;
|
||||
});
|
||||
@@ -391,3 +391,13 @@ def test_수량_영역_PDF_시트_이름_지도_그림(quantity_bodies):
|
||||
missing = [s["name"] for s in body["sheets"] if s["name"] not in text]
|
||||
assert not missing
|
||||
assert sum(len(p.get_images()) for p in doc) >= 1 # 거리이정표 지도 그림이 들어감
|
||||
|
||||
|
||||
def test_B09_좌측_하단_단추는_초안_입구에서만():
|
||||
ui = _text(DRAFT / "B09_Draft_Print_UI.ts")
|
||||
assert "DRAFT.actions.push(" in ui and "navigateTo(ROUTE.path" in ui
|
||||
assert 'label: "인쇄 미리보기"' in ui
|
||||
shell = _text(ROOT / "B09_Estimation/B09_Estimation_UI_Shell.ts")
|
||||
assert 'import.meta.glob("./draft/*_UI.ts", { eager: true })' in shell
|
||||
dock = _text(ROOT / "B09_Estimation/B09_Estimation_UI_Dock.ts")
|
||||
assert "DRAFT.actions.map((make) => make())" in dock and "Print" not in dock
|
||||
|
||||
Reference in New Issue
Block a user