From bde9151154dc9731046ac3facdc4869b7612a7af Mon Sep 17 00:00:00 2001
From: joonhoekim <26rote@gmail.com>
Date: Fri, 22 Aug 2025 02:18:10 +0000
Subject: (김준회) 설계 데이터 입력 - EDP 에 클라이언트가 직접 요청 보내던 문제
 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 components/form-data/sedp-compare-dialog.tsx | 17 ++++++++---------
 1 file changed, 8 insertions(+), 9 deletions(-)

(limited to 'components/form-data/sedp-compare-dialog.tsx')

diff --git a/components/form-data/sedp-compare-dialog.tsx b/components/form-data/sedp-compare-dialog.tsx
index 9a6c8098..9cc08657 100644
--- a/components/form-data/sedp-compare-dialog.tsx
+++ b/components/form-data/sedp-compare-dialog.tsx
@@ -13,15 +13,15 @@ import { Switch } from "../ui/switch";
 import { Card, CardContent } from "@/components/ui/card";
 import { useTranslation } from "@/i18n/client"
 import { useParams } from "next/navigation"
+import { fetchTagDataFromSEDP } from "@/lib/forms/sedp-actions";
 
 interface SEDPCompareDialogProps {
   isOpen: boolean;
   onClose: () => void;
-  tableData: any[];
+  tableData: unknown[];
   columnsJSON: DataTableColumnJSON[];
   projectCode: string;
   formCode: string;
-  fetchTagDataFromSEDP: (projectCode: string, formCode: string) => Promise<any>;
   projectType:string;
   packageCode:string;
 }
@@ -33,15 +33,15 @@ interface ComparisonResult {
   attributes: {
     key: string;
     label: string;
-    localValue: any;
-    sedpValue: any;
+    localValue: unknown;
+    sedpValue: unknown;
     isMatching: boolean;
     uom?: string;
   }[];
 }
 
 // Component for formatting display value with UOM
-const DisplayValue = ({ value, uom, isSedp = false }: { value: any; uom?: string; isSedp?: boolean }) => {
+const DisplayValue = ({ value, uom, isSedp = false }: { value: unknown; uom?: string; isSedp?: boolean }) => {
   if (value === "" || value === null || value === undefined) {
     return <span className="text-muted-foreground italic">(empty)</span>;
   }
@@ -68,7 +68,6 @@ export function SEDPCompareDialog({
   columnsJSON,
   projectCode,
   formCode,
-  fetchTagDataFromSEDP,
   projectType,
   packageCode
 }: SEDPCompareDialogProps) {
@@ -275,13 +274,13 @@ export function SEDPCompareDialog({
       });
 
 
-      tagEntries.forEach((entry: any) => {
+      tagEntries.forEach((entry: Record<string, unknown>) => {
         const tagNo = entry.TAG_NO;
         const attributesMap = new Map();
 
         // Convert attributes array to map for easier access
         if (Array.isArray(entry.ATTRIBUTES)) {
-          entry.ATTRIBUTES.forEach((attr: any) => {
+          entry.ATTRIBUTES.forEach((attr: Record<string, unknown>) => {
             attributesMap.set(attr.ATT_ID, attr.VALUE);
           });
         }
@@ -385,7 +384,7 @@ export function SEDPCompareDialog({
     } finally {
       setIsLoading(false);
     }
-  }, [projectCode, formCode, tableData, columnsJSON, fetchTagDataFromSEDP, columnLabelMap, columnUomMap]);
+  }, [projectCode, formCode, tableData, columnsJSON, columnLabelMap, columnUomMap]);
 
   // Fetch data when dialog opens
   React.useEffect(() => {
-- 
cgit v1.2.3

