feat(M02): 항목 하나 비우기 길 — 도면 · 일위대가 · 면적산출을 새 열과 같은 빈 문서로 (40-4)

- POST /api/m02/layers/{층}/{structures|labor|area}/{열}/clear(owner) · 번호 · 열 그대로 · 받는 층 쓰기 권한(_root)
- Store.clear · 면적을 비우면 그 열 일위대가 계산값 다시 · 장부 맞춤
- 화면 함수 Api_Fetch clearPart

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01EYJJRCfHfdCGNhmXTjQKV7
This commit is contained in:
2026-10-04 22:21:23 +09:00
co-authored by Claude Opus 5.5
parent 7cdc7b08da
commit 00cb6db66f
4 changed files with 176 additions and 0 deletions
@@ -226,6 +226,19 @@ export const copyPartFrom = async (
});
};
/** 항목 하나 비우기(40-4 · 카드 [삭제]) — 새 열과 같은 빈 문서 · 번호 · 열 그대로 · 지금 층 */
export const clearPart = (
kind: "structure" | "labor" | "area",
column: string,
): Promise<TemplateInfo> =>
call(
owned(
activeLayer,
`/layers/${activeLayer}/${kind === "structure" ? "structures" : kind}/${enc(column)}/clear`,
),
{ method: "POST" },
);
/** 다른 열(`from`) 구조물 도면 내용을 받는 열(`column`)로 가져옴 — 도번 · 열은 받는 쪽 그대로 */
export const copyStructure = async (column: string, from: string): Promise<void> => {
await scoped(`/structures/${enc(column)}/copy?from=${enc(from)}`, { method: "POST" });