feat(M01): 테스트 컨테이너 고르기 부품 공용화 — 구분 → 상세구분 → 후보 거름 · B·C 에도 재료 바꿔 보기
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_016WRFJmmhPi4exAzHgPZHMT
This commit is contained in:
@@ -23,6 +23,8 @@ import {
|
||||
type FlowColumn,
|
||||
type FlowKind,
|
||||
} from "./M01_MasterData_UI_Test_C_Model";
|
||||
import { hasPickable, pickPanel, swappedRow, type Swaps } from "./M01_MasterData_UI_Test_Pick";
|
||||
import { tt } from "./M01_MasterData_UI_Test_Text";
|
||||
import "./M01_MasterData_UI_Test_C_Style.css";
|
||||
|
||||
const TEXT = {
|
||||
@@ -69,6 +71,8 @@ function mount(host: HTMLElement, one: LogicOne): void {
|
||||
for (const spec of row.입력 ?? []) {
|
||||
if (spec.고르기?.length) values[spec.이름] = String(spec.고르기[0]);
|
||||
}
|
||||
const swaps: Swaps = new Map();
|
||||
const picker = pickPanel(one, swaps, () => run());
|
||||
const open = new Set<string>();
|
||||
const subs = new Map<string, LogicRow>();
|
||||
let answer: CalcAnswer | null = null;
|
||||
@@ -178,7 +182,8 @@ function mount(host: HTMLElement, one: LogicOne): void {
|
||||
inputs[spec.이름] =
|
||||
option !== undefined ? option : Number.isNaN(Number(raw)) ? raw : Number(raw);
|
||||
}
|
||||
void runCalc({ key: row.키, inputs })
|
||||
const swapped = swappedRow(row, swaps);
|
||||
void runCalc({ key: row.키, inputs, ...(swapped ? { row: swapped, file: one.file } : {}) })
|
||||
.then((got) => {
|
||||
answer = got;
|
||||
redraw();
|
||||
@@ -208,6 +213,14 @@ function mount(host: HTMLElement, one: LogicOne): void {
|
||||
? [el("p", { className: "m01c__bad", text: one.reasons.join(" · ") })]
|
||||
: []),
|
||||
stopped,
|
||||
...(hasPickable(row)
|
||||
? [
|
||||
el("details", {
|
||||
attrs: { open: "" },
|
||||
children: [el("summary", { text: tt("Mat_Title") }), picker],
|
||||
}),
|
||||
]
|
||||
: []),
|
||||
el("div", {
|
||||
className: "m01c__flow",
|
||||
children: [inputColumn(row, values, later), rest],
|
||||
|
||||
Reference in New Issue
Block a user