From 09de176d16b73679b9d670980fb85a51e5f2f7e3 Mon Sep 17 00:00:00 2001 From: ljpark Date: Mon, 6 Apr 2026 10:15:27 +0900 Subject: [PATCH] =?UTF-8?q?wr:=20modal=20toast=20=EB=B3=80=EA=B2=BD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../ui/map/LayerPopUp/HasuFacilty/HasuFacility.tsx | 3 +++ .../ui/map/LayerPopUp/HedfFacilty/HtdfFacilty.tsx | 3 +++ .../map/LayerPopUp/RainFacility/RainFacility.tsx | 3 +++ .../ui/map/LayerPopUp/RswtFacilty/RswtFacilty.tsx | 3 +++ .../ui/map/LayerPopUp/RuseFacilty/RuseFacility.tsx | 3 +++ .../chkgd/pbnPrfExcelModal/pbnPrfExcelModal.tsx | 10 ++++++++-- .../ui/modal/coReg/coRegExcel/coRegExcelModal.tsx | 14 +++++++++----- .../ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx | 8 +++++--- .../fcltReg/fcOrgwtsRegModal/fcOrgwtsRegModal.tsx | 10 ++++++++-- 9 files changed, 45 insertions(+), 12 deletions(-) diff --git a/apps/wr/components/ui/map/LayerPopUp/HasuFacilty/HasuFacility.tsx b/apps/wr/components/ui/map/LayerPopUp/HasuFacilty/HasuFacility.tsx index 067723ccf..beaf26b81 100644 --- a/apps/wr/components/ui/map/LayerPopUp/HasuFacilty/HasuFacility.tsx +++ b/apps/wr/components/ui/map/LayerPopUp/HasuFacilty/HasuFacility.tsx @@ -1,3 +1,6 @@ +/** + * map 시설물 layer > 하수처리시설 modal + */ import { useWrStore } from "@/app/store"; import { btnClass } from "@/app/store/common/code"; import { pbnMapTableSize } from "@/app/store/map/pbnstMap"; diff --git a/apps/wr/components/ui/map/LayerPopUp/HedfFacilty/HtdfFacilty.tsx b/apps/wr/components/ui/map/LayerPopUp/HedfFacilty/HtdfFacilty.tsx index f10574148..86da242d7 100644 --- a/apps/wr/components/ui/map/LayerPopUp/HedfFacilty/HtdfFacilty.tsx +++ b/apps/wr/components/ui/map/LayerPopUp/HedfFacilty/HtdfFacilty.tsx @@ -1,3 +1,6 @@ +/** + * map 시설물 layer > 온배수시설 modal + */ import { useWrStore } from "@/app/store"; import { htdfMapSize } from "@/app/store/map/htdflMap"; import { rainMapSize } from "@/app/store/map/rainMap"; diff --git a/apps/wr/components/ui/map/LayerPopUp/RainFacility/RainFacility.tsx b/apps/wr/components/ui/map/LayerPopUp/RainFacility/RainFacility.tsx index a980712e9..74bf0aa55 100644 --- a/apps/wr/components/ui/map/LayerPopUp/RainFacility/RainFacility.tsx +++ b/apps/wr/components/ui/map/LayerPopUp/RainFacility/RainFacility.tsx @@ -1,3 +1,6 @@ +/** + * map 시설물 layer > 빗물이용시설 modal + */ import { useWrStore } from "@/app/store"; import { rainMapSize } from "@/app/store/map/rainMap"; import type { customRainBdst } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; diff --git a/apps/wr/components/ui/map/LayerPopUp/RswtFacilty/RswtFacilty.tsx b/apps/wr/components/ui/map/LayerPopUp/RswtFacilty/RswtFacilty.tsx index 6cad8f105..4fe818568 100644 --- a/apps/wr/components/ui/map/LayerPopUp/RswtFacilty/RswtFacilty.tsx +++ b/apps/wr/components/ui/map/LayerPopUp/RswtFacilty/RswtFacilty.tsx @@ -1,3 +1,6 @@ +/** + * map 시설물 layer > 중수도시설 modal + */ import { useWrStore } from "@/app/store"; import { rainMapSize } from "@/app/store/map/rainMap"; import type { customRswtBdst } from "@/app/store/ruseFcltMng/fcltReg/rswtReg"; diff --git a/apps/wr/components/ui/map/LayerPopUp/RuseFacilty/RuseFacility.tsx b/apps/wr/components/ui/map/LayerPopUp/RuseFacilty/RuseFacility.tsx index 59a8fcc57..8ed06293b 100644 --- a/apps/wr/components/ui/map/LayerPopUp/RuseFacilty/RuseFacility.tsx +++ b/apps/wr/components/ui/map/LayerPopUp/RuseFacilty/RuseFacility.tsx @@ -1,3 +1,6 @@ +/** + * map 시설물 layer > 하수재이용시설 modal + */ import { useWrStore } from "@/app/store"; import { btnClass } from "@/app/store/common/code"; import { ruseMapSize } from "@/app/store/map/ruseMap"; diff --git a/apps/wr/components/ui/modal/chkgd/pbnPrfExcelModal/pbnPrfExcelModal.tsx b/apps/wr/components/ui/modal/chkgd/pbnPrfExcelModal/pbnPrfExcelModal.tsx index 3881e5813..0857340e3 100644 --- a/apps/wr/components/ui/modal/chkgd/pbnPrfExcelModal/pbnPrfExcelModal.tsx +++ b/apps/wr/components/ui/modal/chkgd/pbnPrfExcelModal/pbnPrfExcelModal.tsx @@ -1,3 +1,6 @@ +/** + * 재이용실적등록> 하수재이용 실적등록 파일등록 modal + */ import { excelToPbnPrfData } from "@/app/store/prfmncReg/pbnstPrfmncReg/excel"; import { pbnPrfRegExcelZod } from "@/app/store/prfmncReg/pbnstPrfmncReg/headList"; import type { @@ -17,8 +20,9 @@ import { Button, Input } from "@common/components/ui"; import { zodResolver } from "@hookform/resolvers/zod"; import { useEffect, useState } from "react"; import { useForm } from "react-hook-form"; -import toast from "react-hot-toast"; +// import toast from "react-hot-toast"; import type { z } from "zod"; +import { useAlertStore } from "@/src/shared/lib"; export default function PbnPrfExcelModal({ data, @@ -29,6 +33,7 @@ export default function PbnPrfExcelModal({ setIsExcelOPen: (open: boolean) => void; setModalExcelData: (excelData: PrfType) => void; }) { + const alert = useAlertStore((state) => state.setMessage); const [file, setFile] = useState(null); const [excelData, setExcelData] = useState(); const form = useForm>({ @@ -65,7 +70,8 @@ export default function PbnPrfExcelModal({ if (file) { const isFile = file; if (form.getValues("ym").length < 1) { - toast.error("파일업로드 이전에 등록년도를 작성해주세요 "); + // toast.error("파일업로드 이전에 등록년도를 작성해주세요 "); + alert("파일업로드 이전에 등록년도를 작성해주세요 "); setFile(null); return; } diff --git a/apps/wr/components/ui/modal/coReg/coRegExcel/coRegExcelModal.tsx b/apps/wr/components/ui/modal/coReg/coRegExcel/coRegExcelModal.tsx index bfc958598..c1bfda0ff 100644 --- a/apps/wr/components/ui/modal/coReg/coRegExcel/coRegExcelModal.tsx +++ b/apps/wr/components/ui/modal/coReg/coRegExcel/coRegExcelModal.tsx @@ -8,9 +8,10 @@ import { Button, Input } from "@common/components/ui"; import { zodResolver } from "@hookform/resolvers/zod"; import { useState } from "react"; import { useForm } from "react-hook-form"; -import toast from "react-hot-toast"; +// import toast from "react-hot-toast"; import type { z } from "zod"; import { useConfirm } from "@frontend-opensource/use-react-hooks"; +import { useAlertStore } from "@/src/shared/lib"; export default function CoRegExcel({ isModal, @@ -18,6 +19,7 @@ export default function CoRegExcel({ isModal: (open: boolean) => void; }) { const { confirm } = useConfirm(); + const alert = useAlertStore((state) => state.setMessage); const { ldrmnt, loadingOpen } = useWrStore((state) => state); const { isLoading } = ldrmnt; const form = useForm>({ @@ -76,11 +78,12 @@ export default function CoRegExcel({ await ldrmntRegData(array); isModal(false); loadingOpen(false); - toast.success(`잠재수요처 등록이 요청되었습니다.`); - } catch (e) { + // toast.success(`잠재수요처 등록이 요청되었습니다.`); + alert("잠재수요처 등록이 요청되었습니다."); + } catch (e: any) { console.log(e); loadingOpen(false); - alert(e); + // alert(e.message); return true; } }) @@ -90,7 +93,8 @@ export default function CoRegExcel({ }); } else { loadingOpen(false); - toast.error(`엑셀 파일을 선택해 주세요.`); + // toast.error(`엑셀 파일을 선택해 주세요.`); + alert("엑셀 파일을 선택해 주세요."); } }; diff --git a/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx b/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx index 89584ad3d..236797711 100644 --- a/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx +++ b/apps/wr/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal.tsx @@ -18,7 +18,8 @@ import { } from "@common/business_components"; import { Button, Input, Label } from "@common/components"; import { useEffect, useState } from "react"; -import toast from "react-hot-toast"; +// import toast from "react-hot-toast"; +import { useAlertStore } from "@/src/shared/lib"; export type objSearchType = { sgg: string | number; @@ -47,7 +48,7 @@ export function BdstReg({ const { code, bdst, auth, findBdst } = useWrStore((state) => { return state; }); - + const alert = useAlertStore((state) => state.setMessage); const { laeSeCd } = auth; const [bdstTable, setBdstTable] = useState(); @@ -73,7 +74,8 @@ export function BdstReg({ findBdst(String(data), searchTxt || "", moType); }else{ - toast.error("시도 또는 시군구를 선택하여 주십시오."); + // toast.error("시도 또는 시군구를 선택하여 주십시오."); + alert("시도 또는 시군구를 선택하여 주십시오."); } }; diff --git a/apps/wr/components/ui/modal/fcltReg/fcOrgwtsRegModal/fcOrgwtsRegModal.tsx b/apps/wr/components/ui/modal/fcltReg/fcOrgwtsRegModal/fcOrgwtsRegModal.tsx index ac79d761a..3be1806f8 100644 --- a/apps/wr/components/ui/modal/fcltReg/fcOrgwtsRegModal/fcOrgwtsRegModal.tsx +++ b/apps/wr/components/ui/modal/fcltReg/fcOrgwtsRegModal/fcOrgwtsRegModal.tsx @@ -1,3 +1,6 @@ +/** + * 재이용시설등록 > 하수재이용시설등록 - 취수하수처리장 추가 modal + */ "use client"; import { useWrStore } from "@/app/store"; import type { @@ -12,7 +15,8 @@ import { Button } from "@common/business_components/ui/table/lib/button"; import { Input } from "@common/components/ui"; import { ArrowLeft, ArrowRight } from "lucide-react"; import { useEffect, useRef, useState } from "react"; -import toast from "react-hot-toast"; +// import toast from "react-hot-toast"; +import { useAlertStore } from "@/src/shared/lib"; export default function FcOrgwtsRegModal({ onRightSet, @@ -23,6 +27,7 @@ export default function FcOrgwtsRegModal({ closeModal?: (val: boolean) => void; initTableData?: any[]; }) { + const alert = useAlertStore((state) => state.setMessage); const { code, pbnst, getSwtrmtFcltNm, searchFclts } = useWrStore( (state) => state ); @@ -53,7 +58,8 @@ export default function FcOrgwtsRegModal({ closeModal?.(false) } else { - toast.error("취수하수처리장 목록을 선택해주세요.") + // toast.error("취수하수처리장 목록을 선택해주세요."); + alert("취수하수처리장 목록을 선택해주세요."); } }