From da00bbf203534b2663289d6fe45b6ed8663e7e11 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 23 Sep 2025 02:44:05 +0000
Subject: (최겸) 구매 인포메이션, 공지사항 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/information/information-button.tsx | 29 +++++++++++++++++++++------
 1 file changed, 23 insertions(+), 6 deletions(-)

(limited to 'components/information/information-button.tsx')

diff --git a/components/information/information-button.tsx b/components/information/information-button.tsx
index 2cff96d0..e9163093 100644
--- a/components/information/information-button.tsx
+++ b/components/information/information-button.tsx
@@ -18,6 +18,11 @@ import { UpdateInformationDialog } from "@/lib/information/table/update-informat
 import { NoticeViewDialog } from "@/components/notice/notice-view-dialog"
 // import { PDFTronViewerDialog } from "@/components/document-viewer/pdftron-viewer-dialog" // 주석 처리 - 브라우저 내장 뷰어 사용
 import type { PageInformation, InformationAttachment } from "@/db/schema/information"
+
+type PageInformationWithUpdatedBy = PageInformation & {
+  updatedByName?: string | null
+  updatedByEmail?: string | null
+}
 import type { Notice } from "@/db/schema/notice"
 import { useSession } from "next-auth/react"
 import { formatDate } from "@/lib/utils"
@@ -44,7 +49,7 @@ export function InformationButton({
 }: InformationButtonProps) {
   const { data: session } = useSession()
   const [isOpen, setIsOpen] = useState(false)
-  const [information, setInformation] = useState<(PageInformation & { attachments: InformationAttachment[] }) | null>(null)
+  const [information, setInformation] = useState<PageInformationWithUpdatedBy & { attachments: InformationAttachment[] } | null>(null)
   const [notices, setNotices] = useState<NoticeWithAuthor[]>([])
   const [hasEditPermission, setHasEditPermission] = useState(false)
   const [isEditDialogOpen, setIsEditDialogOpen] = useState(false)
@@ -211,10 +216,10 @@ export function InformationButton({
             variant={variant} 
             size={size} 
             className={className}
-            title="인포메이션"
+            title="안내사항"
           >
             <Info className="h-4 w-4" />
-            {size !== "icon" && <span className="ml-1">정보</span>}
+            {size !== "icon" && <span className="ml-1">안내사항</span>}
           </Button>
         </DialogTrigger>
         <DialogContent className="max-w-4xl max-h-[80vh] overflow-y-auto">
@@ -277,7 +282,7 @@ export function InformationButton({
                   )}
                 </div>
 
-                {/* 인포메이션 컨텐츠 */}
+                {/* 안내사항 컨텐츠 */}
                 <div className="space-y-3">
                   <div className="flex items-center justify-between">
                     <h4 className="font-semibold">안내사항</h4>
@@ -295,8 +300,20 @@ export function InformationButton({
                   </div>
                   <div className="bg-muted/50 border rounded-lg p-4">
                     {information?.informationContent ? (
-                      <div className="text-sm text-muted-foreground whitespace-pre-wrap max-h-40 overflow-y-auto">
-                        {information.informationContent}
+                      <div className="space-y-3">
+                        <div className="text-sm text-muted-foreground whitespace-pre-wrap max-h-40 overflow-y-auto">
+                          {information.informationContent}
+                        </div>
+                        <div className="flex items-center justify-between text-xs text-muted-foreground border-t pt-2">
+                          <div className="flex items-center gap-4">
+                            <span>
+                              <strong>수정자:</strong> {information.updatedByName || '시스템'}
+                            </span>
+                            <span>
+                              <strong>수정일:</strong> {formatDate(information.updatedAt, "KR")}
+                            </span>
+                          </div>
+                        </div>
                       </div>
                     ) : (
                       <div className="text-center text-muted-foreground">
-- 
cgit v1.2.3

