diff options
| author | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-25 08:44:24 +0000 |
|---|---|---|
| committer | dujinkim <dujin.kim@dtsolution.co.kr> | 2025-06-25 08:44:24 +0000 |
| commit | 2a60945bf9eb50cd5cb28d7d3782290f92879361 (patch) | |
| tree | cacbd593430cedd27f6e8041c8344901ba98076e /lib | |
| parent | b30f5f1ef4b1167d955ac5e9f4c4a4c393b58436 (diff) | |
(최겸) 기술영업 rfq 첨부 오류 수정 0625
Diffstat (limited to 'lib')
| -rw-r--r-- | lib/techsales-rfq/table/tech-sales-rfq-attachments-sheet.tsx | 6 | ||||
| -rw-r--r-- | lib/techsales-rfq/vendor-response/detail/quotation-response-tab.tsx | 4 |
2 files changed, 7 insertions, 3 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) { diff --git a/lib/techsales-rfq/vendor-response/detail/quotation-response-tab.tsx b/lib/techsales-rfq/vendor-response/detail/quotation-response-tab.tsx index 20b2703c..0425ccc9 100644 --- a/lib/techsales-rfq/vendor-response/detail/quotation-response-tab.tsx +++ b/lib/techsales-rfq/vendor-response/detail/quotation-response-tab.tsx @@ -17,6 +17,7 @@ import { Select, SelectContent, SelectItem, SelectTrigger, SelectValue } from "@ import { Alert, AlertDescription } from "@/components/ui/alert" import { formatDate, cn } from "@/lib/utils" import { toast } from "sonner" +import { useSession } from "next-auth/react" interface QuotationResponseTabProps { quotation: { @@ -75,6 +76,7 @@ export function QuotationResponseTab({ quotation }: QuotationResponseTabProps) { }>>([]) const [isUploadingFiles, setIsUploadingFiles] = useState(false) const router = useRouter() + const session = useSession() // // 초기 첨부파일 데이터 로드 // useEffect(() => { @@ -175,7 +177,7 @@ export function QuotationResponseTab({ quotation }: QuotationResponseTabProps) { validUntil: validUntil!, remark, attachments: uploadedFiles, - updatedBy: 1 // TODO: 실제 사용자 ID로 변경 + updatedBy: parseInt(session.data?.user.id || "0") }) if (result.error) { |
