From d7585b3f2ea941ee807c1e87bbc833265a193c78 Mon Sep 17 00:00:00 2001
From: dujinkim <dujin.kim@dtsolution.co.kr>
Date: Mon, 15 Sep 2025 10:14:09 +0000
Subject: (최겸) 구매 일반계약 및 상세, PO 전달 구현
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 lib/general-contracts/main/general-contract-update-sheet.tsx | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

(limited to 'lib/general-contracts/main/general-contract-update-sheet.tsx')

diff --git a/lib/general-contracts/main/general-contract-update-sheet.tsx b/lib/general-contracts/main/general-contract-update-sheet.tsx
index 57e4fe16..064fded3 100644
--- a/lib/general-contracts/main/general-contract-update-sheet.tsx
+++ b/lib/general-contracts/main/general-contract-update-sheet.tsx
@@ -38,7 +38,7 @@ import {
 } from "@/lib/general-contracts/types"
 import { updateContract } from "../service"
 import { GeneralContractListItem } from "./general-contracts-table-columns"
-
+import { useSession } from "next-auth/react"
 const updateContractSchema = z.object({
   category: z.string().min(1, "계약구분을 선택해주세요"),
   type: z.string().min(1, "계약종류를 선택해주세요"),
@@ -70,7 +70,8 @@ export function GeneralContractUpdateSheet({
   onSuccess,
 }: GeneralContractUpdateSheetProps) {
   const [isSubmitting, setIsSubmitting] = React.useState(false)
-
+  const session = useSession()
+  const userId = session.data?.user?.id ? Number(session.data.user.id) : null
   const form = useForm<UpdateContractFormData>({
     resolver: zodResolver(updateContractSchema),
     defaultValues: {
@@ -141,6 +142,8 @@ export function GeneralContractUpdateSheet({
         linkedRfqOrItb: data.linkedRfqOrItb,
         linkedPoNumber: data.linkedPoNumber,
         linkedBidNumber: data.linkedBidNumber,
+        vendorId: contract.vendorId,
+        lastUpdatedById: userId,
       })
 
       toast.success("계약 정보가 성공적으로 수정되었습니다.")
-- 
cgit v1.2.3

