diff options
Diffstat (limited to 'components/bidding')
| -rw-r--r-- | components/bidding/manage/bidding-items-editor.tsx | 28 | ||||
| -rw-r--r-- | components/bidding/manage/bidding-schedule-editor.tsx | 15 |
2 files changed, 27 insertions, 16 deletions
diff --git a/components/bidding/manage/bidding-items-editor.tsx b/components/bidding/manage/bidding-items-editor.tsx index f61b3960..ef0aa568 100644 --- a/components/bidding/manage/bidding-items-editor.tsx +++ b/components/bidding/manage/bidding-items-editor.tsx @@ -676,6 +676,7 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[300px]">자재명</th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">수량(중량) <span className="text-red-500">*</span></th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">단위 <span className="text-red-500">*</span></th> + <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">납품요청일 <span className="text-red-500">*</span></th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">가격단위</th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">구매단위</th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[100px]">자재순중량</th> @@ -686,7 +687,6 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">예산통화</th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">실적금액</th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[80px]">실적통화</th> - <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">납품요청일 <span className="text-red-500">*</span></th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[300px]">WBS코드</th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[150px]">WBS명</th> <th className="border-r px-3 py-3 text-left text-xs font-medium min-w-[120px]">코스트센터코드</th> @@ -755,6 +755,9 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems <span className="text-xs text-muted-foreground">-</span> </td> <td className="border-r px-3 py-3 text-center"> + <span className="text-xs text-muted-foreground">-</span> + </td> + <td className="border-r px-3 py-3 text-center"> <span className="text-xs">{formatNumberWithCommas(totals.targetAmountTotal.toString())}</span> </td> <td className="border-r px-3 py-3 text-center"> @@ -784,9 +787,7 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems <td className="border-r px-3 py-3 text-center"> <span className="text-xs text-muted-foreground">-</span> </td> - <td className="border-r px-3 py-3 text-center"> - <span className="text-xs text-muted-foreground">-</span> - </td> + <td className="border-r px-3 py-3 text-center"> <span className="text-xs text-muted-foreground">-</span> </td> @@ -998,6 +999,15 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems </td> <td className="border-r px-3 py-2"> <Input + type="date" + value={item.requestedDeliveryDate || ''} + onChange={(e) => updatePRItem(item.id, { requestedDeliveryDate: e.target.value })} + className="h-8 text-xs" + required + /> + </td> + <td className="border-r px-3 py-2"> + <Input type="number" min="1" step="1" @@ -1124,15 +1134,7 @@ export function BiddingItemsEditor({ biddingId, readonly = false }: BiddingItems </SelectContent> </Select> </td> - <td className="border-r px-3 py-2"> - <Input - type="date" - value={item.requestedDeliveryDate || ''} - onChange={(e) => updatePRItem(item.id, { requestedDeliveryDate: e.target.value })} - className="h-8 text-xs" - required - /> - </td> + <td className="border-r px-3 py-2"> <Button variant="outline" diff --git a/components/bidding/manage/bidding-schedule-editor.tsx b/components/bidding/manage/bidding-schedule-editor.tsx index ca4643ff..4ddaee08 100644 --- a/components/bidding/manage/bidding-schedule-editor.tsx +++ b/components/bidding/manage/bidding-schedule-editor.tsx @@ -140,6 +140,15 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc return round > 1 } + // UTC 날짜를 한국 시간(KST) 기준 datetime-local 입력값으로 변환 + const toKstInputValue = (date: string | Date | undefined | null) => { + if (!date) return '' + const d = new Date(date) + // UTC 시간에 9시간을 더함 + const kstTime = d.getTime() + (9 * 60 * 60 * 1000) + return new Date(kstTime).toISOString().slice(0, 16) + } + // 데이터 로딩 React.useEffect(() => { const loadSchedule = async () => { @@ -156,8 +165,8 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc }) setSchedule({ - submissionStartDate: bidding.submissionStartDate ? new Date(bidding.submissionStartDate).toISOString().slice(0, 16) : '', - submissionEndDate: bidding.submissionEndDate ? new Date(bidding.submissionEndDate).toISOString().slice(0, 16) : '', + submissionStartDate: toKstInputValue(bidding.submissionStartDate), + submissionEndDate: toKstInputValue(bidding.submissionEndDate), remarks: bidding.remarks || '', isUrgent: bidding.isUrgent || false, hasSpecificationMeeting: bidding.hasSpecificationMeeting || false, @@ -170,7 +179,7 @@ export function BiddingScheduleEditor({ biddingId, readonly = false }: BiddingSc if (meetingDetails.success && meetingDetails.data) { const meeting = meetingDetails.data setSpecMeetingInfo({ - meetingDate: meeting.meetingDate ? new Date(meeting.meetingDate).toISOString().slice(0, 16) : '', + meetingDate: toKstInputValue(meeting.meetingDate), meetingTime: meeting.meetingTime || '', location: meeting.location || '', address: meeting.address || '', |
