- 표 resources/master_data/자재조합.json → resources/master_template/자재조합.json(git mv) · 키 UM 은 표 안 「다음」 번호 · _키대장 · master_keys 의 UM 뺌 · check_master 틀이 새 자리를 같이 봄
- 서버: M01 /api/m01/matset* 뺌 · M02 저장소 M02_MasterTemplete_Matset.py(목록 · 새로 · 고치기 · 지우기 · 쓰는 열 검사) · 길 GET/POST /api/m02/material-combos · PUT/DELETE /api/m02/material-combos/{키} · 갈라 내기(branchMaterialCombo)도 이 저장소로
- 화면: M01 좌측 「자재 조합」 컨테이너 뺌 · M02 좌측 「자재 조합」 컨테이너(찾기 · 키 맨 앞 목록 · 새로 · 본떠 만들기 · 지우기) · 메인 칸 상세(이름 · 비고 · 본뜬키 · 담은 자재 표 · 자재 더하기 · 빼기 · 저장) · 쓰는 열이 있으면 지우기는 확인 창 없이 알림
- 시험: test_m01_matset → test_m02_matset · test_m02_combo_branch 사본 자리 · 실제 자재 코드
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01VwJQ5eRrCKf3nH9EFeKvJz
46 lines
1.9 KiB
TypeScript
46 lines
1.9 KiB
TypeScript
/* =============================================================================
|
|
* M02_MasterTemplete_UI_Page.ts
|
|
* 마스터 템플릿 화면 — 좌측 도킹 패널(시스템 양식 목록) / 우측 편집 칸(표·도면 부품)
|
|
*
|
|
* 화면은 로그인만 확인 — 시스템 층 고치기는 시스템 관리자일 때만 켬(서버도 막음).
|
|
* ========================================================================== */
|
|
|
|
import "@ui/ui_template_workflow_layout.css";
|
|
import { el } from "@ui/ui_template_elements";
|
|
import { t as L } from "@ui/ui_template_locale";
|
|
import { createWorkflowOverlays } from "@ui/ui_template_overlay";
|
|
import { fetchSessionUser } from "../A06_Login/A06_Login_Api_Fetch";
|
|
import { createMain } from "./M02_MasterTemplete_UI_Main";
|
|
import { buildSide } from "./M02_MasterTemplete_UI_Side";
|
|
import "./M02_MasterTemplete_UI_Style.css";
|
|
|
|
export async function renderM02MasterTemplate(root: HTMLElement): Promise<void> {
|
|
const user = await fetchSessionUser().catch(() => null);
|
|
const isAdmin = user?.role === "SYSTEM_ADMIN";
|
|
const main = createMain(isAdmin, () => void side.refresh());
|
|
const side = buildSide({
|
|
isAdmin,
|
|
onOpen: (sel) => void main.open(sel),
|
|
getOpen: main.current,
|
|
confirmLeave: main.confirmLeave,
|
|
showView: main.showView,
|
|
});
|
|
|
|
const layout = el("div", { className: "ui-workflow-layout m02-master" });
|
|
const overlays = createWorkflowOverlays({
|
|
title: L("M02_Title"),
|
|
optionsContent: el("div", { className: "m02-master__side", children: [side.root] }),
|
|
showProjectName: false,
|
|
onOptionsOpenChange: (isOpen) => layout.classList.toggle("is-options-open", isOpen),
|
|
});
|
|
layout.append(
|
|
el("div", {
|
|
className: "ui-workflow-layout__body",
|
|
children: [el("main", { className: "ui-workflow-layout__main", children: [main.root] })],
|
|
}),
|
|
overlays.root,
|
|
);
|
|
root.innerHTML = "";
|
|
root.append(layout);
|
|
}
|