refactor: 승인/수정 요청을 '할 일 검토' 모달로 단일화
지시자 검토 카드의 '승인하기' 버튼과 별도 승인 모달을 제거하고, 단일 '할 일 검토하기' 버튼이 검토 모달을 열도록 통합한다. - 검토 카드 버튼을 '할 일 검토하기' 하나로 정리(승인하기 제거) - 미사용이 된 승인 확인 모달·approveTask·showApprove 상태 제거 - 승인은 검토 모달에서 전 항목 완료 시 '승인 완료' 버튼으로 수행 Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -113,12 +113,10 @@ const ActivityIcon = defineComponent({
|
||||
* ============================================================ */
|
||||
const moreOpen = ref(false)
|
||||
const showDelete = ref(false)
|
||||
const showApprove = ref(false)
|
||||
const showChanges = ref(false)
|
||||
|
||||
function closeAllOverlays() {
|
||||
showDelete.value = false
|
||||
showApprove.value = false
|
||||
showChanges.value = false
|
||||
moreOpen.value = false
|
||||
}
|
||||
@@ -135,17 +133,6 @@ async function confirmDelete() {
|
||||
}
|
||||
}
|
||||
|
||||
// 승인(review→done) — 지시자 액션. 승인 워크플로우 엔드포인트 사용
|
||||
async function approveTask() {
|
||||
if (!task.value) return
|
||||
try {
|
||||
task.value = await taskStore.approve(projectId.value, task.value.id)
|
||||
} catch {
|
||||
// 인터셉터가 알림 처리
|
||||
} finally {
|
||||
showApprove.value = false
|
||||
}
|
||||
}
|
||||
// 할 일 완료 검토(지시자) — 모든 항목 '완료'면 승인, 보완 항목이 있으면 메시지와 함께 수정 요청
|
||||
const changesNote = ref('')
|
||||
// 항목 ID → 완료 여부(완료=true / 보완=false)
|
||||
@@ -873,21 +860,6 @@ function badgeFor(name: string | undefined): { label: string; cls: string } {
|
||||
<button
|
||||
class="ap-btn approve"
|
||||
type="button"
|
||||
@click="showApprove = true"
|
||||
>
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2.4"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
><path d="M20 6 9 17l-5-5" /></svg>
|
||||
승인하기
|
||||
</button>
|
||||
<button
|
||||
class="ap-btn reject"
|
||||
type="button"
|
||||
@click="openChanges"
|
||||
>
|
||||
<svg
|
||||
@@ -897,8 +869,8 @@ function badgeFor(name: string | undefined): { label: string; cls: string } {
|
||||
stroke-width="2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
><path d="M3 7v6h6" /><path d="M21 17a9 9 0 0 0-9-9 9 9 0 0 0-6 2.3L3 13" /></svg>
|
||||
수정 요청
|
||||
><path d="M9 11l3 3L22 4" /><path d="M21 12v7a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V5a2 2 0 0 1 2-2h11" /></svg>
|
||||
할 일 검토하기
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1290,54 +1262,6 @@ function badgeFor(name: string | undefined): { label: string; cls: string } {
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 승인 -->
|
||||
<div
|
||||
class="modal-backdrop"
|
||||
:class="{ open: showApprove }"
|
||||
@click.self="showApprove = false"
|
||||
>
|
||||
<div
|
||||
class="modal"
|
||||
role="dialog"
|
||||
aria-modal="true"
|
||||
>
|
||||
<div class="modal-body">
|
||||
<div class="modal-ico approve">
|
||||
<svg
|
||||
viewBox="0 0 24 24"
|
||||
fill="none"
|
||||
stroke="currentColor"
|
||||
stroke-width="2.2"
|
||||
stroke-linecap="round"
|
||||
stroke-linejoin="round"
|
||||
><path d="M22 11.08V12a10 10 0 1 1-5.93-9.14" /><path d="M22 4 12 14.01l-3-3" /></svg>
|
||||
</div>
|
||||
<h2 class="modal-title">
|
||||
이 업무를 승인할까요?
|
||||
</h2>
|
||||
<p class="modal-desc">
|
||||
검토 요청을 승인합니다. 업무 상태가 <b>완료</b>로 변경되고 담당자에게 알림이 전송됩니다.
|
||||
</p>
|
||||
</div>
|
||||
<div class="modal-foot">
|
||||
<button
|
||||
class="mbtn"
|
||||
type="button"
|
||||
@click="showApprove = false"
|
||||
>
|
||||
취소
|
||||
</button>
|
||||
<button
|
||||
class="mbtn approve"
|
||||
type="button"
|
||||
@click="approveTask"
|
||||
>
|
||||
승인
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- 할 일 완료 검토(수정 요청 / 승인) -->
|
||||
<div
|
||||
class="modal-backdrop"
|
||||
|
||||
Reference in New Issue
Block a user