From f30678aa2956620177e61cbcc0fb57e9ce6872f1 Mon Sep 17 00:00:00 2001
From: 0-Zz-ang <s1998319@gmail.com>
Date: Sat, 9 Aug 2025 01:09:20 +0900
Subject: (박서영)docu-list-rule페이지 내 프로젝트 해양만조회가능하도록 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 .../document-class/table/document-class-add-dialog.tsx        | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

(limited to 'lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx')

diff --git a/lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx b/lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx
index dfd1d7f2..a51b0598 100644
--- a/lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx
+++ b/lib/docu-list-rule/document-class/table/document-class-add-dialog.tsx
@@ -54,7 +54,7 @@ export function DocumentClassAddDialog({
 }: DocumentClassAddDialogProps) {
   const [open, setOpen] = React.useState(false)
   const [isPending, startTransition] = React.useTransition()
-  const [projects, setProjects] = React.useState<Array<{ id: number; code: string; name: string }>>([])
+  const [projects, setProjects] = React.useState<Array<{ id: number; code: string; name: string; type: string }>>([])
 
   const form = useForm<CreateDocumentClassSchema>({
     resolver: zodResolver(createDocumentClassSchema),
@@ -78,10 +78,15 @@ export function DocumentClassAddDialog({
             sort: [],
             filters: [],
             joinOperator: "and",
-            flags: []
+            flags: [],
+            code: "",
+            name: "",
+            type: ""
           })
           if (result.data) {
-            setProjects(result.data)
+            // plant 타입의 프로젝트만 필터링
+            const plantProjects = result.data.filter(project => project.type === 'plant')
+            setProjects(plantProjects)
           }
         } catch (error) {
           console.error("Failed to load projects:", error)
-- 
cgit v1.2.3

