diff --git a/apps/sn/public/images/map/layericon/RDL_TSCT_PS.png b/apps/sn/public/images/map/layericon/RDL_TSCT_PS.png index ffc225159..81ad25a20 100644 Binary files a/apps/sn/public/images/map/layericon/RDL_TSCT_PS.png and b/apps/sn/public/images/map/layericon/RDL_TSCT_PS.png differ diff --git a/apps/sn/public/images/map/layericon/RDL_TSCT_PS500.png b/apps/sn/public/images/map/layericon/RDL_TSCT_PS500.png index b82e2ff89..991826693 100644 Binary files a/apps/sn/public/images/map/layericon/RDL_TSCT_PS500.png and b/apps/sn/public/images/map/layericon/RDL_TSCT_PS500.png differ diff --git a/apps/wr/app/store/matDmd/ldrmntCoSttn/index.tsx b/apps/wr/app/store/matDmd/ldrmntCoSttn/index.tsx index 8de791c89..45c6c5773 100644 --- a/apps/wr/app/store/matDmd/ldrmntCoSttn/index.tsx +++ b/apps/wr/app/store/matDmd/ldrmntCoSttn/index.tsx @@ -114,10 +114,11 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = ( }); }, ldrmntRegData: async (data) => { - await deleteFectch( - `/reuseFc/request/temp`, - ); - console.log("deleteFectch", deleteFectch) + // 잠재수요처 - 삭제 주석 처리 + // await deleteFectch( + // `/reuseFc/request/temp`, + // ); + // console.log("deleteFectch", deleteFectch) const response = await postFectch( "/reuseFc/request/temp", @@ -125,7 +126,8 @@ export const ldrmntActionsExport: (set: any) => ldrmntActions = ( fetchType.WR ); - console.log('response ', response) + console.log('response ', response); + return response; }, ldrmntSearch: async (isExcel: boolean, page: number, total: string, sggCd: string, coNm: string) => { diff --git a/apps/wr/components/ui/modal/coReg/coRegExcel/coRegExcelModal.tsx b/apps/wr/components/ui/modal/coReg/coRegExcel/coRegExcelModal.tsx index 1e51fb11c..bc625ec78 100644 --- a/apps/wr/components/ui/modal/coReg/coRegExcel/coRegExcelModal.tsx +++ b/apps/wr/components/ui/modal/coReg/coRegExcel/coRegExcelModal.tsx @@ -10,18 +10,20 @@ import { useState } from "react"; import { useForm } from "react-hook-form"; import toast from "react-hot-toast"; import type { z } from "zod"; +import { useConfirm } from "@frontend-opensource/use-react-hooks"; export default function CoRegExcel({ isModal, }: { isModal: (open: boolean) => void; }) { + const { confirm } = useConfirm(); const { ldrmnt, loadingOpen } = useWrStore((state) => state); const { isLoading } = ldrmnt; const form = useForm>({ resolver: zodResolver(coRegExcel), }); - const { ldrmntRegData } = useWrStore((state) => state); + const { ldrmntRegData, ldrmntDelete } = useWrStore((state) => state); const [file, setFiles] = useState(); @@ -32,8 +34,7 @@ export default function CoRegExcel({ // } // }; - //TODO:Onsubmit을 써야하는지 - const onSubmit = () => { + const onSubmit = (isReplaceAll = false) => { loadingOpen(true); if (file) { filePicked(file, 0) @@ -59,10 +60,23 @@ export default function CoRegExcel({ return false; }); } + if (isReplaceAll) { + const isConfirmed = await confirm( + "기존 등록된 잠재수요처를 \n모두 삭제후 등록처리됩니다. 실행하시겠습니까?", + ); + + if (!isConfirmed) { + loadingOpen(false); + return; + } + + await ldrmntDelete(); + } + await ldrmntRegData(array); isModal(false); loadingOpen(false); - toast.success(`잠재수요처 등록이 완료되었습니다.`); + toast.success(`잠재수요처 등록이 요청되었습니다.`); } catch (e) { console.log(e); loadingOpen(false); @@ -72,7 +86,10 @@ export default function CoRegExcel({ }) .catch((e) => { console.log("file", e); + loadingOpen(false); }); + } else { + loadingOpen(false); } }; @@ -81,7 +98,7 @@ export default function CoRegExcel({
- + e.preventDefault()}>
@@ -89,9 +106,24 @@ export default function CoRegExcel({

{"잠재수요처 파일"}

- +
+ + +
diff --git a/apps/wr/public/images/map/layericon/BML_CBAS_PS.png b/apps/wr/public/images/map/layericon/BML_CBAS_PS.png index 0e70939ba..5f98fe6d4 100644 Binary files a/apps/wr/public/images/map/layericon/BML_CBAS_PS.png and b/apps/wr/public/images/map/layericon/BML_CBAS_PS.png differ diff --git a/apps/wr/public/images/map/layericon/BML_STMS_PS.png b/apps/wr/public/images/map/layericon/BML_STMS_PS.png index bf4357181..36ba360c2 100644 Binary files a/apps/wr/public/images/map/layericon/BML_STMS_PS.png and b/apps/wr/public/images/map/layericon/BML_STMS_PS.png differ diff --git a/apps/wr/public/images/map/layericon/RDL_ETCT_PS.png b/apps/wr/public/images/map/layericon/RDL_ETCT_PS.png index e5a83f998..d52ad75d4 100644 Binary files a/apps/wr/public/images/map/layericon/RDL_ETCT_PS.png and b/apps/wr/public/images/map/layericon/RDL_ETCT_PS.png differ diff --git a/apps/wr/public/images/map/layericon/RDL_OCUP_PS.png b/apps/wr/public/images/map/layericon/RDL_OCUP_PS.png index aeae3e266..f3ff30b85 100644 Binary files a/apps/wr/public/images/map/layericon/RDL_OCUP_PS.png and b/apps/wr/public/images/map/layericon/RDL_OCUP_PS.png differ diff --git a/apps/wr/public/images/map/layericon/RDL_TSCT_PS.png b/apps/wr/public/images/map/layericon/RDL_TSCT_PS.png index 3776f6c04..81ad25a20 100644 Binary files a/apps/wr/public/images/map/layericon/RDL_TSCT_PS.png and b/apps/wr/public/images/map/layericon/RDL_TSCT_PS.png differ diff --git a/apps/wr/public/images/map/layericon/RDL_TSCT_PS500.png b/apps/wr/public/images/map/layericon/RDL_TSCT_PS500.png index b82e2ff89..991826693 100644 Binary files a/apps/wr/public/images/map/layericon/RDL_TSCT_PS500.png and b/apps/wr/public/images/map/layericon/RDL_TSCT_PS500.png differ