diff --git a/apps/wr/app/ruseFcltMng/fcltReg/htdflReg/page.tsx b/apps/wr/app/ruseFcltMng/fcltReg/htdflReg/page.tsx index bcdacf7ca..c92eb8bd3 100644 --- a/apps/wr/app/ruseFcltMng/fcltReg/htdflReg/page.tsx +++ b/apps/wr/app/ruseFcltMng/fcltReg/htdflReg/page.tsx @@ -9,6 +9,7 @@ import { SearchFormRight, SearchInput, Title, + UiModal, UiTable, } from "@common/business_components"; import { Button } from "@common/components"; @@ -16,16 +17,25 @@ import { headMakeColSpan } from "../rainReg/page"; import ListDiv from "@common/business_components/ui/list_div"; import { useEffect, useState } from "react"; import { tableData } from "@/components/lib/func/commom"; -import type { customHtdflBdst } from "@/app/store/ruseFcltMng/fcltReg/htdflReg"; -import type { customRswtBdst } from "@/app/store/ruseFcltMng/fcltReg/rswtReg"; import { HtdflRegForm } from "@/components/ui/form/fcltReg/htdflReg/htdflRegForm"; +import type { chgBuilding } from "@/app/store/ruseFcltMng/fcltReg/rainReg"; +import BdstChgModal from "@/components/ui/modal/bdstChgModal/bdstChgModal"; +import { BdstReg } from "@/components/ui/modal/bdstRegModal/bdstRegModal"; +import type { customHtdflBdst } from "@/app/store/ruseFcltMng/fcltReg/htdflReg"; export default function Home() { const { code, htdfl, initHtdfl } = useWrStore((state) => state); const nodeList = headMakeColSpan(htdfl.upHeadList); const [searchTxt, setSearchTxt] = useState(""); - const [rswtForm, setRswtForm] = useState(); + const [htdflForm, setHtdflForm] = useState(); const [bdstTable, setbdstTable] = useState(); + const [issNewReg,setIsNewReg] = useState( false); + + const [bdstChgProps, setBdstChgProps] = useState<{ + isOpen: boolean; + chgBuilding: chgBuilding[]; + }>({ isOpen: false, chgBuilding: [] }); + const { htdflRes } = htdfl; useEffect(() => { @@ -40,12 +50,26 @@ export default function Home() { } }, [code, htdflRes]); - const cellClick: (val: number | undefined) => void = (val) => { + const cellClick: (val: number|undefined ,headId: string) => void = ( + val + ,headId) => { if ((bdstTable ?? []).length > 0 && val !== undefined) { { - setRswtForm(htdflRes[val]); + setHtdflForm(htdflRes[val]); } } + + if (headId === "bdstChgYn" && val !== undefined) { + if ( + htdflRes[val]?.bdstInfoPk != null && + htdflRes[val]?.chgBuilding?.length > 0 + ) { + bdstChgModal(htdflRes[val]?.chgBuilding); + } + } + }; + const bdstChgModal = (chgBuilding: chgBuilding[]) => { + setBdstChgProps({ isOpen: true, chgBuilding: chgBuilding }); }; return ( <> @@ -65,8 +89,13 @@ export default function Home() { /> - - + + @@ -81,7 +110,7 @@ export default function Home() { pageSize={100} total={10} headName={"○건축물 목록"} - cellClick={cellClick} + cellClick={(val,headId)=>{cellClick(val||undefined , headId)}} > {nodeList} @@ -91,13 +120,33 @@ export default function Home() { + } + bodyClass="w-[90vw] max-w-none" + open={issNewReg} + onOpenChange={(open) => { + setIsNewReg(open); + }} + /> + + } + onOpenChange={(open) => { + setBdstChgProps({ ...bdstChgProps, isOpen: open }); + } + } + /> + + ); diff --git a/apps/wr/app/ruseFcltMng/fcltReg/pbnstReg/page.tsx b/apps/wr/app/ruseFcltMng/fcltReg/pbnstReg/page.tsx index df9fa8411..1db6b224b 100644 --- a/apps/wr/app/ruseFcltMng/fcltReg/pbnstReg/page.tsx +++ b/apps/wr/app/ruseFcltMng/fcltReg/pbnstReg/page.tsx @@ -90,8 +90,8 @@ const resetContents = () => {
- 운영정보 - 시설정보 + 시설정보 + 차수별정보 -
+ + + {/*
*/} +
+
+

○온배수 시설 정보

+ +
+
+ + { isModal && htdflForm != undefined ? ( + + ) : ( + <> + )} + {isModal ? ( +

+ ○ 중수도 시설 정보{" "} +

+ ) : ( + <> + )} + + + +
+
+ ( + + + + )} + />
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + /> + + )} + /> +
+
+ ( + + + + )} + /> +
+
+
+

