From ef4c533ebacc2cdc97e518f30e9a9350004fcdfb Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 28 Apr 2025 02:13:30 +0000
Subject: ~20250428 작업사항
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/rfqs/tbe-table/tbe-table-toolbar-actions.tsx | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

(limited to 'lib/rfqs/tbe-table/tbe-table-toolbar-actions.tsx')

diff --git a/lib/rfqs/tbe-table/tbe-table-toolbar-actions.tsx b/lib/rfqs/tbe-table/tbe-table-toolbar-actions.tsx
index 6a336135..a8f8ea82 100644
--- a/lib/rfqs/tbe-table/tbe-table-toolbar-actions.tsx
+++ b/lib/rfqs/tbe-table/tbe-table-toolbar-actions.tsx
@@ -28,18 +28,25 @@ export function VendorsTableToolbarActions({ table,rfqId }: VendorsTableToolbarA
     fileInputRef.current?.click()
   }
 
+  const invitationPossibeVendors = React.useMemo(() => {
+    return table
+      .getFilteredSelectedRowModel()
+      .rows
+      .map(row => row.original)
+      .filter(vendor => vendor.technicalResponseStatus === null);
+  }, [table.getFilteredSelectedRowModel().rows]);
+
   return (
     <div className="flex items-center gap-2">
-      {table.getFilteredSelectedRowModel().rows.length > 0 ? (
-        <InviteVendorsDialog
-          vendors={table
-            .getFilteredSelectedRowModel()
-            .rows.map((row) => row.original)}
+      {invitationPossibeVendors.length > 0 && 
+        (
+          <InviteVendorsDialog 
+          vendors={invitationPossibeVendors}
           rfqId = {rfqId}
           onSuccess={() => table.toggleAllRowsSelected(false)}
-        />
-      ) : null}
-
+          />
+        )
+      }
     
       <Button
         variant="outline"
-- 
cgit v1.2.3

