From 795b4915069c44f500a91638e16ded67b9e16618 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Tue, 1 Jul 2025 11:46:33 +0000
Subject: (최겸) 정보시스템 공지사항 개발
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/notice/notice-view-dialog.tsx | 56 ++++++++++++++++++++++++++++++++
 1 file changed, 56 insertions(+)
 create mode 100644 components/notice/notice-view-dialog.tsx

(limited to 'components/notice/notice-view-dialog.tsx')

diff --git a/components/notice/notice-view-dialog.tsx b/components/notice/notice-view-dialog.tsx
new file mode 100644
index 00000000..9b42311a
--- /dev/null
+++ b/components/notice/notice-view-dialog.tsx
@@ -0,0 +1,56 @@
+"use client"
+
+import * as React from "react"
+import {
+  Dialog,
+  DialogContent,
+  DialogHeader,
+  DialogTitle,
+} from "@/components/ui/dialog"
+import type { Notice } from "@/db/schema/notice"
+
+type NoticeWithAuthor = Notice & {
+  authorName: string | null
+  authorEmail: string | null
+}
+
+interface NoticeViewDialogProps {
+  open: boolean
+  onOpenChange: (open: boolean) => void
+  notice: NoticeWithAuthor | null
+}
+
+export function NoticeViewDialog({
+  open,
+  onOpenChange,
+  notice,
+}: NoticeViewDialogProps) {
+
+  if (!notice) return null
+
+  return (
+    <Dialog open={open} onOpenChange={onOpenChange}>
+      <DialogContent className="max-w-4xl max-h-[80vh] overflow-y-auto">
+        <DialogHeader>
+          <div className="flex items-start justify-between">
+            <div className="space-y-2 flex-1">
+              <div className="flex items-center gap-2">
+                <DialogTitle className="text-xl font-bold">
+                  제목: {notice.title}
+                </DialogTitle>
+              </div>              
+            </div>
+          </div>
+        </DialogHeader>
+        
+        <div className="mt-6 rounded-lg border border-gray-200 p-4">
+          <div 
+            className="prose prose-sm max-w-none"
+            dangerouslySetInnerHTML={{ __html: notice.content }}
+          />
+        </div>
+      </DialogContent>
+
+    </Dialog>
+  )
+} 
\ No newline at end of file
-- 
cgit v1.2.3

