From b806134cb4024278c397c584222ae471cec549ec Mon Sep 17 00:00:00 2001 From: leedj312 Date: Mon, 14 Jul 2025 16:38:16 +0900 Subject: [PATCH] =?UTF-8?q?=EA=B1=B4=EC=B6=95=EB=AC=BC=20=EB=B3=80?= =?UTF-8?q?=EA=B2=BD=EC=9D=B4=EB=A0=A5=20=EC=82=AD=EC=A0=9C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ruseFcltMng/fcltReg/rainReg/page.tsx | 41 ++++--------------- .../app/ruseFcltMng/fcltReg/rswtReg/page.tsx | 32 +-------------- 2 files changed, 9 insertions(+), 64 deletions(-) diff --git a/apps/wr/app/ruseFcltMng/fcltReg/rainReg/page.tsx b/apps/wr/app/ruseFcltMng/fcltReg/rainReg/page.tsx index 83679a274..a7895ff13 100644 --- a/apps/wr/app/ruseFcltMng/fcltReg/rainReg/page.tsx +++ b/apps/wr/app/ruseFcltMng/fcltReg/rainReg/page.tsx @@ -1,12 +1,10 @@ "use client"; import { useWrStore } from "@/app/store"; import { - type chgBuilding, type customRainBdst, } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; import { tableData } from "@/components/lib/func/commom"; import RainRegForm from "@/components/ui/form/fcltReg/rainReg/rainRegForm"; -import BdstChgModal from "@/components/ui/modal/fcltReg/bdstChgModal/bdstChgModal"; import { BdstReg } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal"; import { ContentsDiv, @@ -35,10 +33,6 @@ export default function Home() { const [pageNation, setPageNation] = useState(1); const [bdstTable, setbdstTable] = useState(); const [searchTxt, setSearchTxt] = useState(); - const [bdstChgProps, setBdstChgProps] = useState<{ - isOpen: boolean; - chgBuilding: chgBuilding[]; - }>({ isOpen: false, chgBuilding: [] }); useEffect(() => { setIsNewReg(false); @@ -60,7 +54,6 @@ export default function Home() { ...item, archArea: archArea, - bdstChgYn: item.chgBuilding.length > 0 ? "Y" : "N", }; } ); @@ -71,27 +64,18 @@ export default function Home() { } } }, [code, rainRes]); - const cellClick: (val: number | undefined, headId: string) => void = ( - val, - headId + const cellClick: (val: number | undefined) => void = ( + val ) => { if (val !== undefined) { setRainForm(rainRes[val]); } - if (headId === "bdstChgYn" && val !== undefined) { - if ( - rainRes[val]?.bdstInfoPk != null && - rainRes[val]?.chgBuilding.length > 0 - ) { - bdstChgModal(rainRes[val].chgBuilding); - } - } }; - const bdstChgModal = (chgBuilding: chgBuilding[]) => { - setBdstChgProps({ isOpen: true, chgBuilding: chgBuilding }); - }; + // const bdstChgModal = (chgBuilding: chgBuilding[]) => { + // setBdstChgProps({ isOpen: true, chgBuilding: chgBuilding }); + // }; useEffect(() => { getRainData(pageNation, "41"); @@ -149,8 +133,8 @@ export default function Home() { pageSize={20} total={rainResCount} headName={"건축물 목록"} - cellClick={(val, headId) => { - cellClick(val, headId); + cellClick={(val) => { + cellClick(val); }} onPageChange={setPageNation} > @@ -183,17 +167,6 @@ export default function Home() { }} /> - - } - onOpenChange={(open) => { - setBdstChgProps({ ...bdstChgProps, isOpen: open }); - }} - /> - diff --git a/apps/wr/app/ruseFcltMng/fcltReg/rswtReg/page.tsx b/apps/wr/app/ruseFcltMng/fcltReg/rswtReg/page.tsx index 686154bc9..6945788c4 100644 --- a/apps/wr/app/ruseFcltMng/fcltReg/rswtReg/page.tsx +++ b/apps/wr/app/ruseFcltMng/fcltReg/rswtReg/page.tsx @@ -1,10 +1,8 @@ "use client"; import { useWrStore } from "@/app/store"; -import type { chgBuilding } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; import type { customRswtBdst } from "@/app/store/ruseFcltMng/fcltReg/rswtReg"; import { tableData } from "@/components/lib/func/commom"; import RswtrRegForm from "@/components/ui/form/fcltReg/rswtrReg/rswtrRegForm"; -import BdstChgModal from "@/components/ui/modal/fcltReg/bdstChgModal/bdstChgModal"; import { BdstReg } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal"; import { ContentsDiv, @@ -32,10 +30,6 @@ export default function Home() { const [pageNation, setPageNation] = useState(1); const [selectVal, setSelect] = useState(); const [bdstTable, setbdstTable] = useState(); - const [bdstChgProps, setBdstChgProps] = useState<{ - isOpen: boolean; - chgBuilding: chgBuilding[]; - }>({ isOpen: false, chgBuilding: [] }); const { rswtRes, rswtResCount } = rswt; useEffect(() => { if (!rswt.isInit) { @@ -77,28 +71,16 @@ export default function Home() { }, [rswtRes, selectVal]); const cellClick: (val: number | undefined, headId: string) => void = ( - val, - headId + val ) => { if ((bdstTable ?? []).length > 0 && val !== undefined) { { setSelect(val); - // setRswtForm(rswtRes[val]); } } - if (headId === "bdstChgYn" && val !== undefined) { - if ( - rswtRes[val]?.bdstInfoPk != null && - rswtRes[val]?.chgBuilding?.length > 0 - ) { - bdstChgModal(rswtRes[val].chgBuilding); - } - } - }; - const bdstChgModal = (chgBuilding: chgBuilding[]) => { - setBdstChgProps({ isOpen: true, chgBuilding: chgBuilding }); }; + useEffect(() => { getRswtBdstData(pageNation, "41"); }, [pageNation]); @@ -184,16 +166,6 @@ export default function Home() { setIsNewReg(open); }} /> - - } - onOpenChange={(open) => { - setBdstChgProps({ ...bdstChgProps, isOpen: open }); - }} - />