summaryrefslogtreecommitdiff
path: root/lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-07-17 10:50:52 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-07-17 10:50:52 +0000
commit2ef02e27dbe639876fa3b90c30307dda183545ec (patch)
treee132ae7f3dd774e1ce767291c2849be4a63ae762 /lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx
parentfb276ed3db86fe4fc0c0fcd870fd3d085b034be0 (diff)
(최겸) 기술영업 변경사항 적용
Diffstat (limited to 'lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx')
-rw-r--r--lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx16
1 files changed, 16 insertions, 0 deletions
diff --git a/lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx b/lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx
index 06b2cc42..ac7ee184 100644
--- a/lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx
+++ b/lib/tech-vendors/table/tech-vendors-table-toolbar-actions.tsx
@@ -20,6 +20,7 @@ import { TechVendor } from "@/db/schema/techVendors"
import { ImportTechVendorButton } from "./import-button"
import { exportTechVendorTemplate } from "./excel-template-download"
import { AddVendorDialog } from "./add-vendor-dialog"
+import { InviteTechVendorDialog } from "./invite-tech-vendor-dialog"
interface TechVendorsTableToolbarActionsProps {
table: Table<TechVendor>
@@ -36,6 +37,13 @@ export function TechVendorsTableToolbarActions({ table, onRefresh }: TechVendors
.rows
.map(row => row.original);
}, [table.getFilteredSelectedRowModel().rows]);
+
+ // 초대 가능한 벤더들 (PENDING_INVITE 상태 + 이메일 있음)
+ const invitableVendors = React.useMemo(() => {
+ return selectedVendors.filter(vendor =>
+ vendor.status === "PENDING_INVITE" && vendor.email
+ );
+ }, [selectedVendors]);
// 테이블의 모든 벤더 가져오기 (필터링된 결과)
const allFilteredVendors = React.useMemo(() => {
@@ -97,6 +105,14 @@ export function TechVendorsTableToolbarActions({ table, onRefresh }: TechVendors
return (
<div className="flex items-center gap-2">
+ {/* 초대 버튼 - 선택된 PENDING_REVIEW 벤더들이 있을 때만 표시 */}
+ {invitableVendors.length > 0 && (
+ <InviteTechVendorDialog
+ vendors={invitableVendors}
+ onSuccess={handleVendorAddSuccess}
+ />
+ )}
+
{/* 벤더 추가 다이얼로그 추가 */}
<AddVendorDialog onSuccess={handleVendorAddSuccess} />