fix(M02): 31-3 합치기 충돌 표시 풀기 — 도면 카드(31-4) · 엑셀 카드(31-3) 둘 다 살림
- main_laptop_1 의 auto 커밋(99a514d9)이 ItemCards · Structure · UI_Main 에 충돌 표시를 그대로 올림 — 군데마다 양쪽을 합침
- ItemCards: 글(도면 버림 물음 + 저장 글) · 옵션(onDirty + sheetEdit) · 손잡이 dirty = 도면 또는 엑셀 · saveAll = 도면 먼저 · 엑셀 · discard 새로 · 옛 hideToolbar 는 DrawingCard 몫이라 뺌
- DrawingCard: save() 드러냄(위 [저장]이 먼저 부름 · 못 하면 던짐)
- Structure: 다른 항목 고름 물음은 한 번(카드 셋 모두) · 확인이면 discard 뒤 읽음 · 손잡이 dirty 한 벌 · saveCards
- UI_Main: 떠나기 · 창 닫기 막기 = busy()(이 화면 + 카드 둘)
- 시험 test_m02_drawing_card 물음 판정을 합친 모양으로
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01Ly2oHAaTDYRjcniAmHR81z
This commit is contained in:
@@ -194,26 +194,18 @@ export function createMain(
|
||||
let cpanel: ComboPanel | null = null; // 면적산출 · 재료산출 오른쪽 조합 패널(프로젝트 층 아님)
|
||||
let seq = 0;
|
||||
let dirty = false;
|
||||
/** 저장 안 한 고침 — 이 화면 + 면적산출 · 재료산출 카드(31-3) */
|
||||
/** 저장 안 한 고침 — 이 화면 + 카드(도면 31-4 · 면적산출 · 재료산출 31-3) */
|
||||
const busy = (): boolean => dirty || !!panel?.dirty();
|
||||
|
||||
const guard = (event: BeforeUnloadEvent): void => {
|
||||
if (!root.isConnected) return window.removeEventListener("beforeunload", guard);
|
||||
<<<<<<< HEAD
|
||||
if (!dirty && !panel?.dirty()) return;
|
||||
=======
|
||||
if (!busy()) return;
|
||||
>>>>>>> origin/sub_laptop_8
|
||||
event.preventDefault();
|
||||
event.returnValue = "";
|
||||
};
|
||||
window.addEventListener("beforeunload", guard);
|
||||
const confirmLeave = async (): Promise<boolean> => {
|
||||
<<<<<<< HEAD
|
||||
if (!dirty && !panel?.dirty()) return true; // 도면 카드 고침(31-4)도 같은 물음
|
||||
=======
|
||||
if (!busy()) return true;
|
||||
>>>>>>> origin/sub_laptop_8
|
||||
if (!busy()) return true; // 카드 고침(도면 · 엑셀)도 같은 물음
|
||||
if (!(await showConfirmDialog(L("M02_DiscardConfirm")))) {
|
||||
// 취소 — 초점을 시트(고른 칸 입력 자리) · 집계표 · 도면으로 돌려 키보드 그대로
|
||||
host
|
||||
|
||||
Reference in New Issue
Block a user