diff --git a/M02_MasterTemplete/M02_MasterTemplete_Hopyo_Left.ts b/M02_MasterTemplete/M02_MasterTemplete_Hopyo_Left.ts index 712d6c1af..e5dc65a0b 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_Hopyo_Left.ts +++ b/M02_MasterTemplete/M02_MasterTemplete_Hopyo_Left.ts @@ -19,7 +19,7 @@ import { t as L } from "@ui/ui_template_locale"; import { openModal } from "@ui/ui_template_modal"; import { createTable, type Cell } from "@ui/ui_template_table"; import { createText } from "@ui/ui_template_text"; -import { searchElements } from "../M01_MasterData/M01_MasterData_UI_Logic_Api"; +import { call } from "./M02_MasterTemplete_Api_Fetch"; import { guessHopyo, leftHopyo, @@ -132,7 +132,9 @@ export function pickMachine( let seq = 0; const run = (q: string): void => { const mine = ++seq; - searchElements("기계", q).then( + call<{ total: number; items: { ref: string; 이름?: string; 규격?: string }[] }>( + `/logic-lib/elements?group=${encodeURIComponent("기계")}&q=${encodeURIComponent(q)}&limit=100`, + ).then( (got) => { if (mine !== seq) return; find.hint.textContent = `${got.total}`; diff --git a/M02_MasterTemplete/M02_MasterTemplete_Labor_Table.ts b/M02_MasterTemplete/M02_MasterTemplete_Labor_Table.ts index 7fdd3e9f0..a28183dc6 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_Labor_Table.ts +++ b/M02_MasterTemplete/M02_MasterTemplete_Labor_Table.ts @@ -9,6 +9,7 @@ * · 줄 누름 = 줄 모달(`Labor_RowModal` — 옵션 · 메모 · 켜쌓기율 · 로직 자재 바꾸기 · 세 칸 · 단가산출) · * 사전조합 참조 줄 = 서고 원본 모달(`Labor_RefEdit`) · 사용자 자재 줄 = 자재 모달(세 칸) * · 금액 = 서버 calc(최신 응답만 · 저장 안 함) · [저장]은 UI_Main(서버가 수량 걷고 다시 셈) + * · 안 이은 고정 줄(729-3) = 격자 위 띠 · [연결](`Labor_Unlinked` — 이음만 · 저장은 [저장]) * 구조물 조합 일위대가(카드 · 열 상세)는 그대로 `Labor_Detail`(면적 잇기 · 수량산출). * ========================================================================== */ @@ -32,6 +33,7 @@ import { } from "./M02_MasterTemplete_Labor_Api"; import type { LaborDetailHandle, LaborDetailOptions } from "./M02_MasterTemplete_Labor_Detail"; import { laborBlock } from "./M02_MasterTemplete_Labor_Grid"; +import { unlinkedBar } from "./M02_MasterTemplete_Labor_Unlinked"; import { pasteInto } from "./M02_MasterTemplete_Labor_Paste"; import { openLogicPicker, withHopyo } from "./M02_MasterTemplete_Labor_Pick"; import { openRefEdit } from "./M02_MasterTemplete_Labor_RefEdit"; @@ -179,7 +181,8 @@ export function mountLaborTable( // 칸 초점이 표를 밀면(scroll) 메뉴가 바로 닫힘 — 밀림이 끝난 다음 그림에 엶 requestAnimationFrame(() => requestAnimationFrame(() => openTreeMenu(ev, menuAt(n)))); }); - gridHost.replaceChildren(grid.root); + const bar = unlinkedBar(cur, edit && ((qtyOnly) => changed(qtyOnly))); // 729-3 안 이은 줄 띠 + gridHost.replaceChildren(...(bar ? [bar] : []), grid.root); showSource(); for (const fn of watchers) fn(calc ?? last); }; diff --git a/resources/tester/test_729_3_hopyo_left_screen.py b/resources/tester/test_729_3_hopyo_left_screen.py index 40feabb03..ac5e882c8 100644 --- a/resources/tester/test_729_3_hopyo_left_screen.py +++ b/resources/tester/test_729_3_hopyo_left_screen.py @@ -113,6 +113,11 @@ def test_마법사_끝내기_막음_단가산출_칸_목록_열(): lib = _text("M02_MasterTemplete_Library_List.ts") assert 'L("M02_LibUnlinked"), (r) => (r.안이은줄' in lib assert "unlinkedBar(doc, edit)" in _text("M02_MasterTemplete_Labor_Grid.ts") + assert "unlinkedBar(cur, edit &&" in _text("M02_MasterTemplete_Labor_Table.ts") # 일위대가표 띠 + left = _text("M02_MasterTemplete_Hopyo_Left.ts") + assert ( + "/logic-lib/elements?group=" in left and "M01_MasterData_UI_Logic_Api" not in left + ) # 일반 사용자 길 for name in ( "M02_MasterTemplete_Hopyo_Left.ts", "M02_MasterTemplete_Hopyo_WizardSk.ts", diff --git a/ui_template/ui_template_locale_m2.ts b/ui_template/ui_template_locale_m2.ts index 066615d77..f69ab4cb0 100644 --- a/ui_template/ui_template_locale_m2.ts +++ b/ui_template/ui_template_locale_m2.ts @@ -319,7 +319,7 @@ export const ui_locales_m2 = { "우리 M01 에 없음 — 엑셀 숫자 그대로 고정 줄(사용자가 고른 것으로 남음)", "Not in M01 — keep the Excel numbers as a fixed row", ], - M02_GridUnlinked: ["M01 연결 없음 {n} 줄(옛 자료)", "{n} rows not linked to M01 (old data)"], + M02_GridUnlinked: ["M01 연결 없음 {n} 줄", "{n} rows not linked to M01"], M02_GridLink: ["연결", "Link"], M02_GridLinkTitle: ["안 이은 줄 연결", "Link unlinked rows"], M02_GridLinkNoLogic: [