+ 온배수 시설 운영현황 +

+
-
-
- ( - - - - )} - /> -
- -
- ( - - +
+ ( + + { + field.onChange(Number(e.target.value)); + }} + /> + + )} + /> +
+
+ ( + + + + )} + /> +
+
+ ( + + { + field.onChange(Number(e.target.value)); + }} + /> + + )} + /> +
+
+ ( + + field.onChange(Number(e.target.value))} - /> - - )} - /> -
-
- ( - - - - )} - /> + /> + + )} + />
+
+ ( + + + + )} + />
-
-

- 온배수 시설 운영현황 -

+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + />
+
+ ( + + + + )} + /> +
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + /> +
+
+ ( + + + + )} + /> +
+
-
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
- ( - - - - )} - /> -
-
- -
-

+
+

요구수질 -

-
- -
-
- ( - - - - )} - /> -
+

+
-
- ( - - - - )} - /> -
+
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + />
-
-
- ( - - - - )} - /> -
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + /> +
+
-
- ( - - - - )} - /> -
+
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + />
-
-
- ( - - - - )} - /> -
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + /> +
+
-
- ( - - - - )} - /> -
+
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + />
-
-
- ( - - - - )} - /> -
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + /> +
+
-
- ( - - - - )} - /> -
+
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + />
-
-
- ( - - - - )} - /> -
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + /> +
+
-
- ( - - - - )} - /> -
+
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + />
-
-
- ( - - - - )} - /> -
- -
- ( - - - - )} - /> -
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + />
- - +
+ +
+
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + /> +
+ +
+ ( + + field.onChange(Number(e.target.value))} + /> + + )} + /> +
+
+ + ); } diff --git a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/component.tsx b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/component.tsx index 83766b8de..b358a98fc 100644 --- a/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/component.tsx +++ b/apps/wr/components/ui/form/fcltReg/pbnstReg/buseReg/component.tsx @@ -120,25 +120,6 @@ const nodeList = headMakeColSpan(pubMngUpHeadList); )} />
- -
- ( - - { - if (date) setInstlAprvDate(date); - } - }} mode="single" {...field}/> - - )} - /> -
+
+ ( + + { + if (date) setInstlAprvDate(date); + } + }} mode="single" {...field}/> + + )} + /> +

2. 사업비

diff --git a/apps/wr/components/ui/form/fcltReg/rainReg/component.tsx b/apps/wr/components/ui/form/fcltReg/rainReg/rainRegForm.tsx similarity index 87% rename from apps/wr/components/ui/form/fcltReg/rainReg/component.tsx rename to apps/wr/components/ui/form/fcltReg/rainReg/rainRegForm.tsx index bdde6bd3e..36895009a 100644 --- a/apps/wr/components/ui/form/fcltReg/rainReg/component.tsx +++ b/apps/wr/components/ui/form/fcltReg/rainReg/rainRegForm.tsx @@ -95,7 +95,7 @@ export function RainRegForm({

- {isModal ? "○건축물 운영정보" : "○ 빗물이용시설 운영정보"} + {isModal ? "○건축물 운영정보" : "○ 빗물이용시설 정보"}