blob: 87b1367e6267d9e173faddd98dabcfeb96703284 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
"use client"
import * as React from "react"
import { type Table } from "@tanstack/react-table"
import { Users} from "lucide-react"
import { Button } from "@/components/ui/button"
import { PartnersBiddingListItem } from '../detail/service'
interface PartnersBiddingToolbarActionsProps {
table: Table<PartnersBiddingListItem>
setRowAction?: (action: { type: string; row: { original: PartnersBiddingListItem } }) => void
}
export function PartnersBiddingToolbarActions({
table,
setRowAction
}: PartnersBiddingToolbarActionsProps) {
// 선택된 행 가져오기 (단일 선택)
const selectedRows = table.getFilteredSelectedRowModel().rows
const selectedBidding = selectedRows.length === 1 ? selectedRows[0].original : null
const handleSpecificationMeetingClick = () => {
if (selectedBidding && setRowAction) {
setRowAction({
type: 'specification_meeting',
row: { original: selectedBidding }
})
}
}
return (
<div className="flex items-center gap-2">
<Button
variant="outline"
size="sm"
onClick={handleSpecificationMeetingClick}
className="flex items-center gap-2"
>
<Users className="w-4 h-4" />
사양설명회 참석여부
</Button>
</div>
)
}
|