summaryrefslogtreecommitdiff
path: root/lib/techsales-rfq/table
diff options
context:
space:
mode:
Diffstat (limited to 'lib/techsales-rfq/table')
-rw-r--r--lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx6
1 files changed, 4 insertions, 2 deletions
diff --git a/lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx b/lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx
index 3b0fd38d..fa9be9e3 100644
--- a/lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx
+++ b/lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx
@@ -4,7 +4,7 @@ import * as React from "react"
import { z } from "zod"
import { useForm, useFieldArray } from "react-hook-form"
import { zodResolver } from "@hookform/resolvers/zod"
-
+import { cn } from "@/lib/utils"
import {
Sheet,
SheetContent,
@@ -50,6 +50,7 @@ import {
import prettyBytes from "pretty-bytes"
import { formatDate } from "@/lib/utils"
import { processTechSalesRfqAttachments } from "@/lib/techsales-rfq/service"
+import { useSession } from "next-auth/react"
const MAX_FILE_SIZE = 6e8 // 600MB
@@ -129,6 +130,7 @@ export function TechSalesRfqAttachmentsSheet({
...props
}: TechSalesRfqAttachmentsSheetProps) {
const [isPending, setIsPending] = React.useState(false)
+ const session = useSession()
// 첨부파일 타입별 제목과 설명 설정
const attachmentConfig = React.useMemo(() => {
@@ -274,7 +276,7 @@ export function TechSalesRfqAttachmentsSheet({
techSalesRfqId: rfq.id,
newFiles,
deleteAttachmentIds,
- createdBy: 1, // TODO: 실제 사용자 ID로 변경
+ createdBy: parseInt(session.data?.user.id || "0"),
})
if (result.error) {