From ab95b278cd9a58558032c61294eb69a63247a598 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Fri, 7 Mar 2025 09:34:00 +0900 Subject: [PATCH] =?UTF-8?q?=ED=95=98=EC=88=98=EC=9E=AC=EC=9D=B4=EC=9A=A9?= =?UTF-8?q?=EC=8B=9C=EC=84=9C=20=ED=8F=BC=20=20=EC=9E=91=EC=97=85=EC=A4=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../app/component/publicReuseInsertForm.tsx | 119 ++---------------- apps/wr/app/publicReuseFaciltyInsert/page.tsx | 20 ++- apps/wr/package.json | 12 +- apps/wr/tailwind.config.ts | 55 +++++++- 4 files changed, 89 insertions(+), 117 deletions(-) diff --git a/apps/wr/app/component/publicReuseInsertForm.tsx b/apps/wr/app/component/publicReuseInsertForm.tsx index 337e0eb4e..e6cbc2eea 100644 --- a/apps/wr/app/component/publicReuseInsertForm.tsx +++ b/apps/wr/app/component/publicReuseInsertForm.tsx @@ -1,18 +1,6 @@ "use client"; -import { zodResolver } from "@hookform/resolvers/zod"; -import { useForm } from "react-hook-form"; -import { z } from "zod"; -import { Button, FileSearch, Input } from "@common/components"; -import { - Form, - FormField, - FormItem, - FormLabel, - FormControl, - FormDescription, - FormMessage, -} from "@common/business_components/ui/form"; -import { UiTable } from "@common/business_components/ui"; + +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 { zodResolver } from "@hookform/resolvers/zod"; @@ -75,49 +63,14 @@ export function PublicReuseFaciltyFormInsert() { { text: "자쳬+연계", val: "3" }, ]; -let formData =[ - {labelName:'농축수발생량(m³/일)', type:'input',selectvlaue:undefined}, - {labelName:'농축수연계지점',type:'input',selectvlaue:undefined}, - {labelName:'시설용량(m³/일)',type:'input',selectvlaue:undefined}, - {labelName:'농축수 처리방식',type:'check', selectvlaue:selectboxMethodValue}, - {labelName:'농축수 처리공법',type:'input',selectvlaue:undefined}, -] + const [files, setFiles] = useState(null); -const formIter = (formData: typeOfForm[] ) => { + + return ( - <> - {formData.map((data:typeOfForm) =>{ - -
- ( - - data.name - - {data.type==='input'? : } - - - - )} - /> -
- } )} - - ) - } - - const filedForm = formIter(formData); - - - - - - return ( - <> +
@@ -157,59 +110,14 @@ const formIter = (formData: typeOfForm[] ) => { 계통도 - + )} /> - {/* ( - - 계통도 - - - -
- -

- Click to upload -   or drag and drop -

-

- SVG, PNG, JPG or GIF -

-
-
- - {files && - files.length > 0 && - files.map((file, i) => ( - - - {file.name} - - ))} - -
-
- -
- )} - /> */} -
- -
+
+
{ 평면도 - + @@ -619,13 +527,10 @@ const formIter = (formData: typeOfForm[] ) => {

농축수관리{" "}

- - { filedForm} - - +
- +
); } diff --git a/apps/wr/app/publicReuseFaciltyInsert/page.tsx b/apps/wr/app/publicReuseFaciltyInsert/page.tsx index c3fd3f953..056ba7cb3 100644 --- a/apps/wr/app/publicReuseFaciltyInsert/page.tsx +++ b/apps/wr/app/publicReuseFaciltyInsert/page.tsx @@ -1,7 +1,7 @@ 'use client' -import {UiTable } from '@common/business_components'; -import { TableRow } from '@common/components'; +import {SearchDiv, SelectBox, UiTable } from '@common/business_components'; +import { Button, TableRow } from '@common/components'; import { TableHead } from '@common/components'; import Style from "../style/PublicReuseFaciltyInsert.module.css"; import { useWrStore } from '../store'; @@ -34,16 +34,26 @@ import { PublicReuseFaciltyFormInsert } from '../component/publicReuseInsertFor const total = 100; - + const searchDiv ='시군구' + const selectBox = [{text:'한양', value:1}] return ( <> +
+ +
+ + + +
+
+
- + {nodeList}
-
+
diff --git a/apps/wr/package.json b/apps/wr/package.json index 347537b32..843dd295c 100644 --- a/apps/wr/package.json +++ b/apps/wr/package.json @@ -11,11 +11,15 @@ "dependencies": { "@common/business_components": "workspace:*", "@common/components": "workspace:*", - "next": "15.1.7", - "zod": "^3.24.2", "@hookform/resolvers": "^4.1.3", - "react-hook-form": "^7.54.2" - + "class-variance-authority": "^0.7.1", + "clsx": "^2.1.1", + "lucide-react": "^0.474.0", + "next": "15.1.7", + "react-hook-form": "^7.54.2", + "tailwind-merge": "^3.0.1", + "tailwindcss-animate": "^1.0.7", + "zod": "^3.24.2" }, "devDependencies": { "@eslint/eslintrc": "^3", diff --git a/apps/wr/tailwind.config.ts b/apps/wr/tailwind.config.ts index 733f8d49b..97b467081 100644 --- a/apps/wr/tailwind.config.ts +++ b/apps/wr/tailwind.config.ts @@ -3,9 +3,62 @@ import baseConfig from "../../packages/common/components/tailwind.config"; import type { Config } from "tailwindcss"; export default { - presets: [baseConfig], + darkMode: ["class"], + presets: [baseConfig], content: [ "./app/**/*.{js,ts,jsx,tsx,mdx}", "../../packages/common/components/src/ui/**/*.{js,ts,jsx,tsx,mdx}", ], + plugins: [require("tailwindcss-animate")], + theme: { + extend: { + borderRadius: { + lg: 'var(--radius)', + md: 'calc(var(--radius) - 2px)', + sm: 'calc(var(--radius) - 4px)' + }, + colors: { + background: 'hsl(var(--background))', + foreground: 'hsl(var(--foreground))', + card: { + DEFAULT: 'hsl(var(--card))', + foreground: 'hsl(var(--card-foreground))' + }, + popover: { + DEFAULT: 'hsl(var(--popover))', + foreground: 'hsl(var(--popover-foreground))' + }, + primary: { + DEFAULT: 'hsl(var(--primary))', + foreground: 'hsl(var(--primary-foreground))' + }, + secondary: { + DEFAULT: 'hsl(var(--secondary))', + foreground: 'hsl(var(--secondary-foreground))' + }, + muted: { + DEFAULT: 'hsl(var(--muted))', + foreground: 'hsl(var(--muted-foreground))' + }, + accent: { + DEFAULT: 'hsl(var(--accent))', + foreground: 'hsl(var(--accent-foreground))' + }, + destructive: { + DEFAULT: 'hsl(var(--destructive))', + foreground: 'hsl(var(--destructive-foreground))' + }, + border: 'hsl(var(--border))', + input: 'hsl(var(--input))', + ring: 'hsl(var(--ring))', + chart: { + '1': 'hsl(var(--chart-1))', + '2': 'hsl(var(--chart-2))', + '3': 'hsl(var(--chart-3))', + '4': 'hsl(var(--chart-4))', + '5': 'hsl(var(--chart-5))' + } + } + } + } } satisfies Config;