feat(m01-lb): Entry 예시값 계산을 lbCalcLater 로 · 임시 대신 길 걷음
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016PSXsvyDxjNmufteN5bqmt
This commit is contained in:
@@ -20,7 +20,6 @@ import type { CalcAnswer, LogicInput, LogicRow } from "../M01_MasterData_UI_Logi
|
||||
import { formatMoney } from "../M01_MasterData_UI_Logic_Money";
|
||||
import { formatNumber } from "../M01_MasterData_UI_Logic_Edit";
|
||||
import {
|
||||
calcLater,
|
||||
copyEasy,
|
||||
listEasy,
|
||||
openEasy,
|
||||
@@ -117,7 +116,7 @@ interface Paper {
|
||||
tables: LbTables;
|
||||
}
|
||||
|
||||
/* ponytail: Blocks(sub7) · LB Api(sub4) 속이 「준비 중」 인 동안만 대신함 — 채워지면 두 catch 를 지움 */
|
||||
/** 블록 읽기 — 못 읽는 꼴이면 null(세 칸은 원래 줄로 보임) */
|
||||
const blocksOf = (row: LogicRow, key: string, version: string, isBase: boolean): LbLogic | null => {
|
||||
try {
|
||||
return readLogic(row, { key, version, isBase });
|
||||
@@ -125,16 +124,6 @@ const blocksOf = (row: LogicRow, key: string, version: string, isBase: boolean):
|
||||
return null;
|
||||
}
|
||||
};
|
||||
const calcWith = (
|
||||
p: Paper,
|
||||
onDone: (ans: CalcAnswer | null, plain: string | null) => void,
|
||||
): void => {
|
||||
try {
|
||||
lbCalcLater(p.row, p.trial, p.tables, onDone);
|
||||
} catch {
|
||||
calcLater(p.row, p.trial, onDone);
|
||||
}
|
||||
};
|
||||
|
||||
/** 「쉬운 단가산출(시험)」 옆에 놓는 단추 — 누르면 큰 창 */
|
||||
export function createLogicBuilderButton(): HTMLButtonElement {
|
||||
@@ -306,7 +295,7 @@ function openLogicBuilder(): void {
|
||||
|
||||
const calc = (): void => {
|
||||
drawResult(true);
|
||||
calcWith(p, (next, plain) => {
|
||||
lbCalcLater(p.row, p.trial, p.tables, (next, plain) => {
|
||||
ans = next;
|
||||
note.textContent = plain ?? "";
|
||||
drawResult(false);
|
||||
|
||||
Reference in New Issue
Block a user