diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-11-28 03:12:57 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-11-28 03:12:57 +0000 |
| commit | 9cda8482660a87fd98c9ee43f507d75ff75b4e23 (patch) | |
| tree | 67eb1fc24eec7c4e61d3154f7b09fc5349454672 /lib/bidding/list/biddings-table-columns.tsx | |
| parent | f57898bd240d068301ce3ef477f52cff1234e4ee (diff) | |
(최겸) 구매 입찰 피드백 반영(90%)
Diffstat (limited to 'lib/bidding/list/biddings-table-columns.tsx')
| -rw-r--r-- | lib/bidding/list/biddings-table-columns.tsx | 20 |
1 files changed, 7 insertions, 13 deletions
diff --git a/lib/bidding/list/biddings-table-columns.tsx b/lib/bidding/list/biddings-table-columns.tsx index 907115b1..9b8c19c5 100644 --- a/lib/bidding/list/biddings-table-columns.tsx +++ b/lib/bidding/list/biddings-table-columns.tsx @@ -256,23 +256,17 @@ export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef if (!startDate || !endDate) return <span className="text-muted-foreground">-</span> - const now = new Date().toString() - console.log(now, "now") - const startIso = new Date(startDate).toISOString() - const endIso = new Date(endDate).toISOString() + const startObj = new Date(startDate) + const endObj = new Date(endDate) + + // UI 표시용 KST 변환 + const formatKst = (d: Date) => new Date(d.getTime() + 9 * 60 * 60 * 1000).toISOString().slice(0, 16).replace('T', ' ') - const isActive = new Date(now) >= new Date(startIso) && new Date(now) <= new Date(endIso) - console.log(isActive, "isActive") - const isPast = new Date(now) > new Date(endIso) - console.log(isPast, "isPast") return ( <div className="text-xs"> - <div className={`${isActive ? 'text-green-600 font-medium' : isPast ? 'text-red-600' : 'text-gray-600'}`}> - {new Date(startDate).toISOString().slice(0, 16).replace('T', ' ')} ~ {new Date(endDate).toISOString().slice(0, 16).replace('T', ' ')} + <div> + {formatKst(startObj)} ~ {formatKst(endObj)} </div> - {isActive && ( - <Badge variant="default" className="text-xs mt-1">진행중</Badge> - )} </div> ) }, |
