Files
Aislo/B09_Estimation/draft/B09_Draft_Print_UI.ts
T
eomsangdonandClaude Opus 5.5 17e6500cf6 fix(506-3 B07 · CAD 작은 흠): 저장 길 · 죽은 길 걷음 · CAD 되돌리기 · B09 인쇄 미리보기 · M02 도움말
- 1-A 도면 GET · 저장 PUT 한도 60 s · 저장 중 미리받기 쉼 · 끊긴 저장 = 목록 confirmed 로 판정
- 2 CAD 자동백업 열쇠 = b07:{프로젝트}:{도면} · 도각 편집 = b07-frame:{프로젝트} · [초기화] 같은 열쇠
- 3-1 [초기화] 물음 글 = 프로젝트 도각 그대로 · [도각 편집] → [기본 도각 복원] 안내
- 3-2 풀린 장 저장본 json · 수량표 찌꺼기 걷음(_write_manifest 한 곳)
- 5-1 확정 풀기 · 배치 · 축척 = mark_stage(save)
- 7-3 start_stage 가 DEV_UNLOCK 표식 남김
- 6-a navigateDrawing · onNavigate · hasPrev · hasNext 걷음 · 6-b cad-host-save 토글 걷음 · 4-2 B08 안 쓰는 글 11 걷음
- 6-f 특성 판 색 끌기 = 되돌리기 한 칸(paintNowCommitLater 한 벌) · 6-g LAYMRG 사본 길
- 4-1 B09 [인쇄 미리보기] = 저장 뒤 이동 · 단계 그대로 · 6-e M02 카드 도움말 DWG 한 줄
- 시험 test_506_3_* 둘 · cad/undo-506-3 · test_298_2_b07_buttons 열쇠 맞춤

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-10-21 12:48:36 +09:00

30 lines
1.3 KiB
TypeScript

/* =============================================================================
* B09_Draft_Print_UI.ts
* 인쇄 미리보기 등록 입구(PLAN 302-1 · 초안) — B09 셸이 `import.meta.glob("./draft/*_UI.ts")` 로 불러올 때
* 좌측 하단 고정 줄(`DRAFT.actions`)에 [인쇄 미리보기] 단추 → 저장(`DRAFT.save`) 뒤 #/b09-print(`…_Print_Route`)
* · 단계 그대로 · 저장 실패면 머묾 ·
* [>] 다음 길(`DRAFT.next` · 저장 · 단계 6 완료 뒤 · 요구 298-2)
* 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.next = () => navigateTo(ROUTE.path as RoutePath);
DRAFT.actions.push(() => {
const button = createButton({
label: "인쇄 미리보기",
variant: "ghost",
onClick: () =>
void (DRAFT.save?.() ?? Promise.resolve(true)).then(
(ok) => ok && navigateTo(ROUTE.path as RoutePath),
),
});
button.dataset.b09Print = "";
return button;
});