From 2b5d063ab408a163c016358251192a07a337eaa7 Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Wed, 26 Nov 2025 18:57:47 +0900
Subject: (김준회) dolce: 다운로드 시각적 피드백 표시 (UX)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/dolce/dialogs/detail-drawing-dialog.tsx | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

(limited to 'lib/dolce/dialogs/detail-drawing-dialog.tsx')

diff --git a/lib/dolce/dialogs/detail-drawing-dialog.tsx b/lib/dolce/dialogs/detail-drawing-dialog.tsx
index afe4a4c2..99154296 100644
--- a/lib/dolce/dialogs/detail-drawing-dialog.tsx
+++ b/lib/dolce/dialogs/detail-drawing-dialog.tsx
@@ -59,6 +59,7 @@ export function DetailDrawingDialog({
   const [editDialogOpen, setEditDialogOpen] = useState(false);
   const [editingDetailDrawing, setEditingDetailDrawing] = useState<DetailDwgReceiptItem | null>(null);
   const [uploadFilesDialogOpen, setUploadFilesDialogOpen] = useState(false);
+  const [downloadingFileId, setDownloadingFileId] = useState<string | null>(null);
 
   // 상세도면 목록 로드
   const loadDetailDrawings = useCallback(async () => {
@@ -126,6 +127,7 @@ export function DetailDrawingDialog({
 
   const handleDownload = async (file: FileInfoItem) => {
     try {
+      setDownloadingFileId(file.FileId);
       toast.info(t("detailDialog.downloadPreparing"));
       
       // 파일 생성자의 userId를 사용하여 다운로드
@@ -159,6 +161,8 @@ export function DetailDrawingDialog({
     } catch (error) {
       console.error("파일 다운로드 실패:", error);
       toast.error(t("detailDialog.downloadError"));
+    } finally {
+      setDownloadingFileId(null);
     }
   };
 
@@ -187,7 +191,7 @@ export function DetailDrawingDialog({
     loadFiles();
   };
 
-  const fileColumns = createFileListColumns({ onDownload: handleDownload, lng });
+  const fileColumns = createFileListColumns({ onDownload: handleDownload, lng, downloadingFileId });
 
   // RegisterId + UploadId 조합으로 고유 ID 생성
   const getDetailDrawingId = (detail: DetailDwgReceiptItem) => {
-- 
cgit v1.2.3

