fix(M02): [재적용] 가져온이 새로 적음 · M02 미리보기 이름표 [삭제] 작은 단추 틀(142-2 · 136-3 뒤처리)

- reapply(who) · 라우터가 세션 가져온이를 넘김
- M02_SO_Style.css 미리보기 상자 이름표 단추 = B05 작은 단추 틀과 같은 꼴
- 시험: test_item_copy_complete 재적용 가져온이 · test_136_3 M02 규칙

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_015sDZSjFvoiDjdGpgj3muc3
This commit is contained in:
2026-10-09 15:11:32 +09:00
co-authored by Claude Opus 5.5
parent da8bedf115
commit 4bb72b5987
5 changed files with 31 additions and 3 deletions
+7 -2
View File
@@ -231,8 +231,11 @@ def _kept_picks(picks: Any, labor: dict[str, Any]) -> dict[str, Any]:
return out
def reapply(project_root: str | Path, folder: str) -> dict[str, Any]:
"""재적용 — 원본(층 · 마스터)을 다시 가져옴 · 입력값 · 고른자재는 같은 키면 살림.
def reapply(
project_root: str | Path, folder: str, who: dict[str, Any] | None = None
) -> dict[str, Any]:
"""재적용 — 원본(층 · 마스터)을 다시 가져옴 · 입력값 · 고른자재는 같은 키면 살림 ·
`who` = 가져온이 새로(142-2).
원본과 달라 덮인 파일(도면 · 면적)은 `덮임` 에 알림."""
target = folder_of(project_root, folder)
@@ -262,6 +265,8 @@ def reapply(project_root: str | Path, folder: str) -> dict[str, Any]:
# 원본을 다시 가져왔으니 시트 고침은 없음 — 살린 입력값 · 고른 자재는 `값있음` 으로 따로 알림
kept = bool(kept_values or files[PICKS_FILE])
fresh = {**manifest, "판": source, "원본판": source, "가져온날": stamp, "고침": False}
if who:
fresh["가져온이"] = who
fresh["값있음"] = kept
fresh.pop("고친날", None)
atomic_write_json(target / MANIFEST_NAME, fresh)
@@ -29,6 +29,7 @@ from common_util.common_util_summary_item import parse_summary_item
from M02_MasterTemplete import M02_Item_Copy as copies
from M02_MasterTemplete import M02_MasterTemplete_Router_Layers as layer_routes
from M02_MasterTemplete import M02_MasterTemplete_Store as store
from M02_MasterTemplete.M02_Item_Snapshot import importer
from M02_MasterTemplete.M02_Item_Source import item_name
router = APIRouter(prefix="/api/projects", tags=["M02 Project Items"])
@@ -162,7 +163,8 @@ async def write_item_file(
async def reapply_item(
project_id: str, folder: str, session: dict[str, Any] = Depends(verify_session)
) -> dict[str, Any]:
return await _run(copies.reapply, await _root(session, project_id), folder)
root = await _root(session, project_id)
return await _run(copies.reapply, root, folder, importer(session)) # 가져온이(142-2)
@router.post("/{project_id}/items/{folder}/save-as")
@@ -357,3 +357,14 @@
.m02-sod__specpreview {
max-width: 28rem;
}
/* 미리보기 상자 이름표 [삭제] — B05 상자 안 작은 단추 틀과 같은 꼴(136-3 · M02 는 B05 CSS 를 안 읽음) */
.m02-sod__block .b05-structure__group > legend > button {
box-sizing: border-box;
height: 26px;
min-height: 0;
padding-block: 0;
padding-inline: var(--spacing-8);
font-size: var(--text-caption);
line-height: 1;
}