diff --git a/apps/storefront/src/pages/quote/components/FileUpload.tsx b/apps/storefront/src/pages/quote/components/FileUpload.tsx index aa7825ff..4519d78c 100644 --- a/apps/storefront/src/pages/quote/components/FileUpload.tsx +++ b/apps/storefront/src/pages/quote/components/FileUpload.tsx @@ -94,6 +94,7 @@ interface FileUploadProps { onDelete?: (id: string) => void limitUploadFn?: () => boolean isEndLoadding?: boolean + requestType?: string } const AttachFile = styled(AttachFileIcon)(() => ({ @@ -115,6 +116,7 @@ function FileUpload(props: FileUploadProps, ref: Ref) { allowUpload = true, onDelete = noop, isEndLoadding = false, + requestType = 'quoteAttachedFile', } = props const theme = useTheme() @@ -198,7 +200,7 @@ function FileUpload(props: FileUploadProps, ref: Ref) { message, } = await uploadB2BFile({ file, - type: 'quoteAttachedFile', + type: requestType, }) if (code === 200) { onchange({ diff --git a/apps/storefront/src/pages/quote/components/QuoteAttachment.tsx b/apps/storefront/src/pages/quote/components/QuoteAttachment.tsx index 909bf3c3..bb520277 100644 --- a/apps/storefront/src/pages/quote/components/QuoteAttachment.tsx +++ b/apps/storefront/src/pages/quote/components/QuoteAttachment.tsx @@ -3,6 +3,7 @@ import { useB3Lang } from '@b3/lang' import { Box, Card, CardContent } from '@mui/material' import { B3CollapseContainer } from '@/components' +import { useRole } from '@/hooks' import { GlobaledContext } from '@/shared/global' import { quoteDetailAttachFileCreate, @@ -33,6 +34,8 @@ export default function QuoteAttachment(props: QuoteAttachmentProps) { }, } = useContext(GlobaledContext) + const [roleText] = useRole() + const [fileList, setFileList] = useState([]) const uploadRef = useRef(null) @@ -153,6 +156,11 @@ export default function QuoteAttachment(props: QuoteAttachmentProps) {