From 401b54a8a9536b376eab020291e073972add462d Mon Sep 17 00:00:00 2001 From: leedj312 Date: Tue, 24 Jun 2025 20:01:33 +0900 Subject: [PATCH] =?UTF-8?q?=EC=9D=BC=EB=8B=A8=EA=B2=BD=EA=B8=B0=EB=8F=84?= =?UTF-8?q?=EB=A1=9C=20=EA=B3=A0=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/ruseFcltMng/fcltReg/pbnstReg/page.tsx | 18 +++++++++++------- .../prfmncReg/pbnstPrfmncReg/page.tsx | 16 ++++++++++------ 2 files changed, 21 insertions(+), 13 deletions(-) diff --git a/apps/wr/app/ruseFcltMng/fcltReg/pbnstReg/page.tsx b/apps/wr/app/ruseFcltMng/fcltReg/pbnstReg/page.tsx index 7638e6cb4..441eabf25 100644 --- a/apps/wr/app/ruseFcltMng/fcltReg/pbnstReg/page.tsx +++ b/apps/wr/app/ruseFcltMng/fcltReg/pbnstReg/page.tsx @@ -58,6 +58,8 @@ export default function PublicReuseFaciltyInsert() { const [searchTxt, setSearchTxt] = useState(); const [bdstTable, setbdstTable] = useState(); const [selectRow, setSelectRow] = useState(); + const [pageNation, setPageNation] = useState(1); + const form = useForm<{ items: z.infer[]; @@ -76,7 +78,7 @@ export default function PublicReuseFaciltyInsert() { }); useEffect(() => { if (!pbnst.isInit) { - pubHasuInit("1", "0"); + pubHasuInit("1", "41"); } }, [pbnst.isInit, pubHasuInit]); @@ -190,7 +192,9 @@ export default function PublicReuseFaciltyInsert() { // console.log(" page getgetvaslue ", form.getValues()); }, [form.getValues()]); - +useEffect(() =>{ + pubHasuInit(String(pageNation), "41"); +},[pageNation,pubHasuInit]) return ( <> @@ -214,8 +218,8 @@ export default function PublicReuseFaciltyInsert() { size={"sm"} onClick={(e) => { searchTxt && searchTxt?.length > 0 - ? pubHasuSearch("1", "0", searchTxt) - : pubHasuInit("1", "0"); + ? pubHasuSearch(String(pageNation), "41", searchTxt) + : pubHasuInit(String(pageNation), "41"); }} > 조회 @@ -250,11 +254,11 @@ export default function PublicReuseFaciltyInsert() { {}} + onPageChange={setPageNation} children={undefined} /> diff --git a/apps/wr/app/ruseFcltMng/prfmncReg/pbnstPrfmncReg/page.tsx b/apps/wr/app/ruseFcltMng/prfmncReg/pbnstPrfmncReg/page.tsx index 0714c9306..6be50a8c5 100644 --- a/apps/wr/app/ruseFcltMng/prfmncReg/pbnstPrfmncReg/page.tsx +++ b/apps/wr/app/ruseFcltMng/prfmncReg/pbnstPrfmncReg/page.tsx @@ -51,6 +51,7 @@ export default function prfmncPrfmncReg() { }>({ isModal: false, data: {} as FcPrfType }); const [inputData, setInputData] = useState(); const [pbnstRuseFcltPk, setPbnstRuseFcltPk] = useState(); + const [pageNation , setPageNation] = useState(1); const [searchYear, setSearchYear] = useState( String(new Date().getFullYear()) @@ -73,9 +74,12 @@ export default function prfmncPrfmncReg() { pbnstRuseFcltPk ) as unknown as PrfType ); - prfmncHasuInit("1", "11"); + prfmncHasuInit(String(pageNation), "41"); } - }, [inputData, searchYear, pbnstRuseFcltPk,prfmncHasuInit]); + }, [inputData, searchYear, pbnstRuseFcltPk,prfmncHasuInit,pageNation]); + + + const cellClick = useCallback( (index: number | undefined, headId: string) => { @@ -146,7 +150,7 @@ export default function prfmncPrfmncReg() { useEffect(() => { if (!prfmnc.isInit) { - prfmncHasuInit("1", "11"); + prfmncHasuInit('1', "41"); } }, [prfmnc.isInit, prfmncHasuInit]); useEffect(() => { @@ -229,13 +233,13 @@ export default function prfmncPrfmncReg() { { cellClick(index, headId); }} - onPageChange={(page: number) => {}} + onPageChange={setPageNation} children={undefined} />