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
@@ -97,6 +97,21 @@ export type CalcAnswer =
}
| { ok: false; reason: string };
export interface TextLine {
이름: string;
글: string;
금액: number;
까닭?: string;
}
/** `POST /text` 답 — 서버가 만든 읽는 식 줄(화면은 그대로 찍음) */
export type TextAnswer =
| {
ok: true;
groups: { 비목: string; 줄: TextLine[]; 소계: number; 끝수: string }[];
계: number;
}
| { ok: false; reason: string };
export interface SubBrief {
name: string;
book: string | null;
@@ -183,6 +198,13 @@ export const runCalc = (body: {
file?: string;
}): Promise<CalcAnswer> => request("/calc", body);
export const runText = (body: {
key: string;
inputs: Record<string, unknown>;
row?: LogicRow;
file?: string;
}): Promise<TextAnswer> => request("/text", body);
export const saveFiles = (
files: SaveFile[],
): Promise<{ files: { file: string; version: string }[] }> => request("/save", { files });