diff --git a/M02_MasterTemplete/M02_MasterTemplete_ItemCards.ts b/M02_MasterTemplete/M02_MasterTemplete_ItemCards.ts index 4c034a8d..82edbfcc 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_ItemCards.ts +++ b/M02_MasterTemplete/M02_MasterTemplete_ItemCards.ts @@ -123,10 +123,15 @@ export interface ItemCardsHandle { column: () => string | null; /** 카드(도면 · 면적산출 · 재료산출)에 저장 안 한 고침이 있나 — 페이지가 떠날 때 물음 */ dirty: () => boolean; +<<<<<<< HEAD /** 고친 카드를 모두 저장(도면 · 엑셀) — 실패하면 던짐 */ saveAll: () => Promise; /** 저장 안 한 카드 고침을 버림(물음에서 「확인」 뒤) */ discard: () => void; +======= + /** 고친 카드를 모두 저장 — 실패하면 던짐 */ + saveAll: () => Promise; +>>>>>>> origin/main_laptop_1 destroy: () => void; } @@ -417,10 +422,13 @@ export function createItemCards(opts: ItemCardsOptions): ItemCardsHandle { await preview?.save(); // 도면 카드(31-4) for (const c of sheets) await saveCard(c); }, +<<<<<<< HEAD discard: () => { drop(); opts.onDirty?.(false); }, +======= +>>>>>>> origin/main_laptop_1 destroy: () => { seq += 1; drop(); diff --git a/M02_MasterTemplete/M02_MasterTemplete_Structure.ts b/M02_MasterTemplete/M02_MasterTemplete_Structure.ts index 30a1b1be..8db66bf3 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_Structure.ts +++ b/M02_MasterTemplete/M02_MasterTemplete_Structure.ts @@ -381,7 +381,11 @@ export interface StructurePanelHandle { reload: () => Promise; /** 「선택 입력」 카드에서 고른 자리를 서버에 저장 — 집계표 [저장] 뒤에 부름(실패하면 던짐) */ saveInputs: () => Promise; +<<<<<<< HEAD /** 카드에 저장 안 한 고침(도면 31-4 · 면적산출 · 재료산출 31-3) — 페이지가 떠날 때 함께 물음 */ +======= + /** 카드(도면 31-4 · 면적산출 · 재료산출 31-3)에 저장 안 한 고침 — 페이지가 떠날 때 함께 물음 */ +>>>>>>> origin/main_laptop_1 dirty: () => boolean; /** 고친 카드 저장(도면 · 엑셀) — 집계표 [저장] 이 카드를 다시 읽기 전에 부름(실패하면 던짐) */ saveCards: () => Promise; diff --git a/M02_MasterTemplete/M02_MasterTemplete_UI_Main.ts b/M02_MasterTemplete/M02_MasterTemplete_UI_Main.ts index 480f213f..2e7279b3 100644 --- a/M02_MasterTemplete/M02_MasterTemplete_UI_Main.ts +++ b/M02_MasterTemplete/M02_MasterTemplete_UI_Main.ts @@ -205,7 +205,11 @@ export function createMain( }; window.addEventListener("beforeunload", guard); const confirmLeave = async (): Promise => { +<<<<<<< HEAD if (!busy()) return true; // 카드 고침(도면 · 엑셀)도 같은 물음 +======= + if (!busy()) return true; +>>>>>>> origin/main_laptop_1 if (!(await showConfirmDialog(L("M02_DiscardConfirm")))) { // 취소 — 초점을 시트(고른 칸 입력 자리) · 집계표 · 도면으로 돌려 키보드 그대로 host diff --git a/resources/tester/test_m02_drawing_card.py b/resources/tester/test_m02_drawing_card.py index 03521d06..bd66c436 100644 --- a/resources/tester/test_m02_drawing_card.py +++ b/resources/tester/test_m02_drawing_card.py @@ -45,9 +45,19 @@ def test_저장_안_한_카드_고침은_물음(): "if (preview?.dirty() && col?.id !== column && !(await showConfirmDialog(TEXT.discard)))" in cards ) +<<<<<<< HEAD # 도면 카드 + 엑셀 카드(31-3) 둘 다 봄 assert "dirty: () => !!preview?.dirty() || sheets.some((c) => c.dirty)," in cards assert "dirty: () => cards.dirty()," in _text("M02_MasterTemplete_Structure.ts") main = _text("M02_MasterTemplete_UI_Main.ts") assert "const busy = (): boolean => dirty || !!panel?.dirty();" in main assert main.count("!busy()") >= 2 # 떠날 때 물음 · 창 닫기 막음 +======= + assert ( + "dirty: () => !!preview?.dirty() || sheets.some((c) => c.dirty)," in cards + ) # 도면 + 엑셀 카드(31-3) + assert "dirty: () => cards.dirty()," in _text("M02_MasterTemplete_Structure.ts") + main = _text("M02_MasterTemplete_UI_Main.ts") + assert "const busy = (): boolean => dirty || !!panel?.dirty();" in main + assert main.count("if (!busy()) return") >= 2 # 떠날 때 물음 · 창 닫기 막음 +>>>>>>> origin/main_laptop_1