fix(project): 프로젝트 삭제 확인창도 브라우저 기본 confirm 대신 erpConfirm으로
홈 카드 삭제/수정모달 삭제/좌측 트리(및 그 수정모달) 삭제 3곳 모두 교체. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
@@ -45,5 +45,5 @@
|
|||||||
{% endif %}
|
{% endif %}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script src="/static/project.js?v=20260917x" defer></script>
|
<script src="/static/project.js?v=20260917y" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -429,5 +429,5 @@
|
|||||||
window.PJ_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772"] | tojson }};
|
window.PJ_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772"] | tojson }};
|
||||||
window.PJ_STAGE_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772","#e8398a","#a15c43"] | tojson }};
|
window.PJ_STAGE_COLORS = {{ ["#4573d2","#37a3a3","#62a420","#e8a33d","#e8384f","#aa62e3","#f06a6a","#5a6772","#e8398a","#a15c43"] | tojson }};
|
||||||
</script>
|
</script>
|
||||||
<script src="/static/project.js?v=20260917x" defer></script>
|
<script src="/static/project.js?v=20260917y" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
@@ -543,5 +543,5 @@
|
|||||||
</script>
|
</script>
|
||||||
|
|
||||||
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
<script src="/static/vendor/vis-timeline/vis-timeline-graph2d.min.js"></script>
|
||||||
<script src="/static/project.js?v=20260917x" defer></script>
|
<script src="/static/project.js?v=20260917y" defer></script>
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|||||||
+15
-3
@@ -504,7 +504,11 @@
|
|||||||
}
|
}
|
||||||
async function deleteProjectCard(card) {
|
async function deleteProjectCard(card) {
|
||||||
if (!canDelete(card.dataset.creator)) { alert("삭제는 만든 사람만 할 수 있습니다."); return; }
|
if (!canDelete(card.dataset.creator)) { alert("삭제는 만든 사람만 할 수 있습니다."); return; }
|
||||||
if (!confirm("이 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.")) return;
|
const ok = await window.erpConfirm(
|
||||||
|
"이 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.",
|
||||||
|
{ okText: "삭제", cancelText: "취소" }
|
||||||
|
);
|
||||||
|
if (!ok) return;
|
||||||
try {
|
try {
|
||||||
await api("DELETE", "/project/api/projects/" + card.dataset.id);
|
await api("DELETE", "/project/api/projects/" + card.dataset.id);
|
||||||
card.remove();
|
card.remove();
|
||||||
@@ -972,7 +976,11 @@
|
|||||||
const id = el("pj-e-id").value;
|
const id = el("pj-e-id").value;
|
||||||
const card = document.querySelector('.pj-project-card[data-id="' + id + '"]');
|
const card = document.querySelector('.pj-project-card[data-id="' + id + '"]');
|
||||||
if (card && !canDelete(card.dataset.creator)) { alert("삭제는 만든 사람만 할 수 있습니다."); return; }
|
if (card && !canDelete(card.dataset.creator)) { alert("삭제는 만든 사람만 할 수 있습니다."); return; }
|
||||||
if (!confirm("이 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.")) return;
|
const ok = await window.erpConfirm(
|
||||||
|
"이 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.",
|
||||||
|
{ okText: "삭제", cancelText: "취소" }
|
||||||
|
);
|
||||||
|
if (!ok) return;
|
||||||
try {
|
try {
|
||||||
await api("DELETE", "/project/api/projects/" + id);
|
await api("DELETE", "/project/api/projects/" + id);
|
||||||
if (card) card.remove();
|
if (card) card.remove();
|
||||||
@@ -3282,7 +3290,11 @@
|
|||||||
}
|
}
|
||||||
async function deleteTreeProject(id, name, createdBy) {
|
async function deleteTreeProject(id, name, createdBy) {
|
||||||
if (!canDelete(createdBy)) { alert(DELETE_DENIED); return; }
|
if (!canDelete(createdBy)) { alert(DELETE_DENIED); return; }
|
||||||
if (!confirm("'" + (name || "") + "' 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.")) return;
|
const ok = await window.erpConfirm(
|
||||||
|
"'" + (name || "") + "' 프로젝트를 삭제할까요? 안의 업무도 모두 삭제됩니다.",
|
||||||
|
{ okText: "삭제", cancelText: "취소" }
|
||||||
|
);
|
||||||
|
if (!ok) return;
|
||||||
try {
|
try {
|
||||||
await api("DELETE", "/project/api/projects/" + id);
|
await api("DELETE", "/project/api/projects/" + id);
|
||||||
if (String(id) === String(projectId)) { location.href = "/project/"; return; }
|
if (String(id) === String(projectId)) { location.href = "/project/"; return; }
|
||||||
|
|||||||
Reference in New Issue
Block a user