diff options
Diffstat (limited to 'lib/bidding/list')
| -rw-r--r-- | lib/bidding/list/biddings-table-columns.tsx | 31 | ||||
| -rw-r--r-- | lib/bidding/list/export-biddings-to-excel.ts | 9 |
2 files changed, 28 insertions, 12 deletions
diff --git a/lib/bidding/list/biddings-table-columns.tsx b/lib/bidding/list/biddings-table-columns.tsx index 62d4dbe7..602bcbb9 100644 --- a/lib/bidding/list/biddings-table-columns.tsx +++ b/lib/bidding/list/biddings-table-columns.tsx @@ -257,21 +257,40 @@ export function getBiddingsColumns({ setRowAction }: GetColumnsProps): ColumnDef id: "submissionPeriod", header: ({ column }) => <DataTableColumnHeaderSimple column={column} title="입찰서제출기간" />, cell: ({ row }) => { + const status = row.original.status + + // 입찰생성 또는 결재진행중 상태일 때는 특별 메시지 표시 + if (status === 'bidding_generated') { + return ( + <div className="text-xs text-orange-600 font-medium"> + 입찰 등록중입니다 + </div> + ) + } + + if (status === 'approval_pending') { + return ( + <div className="text-xs text-blue-600 font-medium"> + 결재 진행중입니다 + </div> + ) + } + const startDate = row.original.submissionStartDate const endDate = row.original.submissionEndDate - + if (!startDate || !endDate) return <span className="text-muted-foreground">-</span> - + 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', ' ') - + // 입력값 기반: 저장된 UTC 값 그대로 표시 (타임존 가감 없음) + const formatValue = (d: Date) => d.toISOString().slice(0, 16).replace('T', ' ') + return ( <div className="text-xs"> <div> - {formatKst(startObj)} ~ {formatKst(endObj)} + {formatValue(startObj)} ~ {formatValue(endObj)} </div> </div> ) diff --git a/lib/bidding/list/export-biddings-to-excel.ts b/lib/bidding/list/export-biddings-to-excel.ts index 8b13e38d..64d98399 100644 --- a/lib/bidding/list/export-biddings-to-excel.ts +++ b/lib/bidding/list/export-biddings-to-excel.ts @@ -83,13 +83,10 @@ export async function exportBiddingsToExcel( const startObj = new Date(startDate) const endObj = new Date(endDate) - // KST 변환 (UTC+9) - const formatKst = (d: Date) => { - const kstDate = new Date(d.getTime() + 9 * 60 * 60 * 1000) - return kstDate.toISOString().slice(0, 16).replace('T', ' ') - } + // 입력값 기반: 저장된 UTC 값을 그대로 표시 (타임존 가감 없음) + const formatValue = (d: Date) => d.toISOString().slice(0, 16).replace('T', ' ') - value = `${formatKst(startObj)} ~ ${formatKst(endObj)}` + value = `${formatValue(startObj)} ~ ${formatValue(endObj)}` } break |
