From 842461eb53456e309359e7e63d4ecee7105195ff Mon Sep 17 00:00:00 2001 From: truthwing Date: Mon, 10 Mar 2025 18:21:26 +0900 Subject: [PATCH 1/2] =?UTF-8?q?=EB=AC=BC=EC=9E=AC=EC=9D=B4=EC=9A=A9=20?= =?UTF-8?q?=EC=84=9C=EC=B9=98=EB=B0=94=20=EC=88=98=EC=A0=95=EC=A4=91.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../publicReuseFaciltyInsert/page.tsx | 96 ++++++++++--------- apps/wr/app/store/store.tsx | 8 +- .../components/ui/publicReuseInsertForm.tsx | 20 ++-- 3 files changed, 65 insertions(+), 59 deletions(-) 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>({ From e4d5e21b2944169449844be2842ca3f606d8dc35 Mon Sep 17 00:00:00 2001 From: truthwing Date: Mon, 10 Mar 2025 18:25:06 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=EC=9E=85=ED=8F=AC=ED=8A=B8=20=EA=B5=AC?= =?UTF-8?q?=EC=A1=B0=20=EC=88=98=EC=A0=95=20=EC=84=9C=EC=B9=98=ED=8F=BC=20?= =?UTF-8?q?=EA=B8=B0=EB=B3=B8=20=ED=81=AC=EA=B8=B0=20=EC=A0=81=EC=9A=A9=20?= =?UTF-8?q?=EA=B8=80=EC=9E=90=ED=81=AC=EA=B8=B0=202xl=EB=A1=9C=20=EC=88=98?= =?UTF-8?q?=EC=A0=95.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .gitignore | 4 +- .../src/ui/scroll/index.tsx | 4 +- .../src/ui/search_form/index.tsx | 4 +- .../src/ui/select/index.tsx | 4 +- .../src/ui/table/index.tsx | 72 +++++++++---------- 5 files changed, 45 insertions(+), 43 deletions(-) diff --git a/.gitignore b/.gitignore index 3f815ea23..a4574580d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,6 @@ node_modules # misc -.DS_Store \ No newline at end of file +.DS_Store +apps/wr/.next/**/* +apps/fo/.next/**/* \ No newline at end of file diff --git a/packages/common/business_components/src/ui/scroll/index.tsx b/packages/common/business_components/src/ui/scroll/index.tsx index cf253cf17..cd32e8856 100644 --- a/packages/common/business_components/src/ui/scroll/index.tsx +++ b/packages/common/business_components/src/ui/scroll/index.tsx @@ -1,7 +1,7 @@ -import * as React from "react" import * as ScrollAreaPrimitive from "@radix-ui/react-scroll-area" +import * as React from "react" -import { cn } from "@/lib/utils" +import { cn } from "../../lib/utils" const ScrollArea = React.forwardRef< React.ElementRef, diff --git a/packages/common/business_components/src/ui/search_form/index.tsx b/packages/common/business_components/src/ui/search_form/index.tsx index 45444a68f..7c6024748 100644 --- a/packages/common/business_components/src/ui/search_form/index.tsx +++ b/packages/common/business_components/src/ui/search_form/index.tsx @@ -1,9 +1,9 @@ function SearchDiv ({children}:{ children: React.ReactNode; }) { return ( -
+
{children}
) } -export { SearchDiv }; \ No newline at end of file +export { SearchDiv }; diff --git a/packages/common/business_components/src/ui/select/index.tsx b/packages/common/business_components/src/ui/select/index.tsx index 9f5f6d25c..d039c2c2a 100644 --- a/packages/common/business_components/src/ui/select/index.tsx +++ b/packages/common/business_components/src/ui/select/index.tsx @@ -17,9 +17,9 @@ const SelectBox = React.forwardRef< return (
- {label && } + {label && }