From 9f761849c2e98f650d089d00aed9df090497ada9 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 27 Oct 2025 03:12:26 +0000
Subject: (최겸) 공지사항 팝업기능 및 다시보지않기 기능 구현(로컬 스토리지
 활용)
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/evaluation-submit/evaluation-form.tsx | 21 ++++++++++++---------
 1 file changed, 12 insertions(+), 9 deletions(-)

(limited to 'lib/evaluation-submit/evaluation-form.tsx')

diff --git a/lib/evaluation-submit/evaluation-form.tsx b/lib/evaluation-submit/evaluation-form.tsx
index d51a0369..1f27b312 100644
--- a/lib/evaluation-submit/evaluation-form.tsx
+++ b/lib/evaluation-submit/evaluation-form.tsx
@@ -48,7 +48,7 @@ import {
 import { DEPARTMENT_CODE_LABELS, divisionMap, vendortypeMap } from "@/types/evaluation"
 import { EvaluationFormData } from "@/types/evaluation-form"
 // 파일 다운로드 유틸리티 import
-import { downloadFile, formatFileSize, getFileInfo } from "@/lib/file-download"
+// import { downloadFile, formatFileSize, getFileInfo } from "@/lib/file-download"
 
 interface EvaluationFormProps {
   formData: EvaluationFormData
@@ -123,7 +123,9 @@ export function EvaluationForm({ formData, onSubmit }: EvaluationFormProps) {
   // 첨부파일 다운로드 핸들러 - downloadFile 사용
   const handleDownloadAttachment = async (attachment: AttachmentInfo) => {
     try {
-      await downloadFile(
+      const { downloadFile } = await import('@/lib/file-download')
+
+      const result = await downloadFile(
         attachment.publicPath, 
         attachment.originalFileName,
         {
@@ -134,10 +136,11 @@ export function EvaluationForm({ formData, onSubmit }: EvaluationFormProps) {
             console.error("파일 다운로드 실패:", error)
           },
           onSuccess: (fileName, fileSize) => {
-            console.log("파일 다운로드 성공:", fileName, fileSize ? formatFileSize(fileSize) : '')
+            // console.log("파일 다운로드 성공:", fileName, fileSize ? formatFileSize(fileSize) : '')
           }
         }
       )
+      console.log("파일 다운로드 결과:", result)
     } catch (error) {
       console.error("다운로드 처리 중 오류:", error)
     }
@@ -519,9 +522,9 @@ export function EvaluationForm({ formData, onSubmit }: EvaluationFormProps) {
                   <div className="text-muted-foreground">
                     총 <span className="font-medium text-foreground">{formData.attachmentStats.totalFiles}</span>개 파일
                   </div>
-                  <div className="text-muted-foreground">
+                  {/* <div className="text-muted-foreground">
                     크기: <span className="font-medium text-foreground">{formatFileSize(formData.attachmentStats.totalSize)}</span>
-                  </div>
+                  </div> */}
                   <div className="text-muted-foreground">
                     첨부 질문: <span className="font-medium text-foreground">{formData.attachmentStats.questionsWithAttachments}</span>개
                   </div>
@@ -731,18 +734,18 @@ export function EvaluationForm({ formData, onSubmit }: EvaluationFormProps) {
                             {questionAttachments.length > 0 && (
                               <div className="space-y-1">
                                 {questionAttachments.map((attachment) => {
-                                  const fileInfo = getFileInfo(attachment.originalFileName)
+                                  // const fileInfo = getFileInfo(attachment.originalFileName)
                                   return (
                                     <div key={attachment.id} className="flex items-center justify-between p-2 bg-muted rounded-md">
                                       <div className="flex items-center gap-2 flex-1">
-                                        <span className="text-sm">{fileInfo.icon}</span>
+                                        {/* <span className="text-sm">{fileInfo.icon}</span> */}
                                         <div className="flex-1 min-w-0">
                                           <div className="text-xs font-medium truncate">
                                             {attachment.originalFileName}
                                           </div>
-                                          <div className="text-xs text-muted-foreground">
+                                          {/* <div className="text-xs text-muted-foreground">
                                             {formatFileSize(attachment.fileSize)}
-                                          </div>
+                                          </div> */}
                                         </div>
                                       </div>
                                       <div className="flex items-center gap-1">
-- 
cgit v1.2.3

