fix(720-4): 도면 양식 칸 = 누구나 늘 보임(읽기 · 고르기) · 새로 · 본떠 · 지우기 단추만 시스템 관리자 · 실무문서 그대로

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-01 21:59:18 +09:00
co-authored by Claude Sonnet 5.5
parent 2fb57be255
commit 23d8e2d7a2
2 changed files with 10 additions and 8 deletions
@@ -161,10 +161,8 @@ export function buildSide(opt: SideOptions): SideHandle {
? void Promise.all([precombo.refresh(), sangeun.refresh()])
: document.removeEventListener(HOPYO_BUILT, onBuilt);
document.addEventListener(HOPYO_BUILT, onBuilt);
// 도면 양식은 시스템 층(마스터 템플릿)에만 — 시스템 관리자면 늘(720-4)
const drawing = opt.isSystem
? section(L("M02_KindDrawing"), bodies.get("drawing")!, ...actionRow("drawing"))
: null;
// 도면 양식 칸 = 누구나 늘(읽기 · 고르기) · 새로 · 본떠 · 지우기 단추만 시스템 관리자
const drawing = section(L("M02_KindDrawing"), bodies.get("drawing")!, ...actionRow("drawing"));
// 실무문서(옛 마스터 일위대가 조합 · PLAN 39-2) — 구조물 조합 밖 · 도면 양식 아래 · 시스템 관리자만
const practice = opt.isSystem
? buildPracticeSection({
@@ -188,7 +186,7 @@ export function buildSide(opt: SideOptions): SideHandle {
summary,
createDivider(),
section(hopyo.title, hopyo.body),
...(drawing ? [drawing] : []),
drawing,
...(practice ? [section(practice.title, practice.body)] : []),
],
});
@@ -259,7 +257,7 @@ export function buildSide(opt: SideOptions): SideHandle {
const mine = ++seq;
paintButtons();
try {
items = opt.isSystem ? await listTemplates(layer, null) : []; // 도면 양식 목록 — 시스템 관리자만
items = await listTemplates(layer, null); // 도면 양식 목록 — 누구나
} catch (error) {
items = [];
showToast(L("M02_LoadFailed").replace("{value}", why(error)), "error");
@@ -78,7 +78,7 @@ def test_화면_층_단추_최상위_폴더_이름_바꾸기():
def test_구조물_조합_층_제자리_바꿈():
"""720-4 — 해시 이동 없음 · replaceState · 나무 · 층 줄 · 띠를 감싼 칸에 갈아 끼움 · 권한 = 함수 ·
도면 양식 · 실무문서 = 시스템 관리자면 늘 · 불러오기 장부 = 열 때 층 · 권한."""
도면 양식 = 누구나(단추는 관리자) · 실무문서 = 시스템 관리자 · 불러오기 장부 = 열 때 층 · 권한."""
page = _text("M02_MasterTemplete_UI_Page.ts")
assert "navigateTo" not in page
switch = page.split("const switchStructure = async")[1].split("const go =")[0]
@@ -91,6 +91,10 @@ def test_구조물_조합_층_제자리_바꿈():
assert "() => isAdmin," in page and 'isSystem: user?.role === "SYSTEM_ADMIN",' in page
assert "main.root.isConnected ? void afterItem()" in page # 나무를 갈아도 듣기 그대로
side = _text("M02_MasterTemplete_UI_Side.ts")
assert "const drawing = opt.isSystem" in side and "const practice = opt.isSystem" in side
assert "const drawing = section(" in side and "const practice = opt.isSystem" in side
# 도면 양식 칸 = 누구나 · 단추만 관리자(720-4 덧)
assert "const drawing = opt.isSystem" not in side
assert 'if (!opt.isSystem) return [];' in side
assert "items = await listTemplates(layer, null);" in side
hopyo = _text("M02_MasterTemplete_Hopyo_Side.ts")
assert "buildHopyoLedger({ scope: pageScope(), canWrite: opt.canWrite() })" in hopyo