From b9a2081a76e669688d5884f20482b37cc8acca22 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 13 Oct 2025 08:56:27 +0000
Subject: (최겸, 임수민) 구매 입찰, 견적(그룹코드, tbe에러) 수정, data-room
 수정
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/bidding/list/biddings-table-columns.tsx | 34 +++++++++++++++++++----------
 1 file changed, 22 insertions(+), 12 deletions(-)

(limited to 'lib/bidding/list/biddings-table-columns.tsx')

diff --git a/lib/bidding/list/biddings-table-columns.tsx b/lib/bidding/list/biddings-table-columns.tsx
index 7f0b8e40..4900d18a 100644
--- a/lib/bidding/list/biddings-table-columns.tsx
+++ b/lib/bidding/list/biddings-table-columns.tsx
@@ -5,6 +5,7 @@ import { type ColumnDef } from "@tanstack/react-table"
 import { Checkbox } from "@/components/ui/checkbox"
 import { Badge } from "@/components/ui/badge"
 import { Button } from "@/components/ui/button"
+import { getUserCodeByEmail } from "@/lib/bidding/service"
 import {
   Eye, Edit, MoreHorizontal, FileText, Users, Calendar,
   Building, Package, DollarSign, Clock, CheckCircle, XCircle,
@@ -26,6 +27,12 @@ import {
 import { DataTableColumnHeaderSimple } from "@/components/data-table/data-table-column-simple-header"
 import { BiddingListItem } from "@/db/schema"
 import { DataTableRowAction } from "@/types/table"
+
+// BiddingListItem에 manager 정보 추가
+type BiddingListItemWithManagerCode = BiddingListItem & {
+  managerName?: string | null
+  managerCode?: string | null
+}
 import {
   biddingStatusLabels,
   contractTypeLabels,
@@ -35,7 +42,7 @@ import {
 import { formatDate } from "@/lib/utils"
 
 interface GetColumnsProps {
-  setRowAction: React.Dispatch<React.SetStateAction<DataTableRowAction<BiddingListItem> | null>>
+  setRowAction: React.Dispatch<React.SetStateAction<DataTableRowAction<BiddingListItemWithManagerCode> | null>>
 }
 
 // 상태별 배지 색상
@@ -78,7 +85,8 @@ const formatCurrency = (amount: string | number | null, currency = 'KRW') => {
 
 
 
-export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef<BiddingListItem>[] {
+export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef<BiddingListItemWithManagerCode>[] {
+
   return [
     // ═══════════════════════════════════════════════════════════════
     // 선택 및 기본 정보
@@ -191,11 +199,11 @@ export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef
     {
       accessorKey: "managerName",
       header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="입찰담당자" />,
-      cell: ({ row }) => (
-        <div className="truncate max-w-[100px]" title={row.original.managerName || ''}>
-          {row.original.managerName || '-'}
-        </div>
-      ),
+      cell: ({ row }) => {
+        const name = row.original.managerName || "-";
+        const managerCode = row.original.managerCode || "";
+        return name === "-" ? "-" : `${name}(${managerCode})`;
+      },
       size: 100,
       meta: { excelHeader: "입찰담당자" },
     },
@@ -237,10 +245,12 @@ export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef
             <div className="truncate max-w-[200px]" title={row.original.title}>
               <Button
                 variant="link"
-                className="p-0 h-auto text-left justify-start"
+                className="p-0 h-auto text-left justify-start font-bold underline"
                 onClick={() => setRowAction({ row, type: "view" })}
               >
-                {row.original.title}
+                <div className="whitespace-pre-line">
+                  {row.original.title}
+                </div>
               </Button>
             </div>
           ),
@@ -394,7 +404,7 @@ export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef
           header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="예산" />,
           cell: ({ row }) => (
             <span className="text-sm font-medium">
-              {formatCurrency(row.original.budget, row.original.currency)}
+              {row.original.budget}
             </span>
           ),
           size: 120,
@@ -406,7 +416,7 @@ export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef
           header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="내정가" />,
           cell: ({ row }) => (
             <span className="text-sm font-medium text-orange-600">
-              {formatCurrency(row.original.targetPrice, row.original.currency)}
+              {row.original.targetPrice}
             </span>
           ),
           size: 120,
@@ -418,7 +428,7 @@ export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef
           header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="최종입찰가" />,
           cell: ({ row }) => (
             <span className="text-sm font-medium text-green-600">
-              {formatCurrency(row.original.finalBidPrice, row.original.currency)}
+              {row.original.finalBidPrice}
             </span>
           ),
           size: 120,
-- 
cgit v1.2.3

