Files
Aislo/M02_MasterTemplete/M02_MasterTemplete_UI_Page.ts
T
eomsangdonandClaude Opus 5.5 155d1eefbe feat(M02): 좌측 패널 재구성 — 구조물 집계 양식 아래 하위 넷 · 첫 화면 구조물집계표
- 「표 양식」 → 「구조물 집계 양식」 · 구조물집계표 줄 하나만 · 새로 · 본떠 만들기 · 지우기 단추 삭제
- 구조물 도면 · 면적산출 · 재료산출 · 자재 조합 컨테이너를 그 아래 하위로(들여 씀 · 같이 접힘) · 도면 양식은 별도 최상위
- 들어오면 구조물집계표를 엶 · 양식 지움 · 자재 조합 상세 닫음 뒤에도 빈 화면 대신 구조물집계표
- 표 새 양식 틀 · 표 복사 머리 이름 바꿈(이제 안 쓰는 길) 걷어냄 · 시험 고침

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_019Kyw9qnkJ94pC1A4PfpDtA
2026-09-29 08:40:09 +09:00

59 lines
2.3 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 { STRUCTURE_TABLE } from "./M02_MasterTemplete_Structure";
import { createMain, type Selection } 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(),
() => side.paint(),
);
// 첫 화면 · 닫은 뒤(양식 지움 · 자재 조합 상세 닫음) = 구조물집계표 — 빈 화면 없음
const home: Selection = {
layer: "system",
projectId: null,
kind: "table",
name: STRUCTURE_TABLE,
};
const side = buildSide({
isAdmin,
onOpen: (sel) => void main.open(sel ?? home),
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);
void main.open(home);
}