blob: 6c96d2efe598b71558f10b8bd2df2936e07747d8 (
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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
|
"use client"
import * as React from "react"
import {
Dialog,
DialogContent,
DialogHeader,
DialogTitle,
} from "@/components/ui/dialog"
import { Badge } from "@/components/ui/badge"
import { VendorWithTbeFields } from "@/config/vendorTbeColumnsConfig"
import { VendorContactsTable } from "@/lib/rfqs/tbe-table/vendor-contact/vendor-contact-table"
interface VendorContactsDialogProps {
isOpen: boolean
onOpenChange: (open: boolean) => void
vendorId: number | null
vendor: VendorWithTbeFields | null
}
export function VendorContactsDialog({
isOpen,
onOpenChange,
vendorId,
vendor,
}: VendorContactsDialogProps) {
return (
<Dialog open={isOpen} onOpenChange={onOpenChange}>
<DialogContent className="max-w-[90wv] sm:max-h-[80vh] overflow-auto" style={{maxWidth:1000, height:480}}>
<DialogHeader>
<div className="flex flex-col space-y-2">
<DialogTitle>협력업체 연락처</DialogTitle>
{vendor && (
<div className="flex flex-col space-y-1 mt-2">
<div className="text-sm text-muted-foreground">
<span className="font-medium text-foreground">{vendor.vendorName}</span>
{vendor.vendorCode && (
<span className="ml-2 text-xs text-muted-foreground">({vendor.vendorCode})</span>
)}
</div>
<div className="flex items-center">
{vendor.vendorStatus && (
<Badge variant="outline" className="mr-2">
{vendor.vendorStatus}
</Badge>
)}
{vendor.rfqVendorStatus && (
<Badge
variant={
vendor.rfqVendorStatus === "INVITED" ? "default" :
vendor.rfqVendorStatus === "DECLINED" ? "destructive" :
vendor.rfqVendorStatus === "ACCEPTED" ? "secondary" : "outline"
}
>
{vendor.rfqVendorStatus}
</Badge>
)}
</div>
</div>
)}
</div>
</DialogHeader>
{vendorId && (
<div className="py-4">
<VendorContactsTable vendorId={vendorId} />
</div>
)}
</DialogContent>
</Dialog>
)
}
|