fix(M02): 층 길 목록 모양 · 프로젝트 층 표는 설계값 채운 문서로 보임 (PLAN 10-1)
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0148XFUpPfpiuTjxF1EK9c95
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
import { createButton, el, showToast } from "@ui/ui_template_elements";
|
||||
import { t as L } from "@ui/ui_template_locale";
|
||||
import {
|
||||
readFilled,
|
||||
readTemplate,
|
||||
saveTemplate,
|
||||
StaleError,
|
||||
@@ -131,9 +132,18 @@ export function createMain(isAdmin: boolean): MainHandle {
|
||||
try {
|
||||
const got = await readTemplate(next.layer, next.kind, next.name, next.projectId);
|
||||
if (mine !== seq) return;
|
||||
version = got.판;
|
||||
version = got.판 ?? "";
|
||||
loaded = got.문서;
|
||||
await mount(got.문서, next);
|
||||
// 프로젝트 층 표 — 작업본 판은 그대로 두고 보이는 문서만 설계값으로 채움(서버가 채움 · 저장 안 함)
|
||||
const shown =
|
||||
next.layer === "project" && next.kind === "table" && next.projectId
|
||||
? await readFilled(next.projectId, next.name).then(
|
||||
(f) => f.문서,
|
||||
() => got.문서,
|
||||
)
|
||||
: got.문서;
|
||||
if (mine !== seq) return;
|
||||
await mount(shown, next);
|
||||
} catch (error) {
|
||||
if (mine !== seq) return;
|
||||
empty("");
|
||||
|
||||
Reference in New Issue
Block a user