From fb12eadf659f1c3bb796355fdb8f052394f2e522 Mon Sep 17 00:00:00 2001 From: bicochan Date: Fri, 28 Aug 2026 17:43:47 +0900 Subject: [PATCH] =?UTF-8?q?[as]=20feat:=20=ED=95=84=EC=88=98=EC=B2=A8?= =?UTF-8?q?=EB=B6=80=ED=8C=8C=EC=9D=BC=20=EC=84=B9=EC=85=98=20=EC=88=98?= =?UTF-8?q?=EC=A0=95(=ED=8C=8C=EC=9D=BC=20=EC=96=91=EC=8B=9D=20=EC=BB=AC?= =?UTF-8?q?=EB=9F=BC)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/attachments-form-section.tsx | 159 ++++++++++-------- 1 file changed, 92 insertions(+), 67 deletions(-) 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 = ""; - }} - /> - - -
- - - )) + })} +
+ )} +
+ +
+
+
+ ); + }) )}