diff --git a/apps/as/src/widgets/pbadms-sprt/ui/attachments-form-section.tsx b/apps/as/src/widgets/pbadms-sprt/ui/attachments-form-section.tsx index c982b8eeb..cf3bc912b 100644 --- a/apps/as/src/widgets/pbadms-sprt/ui/attachments-form-section.tsx +++ b/apps/as/src/widgets/pbadms-sprt/ui/attachments-form-section.tsx @@ -11,7 +11,7 @@ import { useTus } from "@/shared/lib"; import type { AtflMngClientResponseDto, EsntlAtchFileMngTreeResponseDto } from "@/shared/model"; import { TextShimmer } from "@/shared/ui"; import { SectionCollapsible } from "@/shared/ui"; -import { attachService } from "@/entities/attach"; +import { attachService, useDownloadAttachmentByAtflId } from "@/entities/attach"; import { useEsntlAtchFileMngTree } from "@/entities/esntl"; import { Button, @@ -212,6 +212,7 @@ function AttachmentsFormSection({ const { data: essentialFiles = [], isPending: isLoadingEssentialFiles } = useEsntlAtchFileMngTree( { docSeComCd }, ); + const { mutate: downloadTemplate } = useDownloadAttachmentByAtflId(); async function invalidateAttachmentQueries() { await queryClient.invalidateQueries({ @@ -375,9 +376,10 @@ function AttachmentsFormSection({

필수 첨부파일

- - - + + + + @@ -385,83 +387,106 @@ function AttachmentsFormSection({ 파일명 파일 확장자 + 파일 양식 파일첨부 {essentialFiles.length === 0 ? ( - + 조회된 필수 첨부파일 항목이 없습니다. ) : ( - essentialFiles.map((file) => ( - - - {file.esntlAtchFileNm} - - {file.esntlAtchFileRmrk} - - {uploadedFiles[file.esntlAtchFileId]?.length > 0 && ( -
- {uploadedFiles[file.esntlAtchFileId].map((item, idx) => { - const uploading = isUploading[item.fileKey] ?? false; + essentialFiles.map((file) => { + const templateFiles = file.templateAtchFileList ?? []; - return ( -
+ + {file.esntlAtchFileNm} + + {file.esntlAtchFileRmrk} + + {templateFiles.length === 0 ? ( + - + ) : ( + + )} + + + {uploadedFiles[file.esntlAtchFileId]?.length > 0 && ( +
+ {uploadedFiles[file.esntlAtchFileId].map((item, idx) => { + const uploading = isUploading[item.fileKey] ?? false; + + return ( +
- - -
- ); - })} -
- )} -
-
); - e.target.value = ""; - }} - /> - - -
- - - )) + })} +
+ )} +
+ +
+
+
+ ); + }) )}