오류 수정

This commit is contained in:
2026-02-11 02:35:33 +09:00
parent f3e0e08c6b
commit 66d4f54e98
7 changed files with 165 additions and 73 deletions

View File

@@ -169,12 +169,27 @@ window.toggleSelectAll = (isChecked) => {
};
/** 선택 리셋 */
// [수정] 기존 resetSelection을 모달 오픈으로 변경
window.resetSelection = () => {
if (!confirm('선택된 내역을 모두 초기화할까요?')) return;
const modal = document.getElementById('selection-reset-modal');
modal.classList.remove('hidden');
modal.classList.add('flex');
};
// [추가] 모달 닫기
window.closeSelectionResetModal = () => {
const modal = document.getElementById('selection-reset-modal');
modal.classList.add('hidden');
modal.classList.remove('flex');
};
// [추가] 실제 초기화 실행 (기존 로직 그대로)
window.confirmSelectionReset = () => {
state.selectedIds.clear();
saveSelection(); // 스토리지 동기화
updateSummary();
renderProducts(state.currentPage);
window.closeSelectionResetModal();
};
/** 선택 토글 시 스토리지 저장 추가 */