import * as React from 'react' import { Bidding } from '@/db/schema' import { Card, CardContent, CardHeader, CardTitle } from '@/components/ui/card' import { Badge } from '@/components/ui/badge' // import { formatDate } from '@/lib/utils' import { biddingStatusLabels, contractTypeLabels } from '@/db/schema' // 입찰유형 라벨 맵 추가 const biddingTypeLabels: Record = { equipment: '기자재', construction: '공사', service: '용역', lease: '임차', transport: '운송', waste: '폐기물', sale: '매각', other: '기타(직접입력)', } interface BiddingInfoCardProps { bidding: Bidding } export function BiddingInfoCard({ bidding }: BiddingInfoCardProps) { return ( 입찰정보
{/* 입찰명 */}
{bidding.title || '-'}
{/* 입찰번호 */}
{bidding.biddingNumber || '-'}
{/* 내정가 */}
{bidding.targetPrice ? `${Number(bidding.targetPrice).toLocaleString()} ${bidding.currency || 'KRW'}` : '-' }
{/* 입찰유형 */}
{biddingTypeLabels[bidding.biddingType as keyof typeof biddingTypeLabels] || bidding.biddingType || '-'}
{/* 진행상태 */}
{biddingStatusLabels[bidding.status as keyof typeof biddingStatusLabels] || bidding.status}
{/* 입찰담당자 */}
{bidding.bidPicName || '-'}
{/* 계약구분 */}
{contractTypeLabels[bidding.contractType as keyof typeof contractTypeLabels] || bidding.contractType}
) }