feat(ui_template): 항목 고르기 모달 — 시험 · 글자 대비 · 새로 가져올 때 넣은 값 유지 · 편집 화면 높이 (PLAN 25-2d)
- test_item_picker_detail: 복사본 창구(가짜 · 약속 길 · 403 까닭) · 입력 목록 · 카드 순수 함수 · 한 벌 지킴 · 원본 층에 안 씀 - 자동값 · 확인 표시 글자 대비 4.5 이상 · 고르기 값은 원래 모양(숫자)으로 저장 - 새로 가져오기 = 원본에서 온 문서만 덮고 입력값은 남김 - 모달 폭 두 클래스로(공용 모달 폭에 안 밀림) · CAD · 시트 편집 높이 채움 Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01EauA2ATmqNRbeV48s9CcBr
This commit is contained in:
@@ -45,7 +45,7 @@ export interface ProjectItemInfo {
|
||||
|
||||
/** `{층}_{주인 슬러그}_{키}` — 서버 `snapshot_folder_name` 과 같은 글(owner 없음 = none · `/` = `-`) */
|
||||
export const folderOf = (row: PickerRow): string =>
|
||||
`${layerOf(row)}_${(ownerOf(row) ?? "none").replace("/", "-")}_${row.key}`;
|
||||
`${layerOf(row)}_${(ownerOf(row) ?? "none").replace(/\//g, "-")}_${row.key}`;
|
||||
|
||||
interface Reply {
|
||||
status: number;
|
||||
@@ -207,8 +207,14 @@ export function projectItems(projectId: string): ProjectItems {
|
||||
if (reply.status >= 400) throw new Error(reasonOf(reply));
|
||||
return reply.body as ProjectItemInfo;
|
||||
}
|
||||
delete fakeLoad(projectId)[info.폴더];
|
||||
return client.importItem(row);
|
||||
// 원본에서 온 문서(도면 · 면적 · 재료)만 새로 덮음 — 사용자가 넣은 값(입력값 · 고른자재)은 그대로
|
||||
const kept = fakeLoad(projectId)[info.폴더]?.parts;
|
||||
const fresh = await client.importItem(row);
|
||||
const item = fakeLoad(projectId)[fresh.폴더];
|
||||
for (const part of ["입력값", "고른자재"] as const)
|
||||
if (kept?.[part] !== undefined && item) item.parts[part] = kept[part];
|
||||
fakeSave(projectId);
|
||||
return fresh;
|
||||
},
|
||||
masterChanged: async (row, info) => {
|
||||
if (!fake) return info.마스터바뀜 === true;
|
||||
|
||||
Reference in New Issue
Block a user