feat(m02): 자재목록 세 칸 기본값 — 「일반」 지움 · 빈 칸 사급 · 별도계상 · 포함 · 별도계상이면 운반비 꺼짐(162-1)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SE9MxeXTu2uaDZ55BJowAY
This commit is contained in:
2026-10-09 23:49:25 +09:00
co-authored by Claude Opus 5.5
parent 35d6b68c41
commit 365fef4fd4
5 changed files with 73 additions and 23 deletions
@@ -138,14 +138,20 @@ export interface LaborRow {
/** 로직 자재 세 칸(148-4) — {호표 차례: 세 칸} · 금액 무관 */
자재표시?: Record<string, MatMarks>;
}
/** 자재 세 칸(148-4 · 서버 `M02_Labor_Doc.MARKS` 와 같음) — 처음 값 없음(「—」) · 금액 무관 */
/** 자재 세 칸(148-4 · 서버 `M02_Labor_Doc.MARKS` 와 같음) — 빈 칸 = 읽을 때 기본값 · 금액 무관 */
export const MAT_MARKS = {
자재구분: ["일반", "관급", "사급"],
자재구분: ["관급", "사급"],
별도계상: ["별도계상", "직접계산"],
운반비: ["포함", "미포함"],
} as const;
export type MatMarkKey = keyof typeof MAT_MARKS;
export type MatMarks = { [K in MatMarkKey]?: (typeof MAT_MARKS)[K][number] };
/** 읽을 때 기본값(162-1 · 서버 `MARK_DEFAULT` 와 같음) — 저장은 비움 */
export const MAT_MARK_DEFAULT: Required<MatMarks> = {
자재구분: "사급",
별도계상: "별도계상",
운반비: "포함",
};
/** 허용 값만 남김(서버 `marks` 와 같은 규칙) */
export function cleanMarks(v: unknown): MatMarks {
const got = (v && typeof v === "object" ? v : {}) as Record<string, unknown>;