diff --git a/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/publicReuseFaciltyInsert/page.tsx b/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/publicReuseFaciltyInsert/page.tsx index 49605f54f..cd373d10e 100644 --- a/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/publicReuseFaciltyInsert/page.tsx +++ b/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/publicReuseFaciltyInsert/page.tsx @@ -9,66 +9,70 @@ import type { TableUpperProps } from '../../../store/publicReuseFaciltyInsert'; - const headMakeColSpan = (upHeadList: TableUpperProps[]) => { - return ( <> +const headMakeColSpan = (upHeadList: TableUpperProps[]) => { + + return (<> { - upHeadList.map((head: TableUpperProps) => - (!head.upSequnce?{head.title}: - head.upName === 'upChangeRe'&& head.upSequnce=== 1?{'중축 개축 증축 '}:null))} + upHeadList.map((head: TableUpperProps) => + (!head.upSequnce ? {head.title} : + head.upName === 'upChangeRe' && head.upSequnce === 1 ? {'중축 개축 증축 '} : null))} {upHeadList.map((head: TableUpperProps) => - (head.upName === 'upChangeRe'?{head.title}:null))} + (head.upName === 'upChangeRe' ? {head.title} : null))} - ) - } + ) +} - - - - export default function PublicReuseFaciltyInsert() { - const {building} = useWrStore((state) => state); - const { upHeadList, publicReuseFacilityUper} = building; - const nodeList= headMakeColSpan(upHeadList); +export default function PublicReuseFaciltyInsert() { + const { pubFac } = useWrStore((state) => state); + const { upHeadList, publicReuseFacilityUper } = pubFac; + const nodeList = headMakeColSpan(upHeadList); const total = 100; - - - const searchDiv ='시군구' - const selectBox = [{text:'한양', value:1}] - const headName= ()=>{ - return( -

○공공 허수처리시설 등록

- ) - } - return ( <> -
-
-

하수재이용시설 등록

- -
- - - -
-
-
+ + const searchDiv = '시군구' + const selectBox = [{ text: '한양', val: "1" }, { text: '서울', val: "2" }, { text: '부산', val: "3" }] + const headName = () => { + return ( +

○공공 허수처리시설 등록

+ ) + } + const onSelectValue = (val: string) => { + console.log(val) + } + return ( + <> +
+
+

하수재이용시설 등록

+
+ +
+ +
+
+ + +
+
+ {/*
*/} +
+
- + {nodeList} - +
- - {/* */} + + {/* */}
- -
- - - )} - + + + ) +} \ No newline at end of file diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx index fe7dc33a8..b13135fa3 100644 --- a/apps/wr/app/store/store.tsx +++ b/apps/wr/app/store/store.tsx @@ -1,13 +1,15 @@ import { createStore } from 'zustand/vanilla'; import { tableActionsExport, tableStateExport, type tableState, type tableType } from './publicReuseFaciltyInsert/index'; -import { buildingTableActionsExport, buildingtableStateExport, type buildingTableType } from './rainReuseFacilityInsert'; +import { buildingTableActionsExport, buildingtableStateExport, type buildingTableState, type buildingTableType } from './rainReuseFacilityInsert'; export type WrStore = tableType & buildingTableType; -export const StoreZus = (initState: tableState = tableStateExport) => { +export const StoreZus = (initState: buildingTableState& tableState = { + ...tableStateExport, + ...buildingtableStateExport +}) => { return createStore()((set) => { return { ...initState, ...tableActionsExport(set), - ...buildingtableStateExport, ...buildingTableActionsExport(set) } }) diff --git a/apps/wr/components/ui/publicReuseInsertForm.tsx b/apps/wr/components/ui/publicReuseInsertForm.tsx index bf4405ab6..0221abf10 100644 --- a/apps/wr/components/ui/publicReuseInsertForm.tsx +++ b/apps/wr/components/ui/publicReuseInsertForm.tsx @@ -1,15 +1,14 @@ "use client"; +import { SelectBox } from "@common/business_components"; import { FileUpload, UiTable } from "@common/business_components/ui"; -import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "@common/business_components/ui/form"; -import { Button, FileSearch, Input } from "@common/components"; +import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@common/business_components/ui/form"; +import { Button, DatePicker, Input } from "@common/components"; import { zodResolver } from "@hookform/resolvers/zod"; import { useState } from "react"; import { useForm } from "react-hook-form"; import { z } from "zod"; import { useWrStore } from "../../app/store/index"; -import { SelectBox } from "@common/business_components"; -import { DatePicker } from "@common/components"; const formSchema = z.object({ username: z.string().min(2).max(50), @@ -17,13 +16,14 @@ const formSchema = z.object({ }); -type typeOfForm = { - labelName: string; - type: string; - selectvlaue?: { text: string; val: string }[]; -} +// type typeOfForm = { +// labelName: string; +// type: string; +// selectvlaue?: { text: string; val: string }[]; +// } export function PublicReuseFaciltyFormInsert() { - const { upHeadList, publicReuseFacilityUper } = useWrStore((state) => state); + const { pubFac } = useWrStore((state) => state); + const { upHeadList, publicReuseFacilityUper } = pubFac; const total = 100; const form = useForm>({