summaryrefslogtreecommitdiff
path: root/lib/general-contracts/main/general-contract-update-sheet.tsx
diff options
context:
space:
mode:
Diffstat (limited to 'lib/general-contracts/main/general-contract-update-sheet.tsx')
-rw-r--r--lib/general-contracts/main/general-contract-update-sheet.tsx15
1 files changed, 12 insertions, 3 deletions
diff --git a/lib/general-contracts/main/general-contract-update-sheet.tsx b/lib/general-contracts/main/general-contract-update-sheet.tsx
index 8df74beb..02bde6c9 100644
--- a/lib/general-contracts/main/general-contract-update-sheet.tsx
+++ b/lib/general-contracts/main/general-contract-update-sheet.tsx
@@ -116,14 +116,23 @@ export function GeneralContractUpdateSheet({
React.useEffect(() => {
if (contract) {
console.log("Loading contract data:", contract)
+
+ // 날짜 포맷팅 헬퍼 (YYYY-MM-DD)
+ const formatDateValue = (dateStr: string | null | undefined) => {
+ if (!dateStr) return ""
+ // KST 기준 날짜 변환 (입찰 로직과 동일)
+ const date = new Date(dateStr)
+ return new Date(date.getTime() + 9 * 60 * 60 * 1000).toISOString().slice(0, 10)
+ }
+
const formData = {
category: contract.category || "",
type: contract.type || "",
executionMethod: contract.executionMethod || "",
name: contract.name || "",
- startDate: contract.startDate || "",
- endDate: contract.endDate || "",
- validityEndDate: contract.validityEndDate || "",
+ startDate: formatDateValue(contract.startDate),
+ endDate: formatDateValue(contract.endDate),
+ validityEndDate: formatDateValue(contract.validityEndDate),
contractScope: contract.contractScope || "",
notes: contract.notes || "",
linkedRfqOrItb: contract.linkedRfqOrItb || "",