summaryrefslogtreecommitdiff
path: root/lib/rfq-last/vendor/rfq-vendor-table.tsx
diff options
context:
space:
mode:
authordujinkim <dujin.kim@dtsolution.co.kr>2025-09-18 00:23:40 +0000
committerdujinkim <dujin.kim@dtsolution.co.kr>2025-09-18 00:23:40 +0000
commitcf8dac0c6490469dab88a560004b0c07dbd48612 (patch)
treeb9e76061e80d868331e6b4277deecb9086f845f3 /lib/rfq-last/vendor/rfq-vendor-table.tsx
parente5745fc0268bbb5770bc14a55fd58a0ec30b466e (diff)
(대표님) rfq, 계약, 서명 등
Diffstat (limited to 'lib/rfq-last/vendor/rfq-vendor-table.tsx')
-rw-r--r--lib/rfq-last/vendor/rfq-vendor-table.tsx100
1 files changed, 98 insertions, 2 deletions
diff --git a/lib/rfq-last/vendor/rfq-vendor-table.tsx b/lib/rfq-last/vendor/rfq-vendor-table.tsx
index 88ae968a..72539113 100644
--- a/lib/rfq-last/vendor/rfq-vendor-table.tsx
+++ b/lib/rfq-last/vendor/rfq-vendor-table.tsx
@@ -657,6 +657,102 @@ export function RfqVendorTable({
},
{
+ accessorKey: "tbeStatus",
+ header: ({ column }) => (
+ <ClientDataTableColumnHeaderSimple column={column} title="TBE 상태" />
+ ),
+ cell: ({ row }) => {
+ const status = row.original.tbeStatus;
+
+ if (!status || status === "준비중") {
+ return (
+ <Badge variant="outline" className="text-gray-500">
+ <Clock className="h-3 w-3 mr-1" />
+ 대기
+ </Badge>
+ );
+ }
+
+ const statusConfig = {
+ "진행중": { variant: "default", icon: <Clock className="h-3 w-3 mr-1" />, color: "text-blue-600" },
+ "검토중": { variant: "secondary", icon: <Eye className="h-3 w-3 mr-1" />, color: "text-orange-600" },
+ "보류": { variant: "outline", icon: <AlertCircle className="h-3 w-3 mr-1" />, color: "text-yellow-600" },
+ "완료": { variant: "success", icon: <CheckCircle className="h-3 w-3 mr-1" />, color: "text-green-600" },
+ "취소": { variant: "destructive", icon: <XCircle className="h-3 w-3 mr-1" />, color: "text-red-600" },
+ }[status] || { variant: "outline", icon: null, color: "text-gray-600" };
+
+ return (
+ <Badge variant={statusConfig.variant as any} className={statusConfig.color}>
+ {statusConfig.icon}
+ {status}
+ </Badge>
+ );
+ },
+ size: 100,
+ },
+
+ {
+ accessorKey: "tbeEvaluationResult",
+ header: ({ column }) => (
+ <ClientDataTableColumnHeaderSimple column={column} title="TBE 평가" />
+ ),
+ cell: ({ row }) => {
+ const result = row.original.tbeEvaluationResult;
+ const status = row.original.tbeStatus;
+
+ // TBE가 완료되지 않았으면 표시하지 않음
+ if (status !== "완료" || !result) {
+ return <span className="text-xs text-muted-foreground">-</span>;
+ }
+
+ const resultConfig = {
+ "Acceptable": {
+ variant: "success",
+ icon: <CheckCircle className="h-3 w-3" />,
+ text: "적합",
+ color: "bg-green-50 text-green-700 border-green-200"
+ },
+ "Acceptable with Comment": {
+ variant: "warning",
+ icon: <AlertCircle className="h-3 w-3" />,
+ text: "조건부 적합",
+ color: "bg-yellow-50 text-yellow-700 border-yellow-200"
+ },
+ "Not Acceptable": {
+ variant: "destructive",
+ icon: <XCircle className="h-3 w-3" />,
+ text: "부적합",
+ color: "bg-red-50 text-red-700 border-red-200"
+ },
+ }[result];
+
+ return (
+ <TooltipProvider>
+ <Tooltip>
+ <TooltipTrigger>
+ <Badge className={cn("text-xs", resultConfig?.color)}>
+ {resultConfig?.icon}
+ <span className="ml-1">{resultConfig?.text}</span>
+ </Badge>
+ </TooltipTrigger>
+ <TooltipContent>
+ <div className="text-xs">
+ <p className="font-semibold">{result}</p>
+ {row.original.conditionalRequirements && (
+ <p className="mt-1 text-muted-foreground">
+ 조건: {row.original.conditionalRequirements}
+ </p>
+ )}
+ </div>
+ </TooltipContent>
+ </Tooltip>
+ </TooltipProvider>
+ );
+ },
+ size: 120,
+ },
+
+ {
accessorKey: "contractRequirements",
header: ({ column }) => <ClientDataTableColumnHeaderSimple column={column} title="기본계약 요청" />,
cell: ({ row }) => {
@@ -785,8 +881,8 @@ export function RfqVendorTable({
// emailSentTo JSON 파싱
let recipients = { to: [], cc: [], sentBy: "" };
try {
- if (response?.email?.emailSentTo) {
- recipients = JSON.parse(response.email.emailSentTo);
+ if (response?.emailSentTo) {
+ recipients = JSON.parse(response.emailSentTo);
}
} catch (e) {
console.error("Failed to parse emailSentTo", e);