feat(M01): 로직 개선 시험 「텍스트 수식」 컨테이너 — 서버 /text 가 준 줄(비목 묶음 · 소계 · 끝수 · 까닭 옅게)을 그대로 찍음

- `runText` API + 시험 계산 때 `/calc` 와 같은 몸으로 같이 부름 · 화면은 다시 계산하지 않음
- 멈추면 서버 까닭 한 줄
- ORCA 13-4-1 · 12-4 · 12-17-1 소계 합이 호표 계와 같음 · 모달 표 뜸

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
2026-09-21 19:46:56 +09:00
co-authored by Claude Sonnet 5
parent b99585da59
commit 448ef6080f
7 changed files with 118 additions and 13 deletions
@@ -13,6 +13,7 @@ import type {
HoLine,
LogicRow,
NamedFormula,
TextAnswer,
} from "./M01_MasterData_UI_Logic_Api";
import { formatNumber, qtyKind } from "./M01_MasterData_UI_Logic_Edit";
import { tx } from "./M01_MasterData_UI_Logic_Text";
@@ -28,6 +29,8 @@ export interface DetailContext {
prices: Record<string, ElementBrief | null>;
/** 마지막 시험 계산의 줄 — 호표 차례 뒤에 덧줄 */
lines: CalcLine[] | null;
/** 마지막 시험 계산의 읽는 식 줄(서버가 줌) */
text: TextAnswer | null;
values: Record<string, string>;
onChange: () => void;
/** 시험 계산 칸(`buildCalc` 가 채움) — 넷째 컨테이너 안에 놓음 */
@@ -280,7 +283,7 @@ function hoBox(ctx: DetailContext): HTMLElement {
/** 상세 화면 넷을 `host` 에 쌓음 */
export function buildLabDetail(host: HTMLElement, ctx: DetailContext): void {
const formula = el("div", { className: "m01lab__formula" });
buildFormula(formula, { row: ctx.row, lines: ctx.lines });
buildFormula(formula, { text: ctx.text });
host.replaceChildren(
infoBox(ctx),
hoBox(ctx),