From 1e6acff4f11659ecf1032d7eecaef4b4f4cdccac Mon Sep 17 00:00:00 2001 From: ttipo Date: Mon, 22 Jun 2026 12:05:53 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=EC=97=85=EB=AC=B4=20=EC=83=81=EC=84=B8?= =?UTF-8?q?=20=ED=99=94=EB=A9=B4=EC=9D=84=20=EC=B2=A8=EB=B6=80=ED=8C=8C?= =?UTF-8?q?=EC=9D=BC=20=EB=B3=B4=EA=B8=B0=20=EC=A0=84=EC=9A=A9=EC=9C=BC?= =?UTF-8?q?=EB=A1=9C=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 상세 화면에서 첨부 업로드·삭제 UI/로직을 제거하고 목록 표시만 유지. 업로드는 작성·편집 화면에서만 가능하도록 일원화(미사용 스토어 액션·CSS 정리). Co-Authored-By: Claude Opus 4.8 (1M context) --- frontend/src/pages/relay/TaskDetailPage.vue | 125 +------------------- frontend/src/stores/task.store.ts | 22 ---- 2 files changed, 1 insertion(+), 146 deletions(-) diff --git a/frontend/src/pages/relay/TaskDetailPage.vue b/frontend/src/pages/relay/TaskDetailPage.vue index 2e65cf3..9dd1b14 100644 --- a/frontend/src/pages/relay/TaskDetailPage.vue +++ b/frontend/src/pages/relay/TaskDetailPage.vue @@ -14,7 +14,6 @@ import { useRoute, useRouter, RouterLink } from 'vue-router' import AppShell from '@/layouts/AppShell.vue' import { CHECKLIST_CATEGORIES, - type Attachment, type ChecklistCategory, type ChecklistItem, type Comment, @@ -332,39 +331,8 @@ const commentTotal = computed( ) /* ============================================================ - * 파일 첨부(5단계) — 업로드/삭제 + * 파일 첨부 — 상세 화면은 목록 표시 전용(업로드/삭제는 작성·편집 화면에서만). * ============================================================ */ -const fileInput = ref(null) -const uploading = ref(false) - -function pickFile() { - fileInput.value?.click() -} -async function onFileChange(e: Event) { - const input = e.target as HTMLInputElement - const file = input.files?.[0] - if (!file || !task.value) { - input.value = '' - return - } - uploading.value = true - try { - task.value = await taskStore.uploadFile(projectId.value, task.value.id, file) - } catch { - // 인터셉터가 알림 처리 - } finally { - uploading.value = false - input.value = '' - } -} -async function removeFile(att: Attachment) { - if (!task.value || !att.id) return - try { - task.value = await taskStore.removeFile(projectId.value, task.value.id, att.id) - } catch { - // 인터셉터가 알림 처리 - } -} /* ============================================================ * 키보드 / 외부 클릭 처리 @@ -1134,29 +1102,7 @@ function badgeFor(name: string | undefined): { label: string; cls: string } {
첨부파일 · {{ task.files.length }}개 -
-
{{ f.name }}{{ f.size }} -

{ return refresh(projectId, taskId) } - /* ===================== 파일 첨부 (5단계) ===================== */ - - async function uploadFile( - projectId: string, - taskId: number, - file: File, - ): Promise { - await taskApi.uploadFile(projectId, taskId, file) - return refresh(projectId, taskId) - } - - async function removeFile( - projectId: string, - taskId: number, - fileId: string, - ): Promise { - await taskApi.removeFile(projectId, taskId, fileId) - return refresh(projectId, taskId) - } - /* ===================== 승인 워크플로우 (5단계) ===================== */ async function requestApproval( @@ -396,8 +376,6 @@ export const useTaskStore = defineStore('task', () => { changeStatus, addComment, addReply, - uploadFile, - removeFile, requestApproval, approve, requestChanges,