From 9cda8482660a87fd98c9ee43f507d75ff75b4e23 Mon Sep 17 00:00:00 2001 From: dujinkim Date: Fri, 28 Nov 2025 03:12:57 +0000 Subject: (최겸) 구매 입찰 피드백 반영(90%) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/bidding/receive/biddings-receive-columns.tsx | 76 ++++++++++++++++-------- 1 file changed, 51 insertions(+), 25 deletions(-) (limited to 'lib/bidding/receive/biddings-receive-columns.tsx') diff --git a/lib/bidding/receive/biddings-receive-columns.tsx b/lib/bidding/receive/biddings-receive-columns.tsx index 4bde849c..9650574a 100644 --- a/lib/bidding/receive/biddings-receive-columns.tsx +++ b/lib/bidding/receive/biddings-receive-columns.tsx @@ -58,6 +58,7 @@ type BiddingReceiveItem = { interface GetColumnsProps { setRowAction: React.Dispatch | null>> + onParticipantClick?: (biddingId: number, participantType: 'expected' | 'participated' | 'declined' | 'pending') => void } // 상태별 배지 색상 @@ -89,7 +90,7 @@ const formatCurrency = (amount: string | number | null, currency = 'KRW') => { }).format(numAmount) } -export function getBiddingsReceiveColumns({ setRowAction }: GetColumnsProps): ColumnDef[] { +export function getBiddingsReceiveColumns({ setRowAction, onParticipantClick }: GetColumnsProps): ColumnDef[] { return [ // ░░░ 선택 ░░░ @@ -195,24 +196,17 @@ export function getBiddingsReceiveColumns({ setRowAction }: GetColumnsProps): Co if (!startDate || !endDate) return - - const now = new Date() const startObj = new Date(startDate) const endObj = new Date(endDate) - - const isActive = now >= startObj && now <= endObj - const isPast = now > endObj // UI 표시용 KST 변환 const formatKst = (d: Date) => new Date(d.getTime() + 9 * 60 * 60 * 1000).toISOString().slice(0, 16).replace('T', ' ') return (
-
+
{formatKst(startObj)} ~ {formatKst(endObj)}
- {isActive && ( - 진행중 - )}
) }, @@ -251,10 +245,18 @@ export function getBiddingsReceiveColumns({ setRowAction }: GetColumnsProps): Co id: "participantExpected", header: ({ column }) => , cell: ({ row }) => ( -
- - {row.original.participantExpected} -
+ ), size: 100, meta: { excelHeader: "참여예정협력사" }, @@ -265,10 +267,18 @@ export function getBiddingsReceiveColumns({ setRowAction }: GetColumnsProps): Co id: "participantParticipated", header: ({ column }) => , cell: ({ row }) => ( -
- - {row.original.participantParticipated} -
+ ), size: 100, meta: { excelHeader: "참여협력사" }, @@ -279,10 +289,18 @@ export function getBiddingsReceiveColumns({ setRowAction }: GetColumnsProps): Co id: "participantDeclined", header: ({ column }) => , cell: ({ row }) => ( -
- - {row.original.participantDeclined} -
+ ), size: 100, meta: { excelHeader: "포기협력사" }, @@ -293,10 +311,18 @@ export function getBiddingsReceiveColumns({ setRowAction }: GetColumnsProps): Co id: "participantPending", header: ({ column }) => , cell: ({ row }) => ( -
- - {row.original.participantPending} -
+ ), size: 100, meta: { excelHeader: "미제출협력사" }, -- cgit v1.2.3