diff --git a/B09_Estimation/draft/B09_Draft_Print_Types.ts b/B09_Estimation/draft/B09_Draft_Print_Types.ts new file mode 100644 index 000000000..8d096f5c0 --- /dev/null +++ b/B09_Estimation/draft/B09_Draft_Print_Types.ts @@ -0,0 +1,32 @@ +/* ============================================================================= + * B09_Draft_Print_Types.ts + * 인쇄 미리보기(PLAN 302 · 초안) 약속 — 영역 셋이 페이지(`B09_Draft_Print_Page`)에 넘기는 꼴. + * 수량산출 = `B09_Draft_Print_Quantity.collectQuantitySheets` · 원가계산 = `B09_Draft_Print_Cost.collectCostSheets` + * → PrintSheet[](쪽 = 시트 · 차례 그대로) → 서버 표 PDF · 엑셀 + * 도면 = `B09_Draft_Print_Drawings.fetchDrawingList` · `fetchDrawingsPdf`(서버가 만든 PDF 그대로) + * ========================================================================== */ + +import type { DataTableOptions } from "@ui/ui_template_data_table"; + +/** 표 한 쪽(시트) — 화면과 같은 표 짜기 + 쪽 방향 · 붙일 그림 */ +export interface PrintSheet { + id: string; + name: string; + table: DataTableOptions; + orientation?: "portrait" | "landscape"; + images?: { src: string; caption?: string }[]; +} + +/** 수량산출 · 원가계산 영역 — 프로젝트의 쪽 목록(차례 그대로) */ +export type CollectSheets = (projectId: string) => Promise; + +/** 도면 영역 한 장 — id = fetchDrawingsPdf 의 ids 로 돌려줌 */ +export interface DrawingItem { + id: string; + name: string; +} + +export type FetchDrawingList = (projectId: string) => Promise; + +/** ids 없음 = 목록 전부 · 있으면 그 차례대로 */ +export type FetchDrawingsPdf = (projectId: string, ids?: string[]) => Promise;