fix(project): 프로젝트 삭제 확인창도 브라우저 기본 confirm 대신 erpConfirm으로

홈 카드 삭제/수정모달 삭제/좌측 트리(및 그 수정모달) 삭제 3곳 모두 교체.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-17 14:32:22 +09:00
parent cc73f79b7c
commit 8d765ec60d
4 changed files with 18 additions and 6 deletions
+15 -3
View File
@@ -504,7 +504,11 @@
}
async function deleteProjectCard(card) {
if (!canDelete(card.dataset.creator)) { alert("삭제는 만든 사람만 할 수 있습니다."); return; }
if (!confirm("이 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.")) return;
const ok = await window.erpConfirm(
"이 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.",
{ okText: "삭제", cancelText: "취소" }
);
if (!ok) return;
try {
await api("DELETE", "/project/api/projects/" + card.dataset.id);
card.remove();
@@ -972,7 +976,11 @@
const id = el("pj-e-id").value;
const card = document.querySelector('.pj-project-card[data-id="' + id + '"]');
if (card && !canDelete(card.dataset.creator)) { alert("삭제는 만든 사람만 할 수 있습니다."); return; }
if (!confirm("이 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.")) return;
const ok = await window.erpConfirm(
"이 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.",
{ okText: "삭제", cancelText: "취소" }
);
if (!ok) return;
try {
await api("DELETE", "/project/api/projects/" + id);
if (card) card.remove();
@@ -3282,7 +3290,11 @@
}
async function deleteTreeProject(id, name, createdBy) {
if (!canDelete(createdBy)) { alert(DELETE_DENIED); return; }
if (!confirm("'" + (name || "") + "' 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.")) return;
const ok = await window.erpConfirm(
"'" + (name || "") + "' 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.",
{ okText: "삭제", cancelText: "취소" }
);
if (!ok) return;
try {
await api("DELETE", "/project/api/projects/" + id);
if (String(id) === String(projectId)) { location.href = "/project/"; return; }