diff options
Diffstat (limited to 'lib/tbe-tech/table')
| -rw-r--r-- | lib/tbe-tech/table/tbe-table-columns.tsx | 2 | ||||
| -rw-r--r-- | lib/tbe-tech/table/tbe-table.tsx | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/lib/tbe-tech/table/tbe-table-columns.tsx b/lib/tbe-tech/table/tbe-table-columns.tsx index 2349db7e..bb86e578 100644 --- a/lib/tbe-tech/table/tbe-table-columns.tsx +++ b/lib/tbe-tech/table/tbe-table-columns.tsx @@ -293,7 +293,7 @@ const commentsColumn: ColumnDef<VendorWithTbeFields> = { ), cell: ({ row }) => { const vendor = row.original - const commCount = vendor.comments?.length ?? 0 + const commCount = vendor.comments?.filter(c => c.evaluationId === vendor.tbeId)?.length ?? 0 function handleClick() { // setRowAction() 로 type 설정 diff --git a/lib/tbe-tech/table/tbe-table.tsx b/lib/tbe-tech/table/tbe-table.tsx index 3d981450..3537f16a 100644 --- a/lib/tbe-tech/table/tbe-table.tsx +++ b/lib/tbe-tech/table/tbe-table.tsx @@ -61,7 +61,7 @@ export function AllTbeTable({ promises }: VendorsTableProps) { // 새로운 벤더 데이터 추가 vendorMap.set(vendorId, { ...item, - vendorResponseId: item.id, + // vendorResponseId: item.id, technicalResponseId: item.id, rfqId: item.rfqId }) @@ -106,6 +106,7 @@ export function AllTbeTable({ promises }: VendorsTableProps) { openCommentSheet( rowAction.row.original.vendorId ?? 0, rowAction.row.original.rfqId ?? 0, + rowAction.row.original.tbeId ?? 0, ) } else if (rowAction.type === "files") { openFilesDialog( @@ -144,10 +145,10 @@ export function AllTbeTable({ promises }: VendorsTableProps) { // ----------------------------------------------------------- // 댓글 시트 열기 // ----------------------------------------------------------- - async function openCommentSheet(vendorId: number, rfqId: number) { + async function openCommentSheet(vendorId: number, rfqId: number, tbeId: number) { setInitialComments([]) setIsLoadingComments(true) - const comments = rowAction?.row.original.comments + const comments = rowAction?.row.original.comments?.filter(c => c.evaluationId === tbeId) try { if (comments && comments.length > 0) { const commentWithAttachments: TbeComment[] = await Promise.all( |
