diff --git a/.gitignore b/.gitignore
index 40f0d864b..c40b4dc6e 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,3 +17,4 @@ dist
# env
.env*
+.qodo
diff --git a/apps/wr/.gitignore b/apps/wr/.gitignore
deleted file mode 100644
index 5ef6a5207..000000000
--- a/apps/wr/.gitignore
+++ /dev/null
@@ -1,41 +0,0 @@
-# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
-
-# dependencies
-/node_modules
-/.pnp
-.pnp.*
-.yarn/*
-!.yarn/patches
-!.yarn/plugins
-!.yarn/releases
-!.yarn/versions
-
-# testing
-/coverage
-
-# next.js
-/.next/
-/out/
-
-# production
-/build
-
-# misc
-.DS_Store
-*.pem
-
-# debug
-npm-debug.log*
-yarn-debug.log*
-yarn-error.log*
-.pnpm-debug.log*
-
-# env files (can opt-in for committing if needed)
-.env*
-
-# vercel
-.vercel
-
-# typescript
-*.tsbuildinfo
-next-env.d.ts
diff --git a/apps/wr/app/favicon.ico b/apps/wr/app/favicon.ico
deleted file mode 100644
index 718d6fea4..000000000
Binary files a/apps/wr/app/favicon.ico and /dev/null differ
diff --git a/apps/wr/app/globals.css b/apps/wr/app/globals.css
deleted file mode 100644
index f30aa3031..000000000
--- a/apps/wr/app/globals.css
+++ /dev/null
@@ -1,70 +0,0 @@
-@import "../../../packages/common/components/src/base.css";
-
-@tailwind base;
-@tailwind components;
-@tailwind utilities;
-
-@layer base {
- :root {
- --background: 0 0% 100%;
- --foreground: 0 0% 3.9%;
- --card: 0 0% 100%;
- --card-foreground: 0 0% 3.9%;
- --popover: 0 0% 100%;
- --popover-foreground: 0 0% 3.9%;
- --primary: 0 0% 9%;
- --primary-foreground: 0 0% 98%;
- --secondary: 0 0% 96.1%;
- --secondary-foreground: 0 0% 9%;
- --muted: 0 0% 96.1%;
- --muted-foreground: 0 0% 45.1%;
- --accent: 0 0% 96.1%;
- --accent-foreground: 0 0% 9%;
- --destructive: 0 84.2% 60.2%;
- --destructive-foreground: 0 0% 98%;
- --border: 0 0% 89.8%;
- --input: 0 0% 89.8%;
- --ring: 0 0% 3.9%;
- --chart-1: 12 76% 61%;
- --chart-2: 173 58% 39%;
- --chart-3: 197 37% 24%;
- --chart-4: 43 74% 66%;
- --chart-5: 27 87% 67%;
- --radius: 0.5rem
- }
- .dark {
- --background: 0 0% 3.9%;
- --foreground: 0 0% 98%;
- --card: 0 0% 3.9%;
- --card-foreground: 0 0% 98%;
- --popover: 0 0% 3.9%;
- --popover-foreground: 0 0% 98%;
- --primary: 0 0% 98%;
- --primary-foreground: 0 0% 9%;
- --secondary: 0 0% 14.9%;
- --secondary-foreground: 0 0% 98%;
- --muted: 0 0% 14.9%;
- --muted-foreground: 0 0% 63.9%;
- --accent: 0 0% 14.9%;
- --accent-foreground: 0 0% 98%;
- --destructive: 0 62.8% 30.6%;
- --destructive-foreground: 0 0% 98%;
- --border: 0 0% 14.9%;
- --input: 0 0% 14.9%;
- --ring: 0 0% 83.1%;
- --chart-1: 220 70% 50%;
- --chart-2: 160 60% 45%;
- --chart-3: 30 80% 55%;
- --chart-4: 280 65% 60%;
- --chart-5: 340 75% 55%
- }
-}
-
-@layer base {
- * {
- @apply border-border;
- }
- body {
- @apply bg-background text-foreground;
- }
-}
diff --git a/apps/wr/app/layout.tsx b/apps/wr/app/layout.tsx
deleted file mode 100644
index a0c14576d..000000000
--- a/apps/wr/app/layout.tsx
+++ /dev/null
@@ -1,21 +0,0 @@
-import { BaseLayout } from "@common/components";
-import "./globals.css";
-import { StoreProvider } from "./store";
-
-export default function RootLayout({
- children,
-}: Readonly<{
- children: React.ReactNode;
-}>) {
- return (
-
-
-
-
- {children}
-
-
-
-
- );
-}
diff --git a/apps/wr/app/matMng/matDmd/coReg/page.tsx b/apps/wr/app/matMng/matDmd/coReg/page.tsx
deleted file mode 100644
index 0c6ceccaa..000000000
--- a/apps/wr/app/matMng/matDmd/coReg/page.tsx
+++ /dev/null
@@ -1,84 +0,0 @@
-"use client";
-import { useForm } from "react-hook-form";
-import { zodResolver } from "@hookform/resolvers/zod";
-import * as z from "zod";
-import {
- Form,
- FormField,
- FormUi,
- ScrollArea,
- SelectBox,
-} from "@common/business_components/ui";
-import { Button } from "@common/components/ui";
-import { CoRegForm } from "@/components/ui/matDmd/coRegForm/component";
-import toast, { Toaster } from "react-hot-toast";
-import { ToastFormUi } from "@/components/toastFromUi";
-
-const formSchema = z.object({
- ctpv: z.string(),
- sgg: z.string(),
- coNm: z.string().min(1).max(20),
- bznmNo: z.string().min(1).min(9).max(12),
- addr: z.string().min(1).min(6).max(20),
- telNo: z.string().min(8).max(12),
-
-});
-
-export default function MyForm() {
-
-
-
- const form = useForm>({
- resolver: zodResolver(formSchema),
- defaultValues: {
- coNm:'',
- bznmNo:'',
- addr:'',
- telNo:'',
- },
- });
-
- function onSubmit(values: z.infer) {
- try {
- toast.dismiss();
- ToastFormUi("수요신청 화면으로 이동하시겠습니까?", "수요처 등록 완료", "./dmdReg", "이동")
-
- } catch (error) {
- console.error("Form submission error", error);
- toast.error("수요처 등록이 실패하였습니다.");
- }
- }
-
- return (
- <>
-
-
- 수요처 정보입력
-
-
-
-
- >
- );
-}
-
diff --git a/apps/wr/app/matMng/matDmd/dmdReg/page.tsx b/apps/wr/app/matMng/matDmd/dmdReg/page.tsx
deleted file mode 100644
index d405d45a6..000000000
--- a/apps/wr/app/matMng/matDmd/dmdReg/page.tsx
+++ /dev/null
@@ -1,106 +0,0 @@
-"use client";
-import { useForm } from "react-hook-form";
-import { zodResolver } from "@hookform/resolvers/zod";
-import * as z from "zod";
-import { Form } from "@common/business_components/ui";
-import { Button } from "@common/components/ui";
-import { DmdRegForm } from "@/components/ui/matDmd/dmdRegform/component";
-import toast, { Toaster } from "react-hot-toast";
-import { useRouter } from "next/navigation";
-
-const formSchema = z.object({
- dmdSel: z.string().min(1),
- dmdTmng: z.coerce.date(),
- dmdWq: z.string().min(1).optional(),
- useUsgCd: z.string(),
- wntUntprc: z.string().min(1),
- grssClfg: z.string().min(1),
- tn: z.string().min(1).optional(),
- combResdch: z.string().min(1).optional(),
- tp: z.string().min(1).optional(),
- trbt: z.string().min(1).optional(),
- ph: z.string().min(1).optional(),
- bod: z.string().min(1).optional(),
- clIonQnt: z.string().min(1).optional(),
- smll: z.string().min(1).optional(),
- cdtnv: z.string().min(1).optional(),
- crmty: z.string().min(1).optional(),
- rmrk: z.string().min(1).optional(),
- sply1: z.string().min(1).optional(),
- sply2: z.string().min(1).optional(),
- sply3: z.string().min(1).optional(),
- password: z.string().min(1),
-});
-
-export default function MyForm() {
- const form = useForm>({
- resolver: zodResolver(formSchema),
- defaultValues: {
- dmdSel:'',
- dmdTmng: new Date(),
- dmdWq: "",
- useUsgCd: "",
- wntUntprc: "",
- grssClfg: "",
- tn: "",
- combResdch: "",
- tp: "",
- trbt: "",
- ph: "",
- bod: "",
- clIonQnt: "",
- smll: "",
- cdtnv: "",
- crmty: "",
- rmrk: "",
- sply1: "",
- sply2: "",
- sply3: "",
- password: "",
- },
- });
-
- const router = useRouter();
-
- async function onSubmit(values: z.infer) {
- try {
-
- toast.success("✅ 수요신청이 완료되었습니다.");
- await new Promise((resolve) => setTimeout(resolve, 3000));
- router.push("../../")
- } catch (error) {
- toast.error("수요신청을 다시입력해주시길 바랍니다.");
- }
- }
-
- return (
- <>
-
-
- 수요 신청정보입력
-
-
-
-
- >
- );
-}
diff --git a/apps/wr/app/page.tsx b/apps/wr/app/page.tsx
deleted file mode 100644
index 356cfe8c3..000000000
--- a/apps/wr/app/page.tsx
+++ /dev/null
@@ -1,26 +0,0 @@
-import Link from 'next/link';
-import { Button } from '@common/components/ui';
-
-
-
-export default function Home() {
- return (
- <>
-
-
-
-
-
-
-
- >
- );
-}
diff --git a/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/publicReuseFaciltyInsert/page.tsx b/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/publicReuseFaciltyInsert/page.tsx
deleted file mode 100644
index 57c48a84d..000000000
--- a/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/publicReuseFaciltyInsert/page.tsx
+++ /dev/null
@@ -1,52 +0,0 @@
-'use client'
-
-import { ScrollArea, SearchDiv, SelectBox, UiTable } from '@common/business_components';
-import { Button } from '@common/components';
-import { PublicReuseFaciltyFormInsert } from '../../../../components/ui/publicReuseInsertForm';
-import { useWrStore } from '../../../store';
-
-
-
- export default function PublicReuseFaciltyInsert() {
- const {pubFac} = useWrStore((state) => state);
- const { pubFacHeadList, publicReuseFacilityData} = pubFac;
- const searchDiv = '하수재이용시설 '
- const selectBox = [{ text: '서울하수처리시설', val: "1_hasu" }, { text: '서울1하수처리시설', val: "2_hasu" }, { text: '서울2하수처리시설', val: "3_hasu" }]
- const headName = () => {
- return (
- ○공공 하수처리시설 등록
- )
- }
- const onSelectValue = (val: string) => {
- console.log(val)
- }
- return (
- <>
-
-
-
하수재이용시설 등록
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- >
- )
-}
diff --git a/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/rainReuseFaciltyInsert/page.tsx b/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/rainReuseFaciltyInsert/page.tsx
deleted file mode 100644
index c94a93075..000000000
--- a/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/rainReuseFaciltyInsert/page.tsx
+++ /dev/null
@@ -1,67 +0,0 @@
-'use client'
-import { useWrStore } from "@/app/store";
-import type { TableUpperProps } from "@/app/store/rainReuseFacilityInsert"
-import { RainReuseFaciltyInsertForm } from "@/components/ui/rainReuseInsertForm";
-import { ScrollArea, SearchDiv, SearchInput, UiTable } from "@common/business_components";
-import { Button, TableHead, TableRow } from "@common/components";
-
-
-export 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.upName === 'upChangeRe' ? {head.title} : null))}
-
- >)
-}
-
-
-export default function Home() {
- const { rain } = useWrStore((state) => state);
- const nodeList = headMakeColSpan(rain.upHeadList);
-
-
- const headName = () => {
- return (
- ○건축물 목록
- )
- }
- return (
- <>
-
-
-
빗물이용시설 등록
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {nodeList}
-
-
-
-
-
-
-
-
-
- >
- );
-}
diff --git a/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/rswtReuseFacilityInsert/page.tsx b/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/rswtReuseFacilityInsert/page.tsx
deleted file mode 100644
index cecd4177c..000000000
--- a/apps/wr/app/reuseFaciltyManage/reuseFacilityInsert/rswtReuseFacilityInsert/page.tsx
+++ /dev/null
@@ -1,69 +0,0 @@
-'use client'
-import { useWrStore } from "@/app/store";
-import type { TableUpperProps } from "@/app/store/rainReuseFacilityInsert";
-import { RswtrReuseFaciltyInsertForm } from "@/components/ui/rswtrReuseInsetForm";
-import { ScrollArea, SearchDiv, SearchInput, UiTable } from "@common/business_components";
-import { Button, TableHead, TableRow } from "@common/components";
-
-
-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.upName === 'upChangeRe' ? {head.title} : null))}
-
- >)
-}
-
-
-export default function Home() {
- const {rswt} = useWrStore((state) => state);
- const nodeList = headMakeColSpan(rswt.upHeadList);
- const total = 100;
-
-
- const headName = () => {
- return (
- ○건축물 목록
- )
- }
-
- return (
- <>
-
-
-
중수도시설 등록
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- {nodeList}
-
-
-
-
-
-
-
-
-
- >
- );
-}
diff --git a/apps/wr/app/store/index.tsx b/apps/wr/app/store/index.tsx
deleted file mode 100644
index 1b759c30e..000000000
--- a/apps/wr/app/store/index.tsx
+++ /dev/null
@@ -1,41 +0,0 @@
-'use client'
-
-import { type ReactNode, createContext, useContext, useRef } from 'react'
-import { useStore } from 'zustand'
-import { type WrStore, StoreZus } from './store'
-
-
-export type StoreApi = ReturnType
-
-export const StoreContext = createContext(
- undefined,
-)
-
-export interface StoreProviderProps {
- children: ReactNode
-}
-
-export const StoreProvider = ({
- children,
-}: StoreProviderProps) => {
- const storeRef = useRef(null)
- if (!storeRef.current) {
- storeRef.current = StoreZus()
- }
- return (
-
- {children}
-
- )
-}
-
-export const useWrStore = (
- selector: (store: WrStore) => T,
-): T => {
- const storeContext = useContext(StoreContext)
- if (!storeContext) {
- throw new Error(`useStore must be used within StoreProvider`)
- }
-
- return useStore(storeContext, selector)
-}
\ No newline at end of file
diff --git a/apps/wr/app/store/matDmd/index.tsx b/apps/wr/app/store/matDmd/index.tsx
deleted file mode 100644
index 2ed933348..000000000
--- a/apps/wr/app/store/matDmd/index.tsx
+++ /dev/null
@@ -1,55 +0,0 @@
-import type { selectArray } from "../rainReuseFacilityInsert";
-
-
-
-const selectSido = [
- { text: '서울', val: "1" },
- { text: "인천", val: "2" },
- { text: "부산", val: "3" },
- ];
-const selectSgg = [
- { text: '종로구', val: "1" },
- { text: "성북구", val: "2" },
- { text: "강남구", val: "3" },
- ];
- const selectUsg = [
- { text: '민간', val: "1" },
- { text: "공공", val: "2" },
- ];
- const selectYN= [
- { text: 'Y', val: "1" },
- { text: 'N', val: "2" },
- ];
-
-export type matDmdState ={ dmd:{
- isInit: boolean;
- selectSido:selectArray[];
- selectSgg:selectArray[];
- selectUsg:selectArray[];
- selectYN:selectArray[];
-}}
-type matDmdActions = {
- decrementList: () => void
-}
-
-export type matDmdType = matDmdState & matDmdActions;
-
-export const matDmdStateExport:matDmdState= {dmd:{
- isInit:false,
- selectSido:selectSido,
- selectSgg: selectSgg,
- selectUsg: selectUsg,
- selectYN:selectYN,
-
-
-}}
-export const matDmdActionsExport:(set:any)=>matDmdActions=(set: any) => {
- return {
- decrementList:()=>set(
- (state:matDmdState) => {
- return (
- {rain:{
- }})}
- )
- }
-}
diff --git a/apps/wr/app/store/publicReuseFaciltyInsert/index.tsx b/apps/wr/app/store/publicReuseFaciltyInsert/index.tsx
deleted file mode 100644
index 131132b85..000000000
--- a/apps/wr/app/store/publicReuseFaciltyInsert/index.tsx
+++ /dev/null
@@ -1,178 +0,0 @@
-import type { TableUpperProps } from "../rainReuseFacilityInsert";
-
-export type TableProps = {
- id: string;
- title: string;
-}
-
-export type selectLabel={
- text:string,
- val:string
-}
-
-
-type publicReuseFacilityData = {
- sido: string,
- sigungo: string,
- facilityName: string,
- location: string,
- locationgubun: string,
- facilityCapacity: string,
- yn?: string,
- authoDay?: string,
- area?: string,
- reuse?: string,
- register?: string
-
-
-}
-type pubMngFacData = {
- mng: string,
- subCo: string,
- startDay: string,
- endDay: string,
-}
-const selectLabel:selectLabel[]=[
- {text:'test',val:'1'}
-]
-
-
-const pubFacHeadList:TableProps[] = [
- { id: "sido", title: "시도"},
- { id: "sigungo", title: "시군구"},
- { id: "facilityName", title: "시설명"},
- { id: "location", title: "위치"},
- { id: "locationgubun", title: "지역구분"},
- { id: "facilityCapacity", title: "시설용량"},
- { id: "yn", title: '재이용여부' },
- { id: "authoDay", title: '등록여부'}];
-
-
- const pubMngUpHeadList:TableUpperProps[] = [
- { id: "mng", title: "운영방식"},
- { id: "subCo", title: "대행업체"},
- { id: "startDay", title: "시작일", upName:'upChangeRe' , upSequnce:1 },
- { id: "endDay", title: "종료일", upName:'upChangeRe' , upSequnce:2 },
- ];
- const date = new Date()
- const pubMngFacData:pubMngFacData[] = [
- { mng:"자체운영", subCo:"-",startDay: '2024-11-11' ,endDay:'2024-11-20'},
- { mng:"자체운영", subCo:"한국수자원공사",startDay: '2022-11-11' ,endDay:'2024-09-13'},
- { mng:"자체운영", subCo:"스타벅스",startDay: '2023-11-11' ,endDay:'2024-02-19'},
- ];
- const publicReuseFacilityData:publicReuseFacilityData[] = [
- {
- sido: "서울",
- sigungo: "강남구",
- facilityName: "난지",
- location: "경기도 고양시 덕양구 대차로 4가",
- locationgubun: "500",
- facilityCapacity: "800,000",
- reuse: "Y",
- register: "Y"
- },
- {
- sido: "서울",
- sigungo: "강남구",
- facilityName: "난지",
- location: "경기도 고양시 덕양구 대차로 4가",
- locationgubun: "500",
- facilityCapacity: "800,000",
- reuse: "Y",
- register: "Y"
- },
- {
- sido: "서울",
- sigungo: "강남구",
- facilityName: "난지",
- location: "경기도 고양시 덕양구 대차로 4가",
- locationgubun: "500",
- facilityCapacity: "800,000",
- yn: "Y",
- authoDay: "2012",
- area:"123"
- },
-]
-
-
-const erctUswtrCd:selectLabel[]=[
- {text:'처리장연계',val:'1_erct'},
- {text:'자체/연계',val:'2_erct'},
- {text:'자체처리',val:'3_erct'},
-]
-
-const cyclCd :selectLabel[]= [
- { text: "1차", val: "1_cyc" },
- { text: "2차", val: "2_cyc" },
- ];
- const seCd :selectLabel[] = [
- { text: "신규", val: "1_Se" },
- { text: "진행", val: "2_Se" },
- ];
- const buseCd :selectLabel[]= [
- { text: "재정", val: "1_bus" },
- { text: "만루", val: "2_bus" },
- ];
- const rprcsCd :selectLabel[] = [
- { text: "물리적처리", val: "1_rprc" },
- { text: "생물학적처리", val: "2_rprc" },
- ];
- const buseMet :selectLabel[] = [
- { text: "재정", val: "1_busemet" },
- { text: "민간투자", val: "2_busemet" },
- { text: "자체", val: "3_busemet" },
- ];
- const rprcLoCd :selectLabel[] = [
- { text: "내부", val: "1_rprc" },
- { text: "외부", val: "2_rprc" },
- ];
-
-export type pubFacState = {pubFac:{
- isInit: boolean;
- pubFacHeadList: TableProps[];
- pubMngUpHeadList:TableUpperProps[]
- publicReuseFacilityData: publicReuseFacilityData[];
- selectLabel:selectLabel[];
- pubMngFacData:pubMngFacData[];
- erctUswtrCd:selectLabel[];
- cyclCd:selectLabel[];
- seCd:selectLabel[];
- buseCd :selectLabel[]
- rprcsCd :selectLabel[]
- buseMet :selectLabel[]
- rprcLoCd:selectLabel[]
-}}
-type pubFacActions = {
- decrementList: () => void
-}
-
-export type pubFacType = pubFacState & pubFacActions;
-
-export const pubFacStateExport:pubFacState= {pubFac:{
- isInit:false,
- pubFacHeadList: pubFacHeadList,
- pubMngUpHeadList:pubMngUpHeadList,
- publicReuseFacilityData: publicReuseFacilityData,
- selectLabel:selectLabel,
- pubMngFacData:pubMngFacData,
- erctUswtrCd:erctUswtrCd,
- cyclCd:cyclCd,
- seCd:seCd,
- buseCd:buseCd,
- rprcsCd:rprcsCd,
- buseMet:buseMet,
- rprcLoCd:rprcLoCd
-}}
-export const pubFacActionsExport:(set:any)=>pubFacActions=(set: any) => {
- return {
- decrementList:()=>set(
- (state:pubFacState) => {
- return (
- {pubFac:{
- pubFacheadList: state.pubFac.pubFacHeadList,
- publicReuseFacilityUper:
- state.pubFac.publicReuseFacilityData.slice(0, state.pubFac.publicReuseFacilityData.length - 1)
- }})}
- )
- }
-}
diff --git a/apps/wr/app/store/rainReuseFacilityInsert/index.tsx b/apps/wr/app/store/rainReuseFacilityInsert/index.tsx
deleted file mode 100644
index 0fd5194f9..000000000
--- a/apps/wr/app/store/rainReuseFacilityInsert/index.tsx
+++ /dev/null
@@ -1,134 +0,0 @@
-
-export type TableUpperProps = {
- id: string;
- title: string;
- upName?: string;
- upSequnce?: number;
-}
-export type rainFacOfType = {
- sido: string,
- sigungo: string,
- facilityName: string,
- location: string,
- locationgubun: string,
- firstConstructionPermission:string,
- facilityCapacity: string,
- buildingArea:string,
- yn?: string,
- permissionDay:string;
- authoDay?: string,
- area?: string,
- reuse?: string,
- register?: string,
- legalTargetYn:string,
-}
-
-export const upHeadList:TableUpperProps[] = [
- { id: "sido", title: "시도"},
- { id: "sigungo", title: "시군구"},
- { id: "facilityName", title: "시설명"},
- { id: "location", title: "위치"},
- { id: "locationgubun", title: "지역구분"},
- { id: "facilityCapacity", title: "시설용량"},
- { id: "yn", title: '여부', upName:'upChangeRe' , upSequnce:1 },
- { id: "authoDay", title: '허가일',upName:'upChangeRe', upSequnce:2 },
- { id: "area", title: '면적' ,upName:'upChangeRe',upSequnce:3 }];
-
-const rainOfObject:rainFacOfType[] = [
- {
- sido: "서울",
- sigungo: "종로구",
- facilityName: "그랑서울",
- location: "종로 33",
- locationgubun: "업무시설",
- firstConstructionPermission : '2024-10-10',
- buildingArea: "50",
- facilityCapacity: "800,000",
- reuse: "Y",
- permissionDay:'2024-10-10',
- register: "Y",
- legalTargetYn:"Y"
- },
- {
- sido: "서울",
- sigungo: "종로구",
- facilityName: "그랑서울",
- location: "종로 33",
- locationgubun: "업무시설",
- firstConstructionPermission : '2024-10-10',
- buildingArea: "50",
- facilityCapacity: "800,000",
- reuse: "Y",
- permissionDay:'2024-10-10',
- register: "Y",
- legalTargetYn:"Y"
- },
- {
- sido: "서울",
- sigungo: "종로구",
- facilityName: "그랑서울",
- location: "종로 33",
- locationgubun: "업무시설",
- firstConstructionPermission : '2024-10-10',
- buildingArea: "50",
- facilityCapacity: "800,000",
- reuse: "Y",
- permissionDay:'2024-10-10',
- register: "Y",
- legalTargetYn:"Y"
- },
-]
-
-
-export type selectArray ={
- text:string,
- val:string
-
-}
-
-export const selectClass ="w-full h-full text-2xl";
-const selectHomeWater = [
- { text: '집수면', val: "1" },
- { text: "종류", val: "2" },
- ];
-
- const selectYN= [
- { text: 'Y', val: "1" },
- { text: 'N', val: "2" },
- ];
-
-export type rainFacState ={ rain:{
- isInit: boolean;
- upHeadList: TableUpperProps[];
- rainOfObject: rainFacOfType[];
- selectHomeWater:selectArray[];
- selectYN:selectArray[];
-}}
-type rainFacSActions = {
- decrementList: () => void
-}
-
-export type rainFacType = rainFacState & rainFacSActions;
-
-export const rainFacStateExport:rainFacState= {rain:{
- isInit:false,
- upHeadList: upHeadList,
- rainOfObject: rainOfObject,
- selectHomeWater:selectHomeWater,
- selectYN:selectYN
-
-
-}}
-export const rainFacActionsExport:(set:any)=>rainFacSActions=(set: any) => {
- return {
- decrementList:()=>set(
- (state:rainFacState) => {
- return (
- {rain:{
- upHeadList: state.rain.upHeadList,
- rainOfObject:
- state.rain.rainOfObject.slice(0, state.rain.rainOfObject.length - 1)
- }})}
- )
- }
-}
diff --git a/apps/wr/app/store/readme.md b/apps/wr/app/store/readme.md
deleted file mode 100644
index 0710aa69b..000000000
--- a/apps/wr/app/store/readme.md
+++ /dev/null
@@ -1,121 +0,0 @@
-# Zustand store
-## Zustand 등록방법
-**-- index.tsx --**
-### context 등록
-기본적으로 createContext를 통해 react에 context를 생성해서 react에서 사용할 수 있도록 해야함.
-``` js
-//StoreZus는 내부적으로 사용하기 위한 store파일에서 따로 생성함.
-export type StoreApi = ReturnType
-//react에서 사용하기 위한 context 생성.
-export const StoreContext = createContext(
- undefined,
-)
-```
-
-### component로 작성
-등록된 context를 component화 시키기 위한 작업
-```js
-//외부에서 호출시 형태로 호출.
-//app이나 home에서 전체적인 사용이 되도록 작성해야함.
-export const StoreProvider = ({
- children,
-}: StoreProviderProps) => {
- const storeRef = useRef(null)
- if (!storeRef.current) {
- //StoreZus는 store.tsx를 봐야함.
- storeRef.current = StoreZus()
- }
- return (
-
- {children}
-
- )
-}
-```
-
-### store 등록
-react에서 사용하는 store에 현재 context 등록
-```js
-export const useWrStore = (
- selector: (store: WrStore) => T,
-): T => {
- const storeContext = useContext(StoreContext)
- if (!storeContext) {
- throw new Error(`useStore must be used within StoreProvider`)
- }
-
- return useStore(storeContext, selector)
-}
-```
-
-## Zustand 사용방법
-**-- store.tsx, 폴더별 index.tsx --**
-### 기본 store 생성
-index.tsx의 context에 사용되는 StoreZus를 추가하여 사용됨.
-
-외부에서 생성된 state, actions를 사용 가능한 구조
-```js
-import { createStore } from 'zustand/vanilla';
-import { tableActionsExport, tableStateExport, type tableState, type tableType } from './publicReuseFaciltyInsert/index';//외부 파일 위치.
-export type WrStore = tableType;//typescript이므로 사용되는 스크립트를 type1 & type2 형식으로 넣어야함.
-//index.tsx에서 사용하는 store 생성.
-export const StoreZus = (initState: tableState = tableStateExport) => {
- return createStore()((set) => {
- return {
- //아래에서 사용하는 state & actions은 외부 폴더에서 가져다가 사용.
- ...initState,//외부에 있는 기본 초기값 state
- ...tableActionsExport(set)//외부에 있는 actions
- }
- })
-}
-```
-### 외부 스토어 작성 방법
-외부 스토어는 export를 어떻게 할건지만 정하면됨.
-
-사용하는 store.tsx에서 import를 받기만 하면 사용가능.
-#### 타입을 외부로 빼는 방법
-```js
-export type tableState = {
- isInit: boolean;
- upHeadList: TableUpperProps[];
- publicReuseFacilityUper: PublicReuseFacility[];
-}
-type tableActions = {
- decrementList: () => void
-}
-
-export type tableType = tableState & tableActions;
-```
-#### 초기값 state를 외부로 빼는 방법
-```js
-export const tableStateExport:tableState= {
- isInit:false,
- upHeadList: upHeadList,
- publicReuseFacilityUper: publicReuseFacilityUper,
-}
-```
-#### actions를 외부로 빼는 방법
-```js
-//tableActionsExport를 import 받아서 실행하여 return 된 값을 사용
-export const tableActionsExport:(set:any)=>tableActions=
-//set을 통해 react store에 등록
-(set: any) => {
- return {
- //decrementList Object 형태로 전달
- decrementList:
- //set 함수를 실행해서 react store에 등록
- ()=>set(
- // store에 등록되는 함수 구조를 가지고 있음.
- (state:tableState) => {
- //actions 실질적인 로직 작성하는 곳.
- return (
- {
- upHeadList: state.upHeadList,
- publicReuseFacilityUper:
- state.publicReuseFacilityUper.slice(0, state.publicReuseFacilityUper.length - 1)
- })}
- )
- }
-}
-```
-
diff --git a/apps/wr/app/store/rswtrReuseFaciltyInsert/index.tsx b/apps/wr/app/store/rswtrReuseFaciltyInsert/index.tsx
deleted file mode 100644
index b2621631b..000000000
--- a/apps/wr/app/store/rswtrReuseFaciltyInsert/index.tsx
+++ /dev/null
@@ -1,94 +0,0 @@
-import { upHeadList, type rainFacOfType, type selectArray, type TableUpperProps } from "../rainReuseFacilityInsert";
-
-
-const rswtOfObject:rainFacOfType[] = [
- {
- sido: "서울",
- sigungo: "종로구",
- facilityName: "그랑서울",
- location: "종로 33",
- locationgubun: "업무시설",
- firstConstructionPermission : '2024-10-10',
- buildingArea: "50",
- facilityCapacity: "800,000",
- reuse: "Y",
- permissionDay:'2024-10-10',
- register: "Y",
- legalTargetYn:"Y"
- },
- {
- sido: "서울",
- sigungo: "종로구",
- facilityName: "그랑서울",
- location: "종로 33",
- locationgubun: "업무시설",
- firstConstructionPermission : '2024-10-10',
- buildingArea: "50",
- facilityCapacity: "800,000",
- reuse: "Y",
- permissionDay:'2024-10-10',
- register: "Y",
- legalTargetYn:"Y"
- },
- {
- sido: "서울",
- sigungo: "종로구",
- facilityName: "그랑서울",
- location: "종로 33",
- locationgubun: "업무시설",
- firstConstructionPermission : '2024-10-10',
- buildingArea: "50",
- facilityCapacity: "800,000",
- reuse: "Y",
- permissionDay:'2024-10-10',
- register: "Y",
- legalTargetYn:"Y"
- },
-]
-
-
-const selectHomeWater = [
- { text: '집수면', val: "1" },
- { text: "종류", val: "2" },
- ];
-
- const selectYN= [
- { text: 'Y', val: "1" },
- { text: 'N', val: "2" },
- ];
-
-export type rswtFacState ={ rswt:{
- isInit: boolean;
- upHeadList: TableUpperProps[];
- rswtOfObject: rainFacOfType[];
- selectHomeWater:selectArray[];
- selectYN:selectArray[];
-}}
-type rswtFacSActions = {
- decrementList: () => void
-}
-
-export type rswtFacType = rswtFacState & rswtFacSActions;
-
-export const rswtFacStateExport:rswtFacState= {rswt:{
- isInit:false,
- upHeadList: upHeadList,
- rswtOfObject: rswtOfObject,
- selectHomeWater:selectHomeWater,
- selectYN:selectYN
-
-
-}}
-export const rswtFacActionsExport:(set:any)=>rswtFacSActions=(set: any) => {
- return {
- decrementList:()=>set(
- (state:rswtFacState) => {
- return (
- {rain:{
- upHeadList: state.rswt.upHeadList,
- rainOfObject:
- state.rswt.rswtOfObject.slice(0, state.rswt.rswtOfObject.length - 1)
- }})}
- )
- }
-}
diff --git a/apps/wr/app/store/store.tsx b/apps/wr/app/store/store.tsx
deleted file mode 100644
index 68ca9db7e..000000000
--- a/apps/wr/app/store/store.tsx
+++ /dev/null
@@ -1,25 +0,0 @@
-import { createStore } from 'zustand/vanilla';
-import { pubFacActionsExport, pubFacStateExport, type pubFacState } from './publicReuseFaciltyInsert/index';
-import { rainFacActionsExport, rainFacStateExport, type rainFacState, type rainFacType } from './rainReuseFacilityInsert';
-import { rswtFacActionsExport, rswtFacStateExport, type rswtFacState, type rswtFacType } from './rswtrReuseFaciltyInsert';
-import { matDmdActionsExport, matDmdStateExport, type matDmdState, type matDmdType } from './matDmd';
-
-
-export type WrStore = pubFacState & rainFacType &rswtFacType &matDmdType;
-export const StoreZus = (initState: rainFacState& pubFacState & rswtFacState &matDmdState= {
- ...pubFacStateExport,
- ...rainFacStateExport,
- ...rswtFacStateExport ,
- ...matDmdStateExport
-}) => {
- return createStore()((set) => {
- return {
- ...initState,
- ...pubFacActionsExport(set),
- ...rainFacActionsExport(set),
- ...rswtFacActionsExport(set),
- ...matDmdActionsExport(set)
- }
- })
-}
-//store 등록하는 부분
\ No newline at end of file
diff --git a/apps/wr/app/style/PublicReuseFaciltyInsert.module.css b/apps/wr/app/style/PublicReuseFaciltyInsert.module.css
deleted file mode 100644
index 6fc6f75ee..000000000
--- a/apps/wr/app/style/PublicReuseFaciltyInsert.module.css
+++ /dev/null
@@ -1,9 +0,0 @@
-.formInsideTitle{
- background-color: gray;
- text-align: center;
-}
-
-
-
-.smallTitle{
-}
\ No newline at end of file
diff --git a/apps/wr/components.json b/apps/wr/components.json
deleted file mode 100644
index d9ef0ae53..000000000
--- a/apps/wr/components.json
+++ /dev/null
@@ -1,21 +0,0 @@
-{
- "$schema": "https://ui.shadcn.com/schema.json",
- "style": "default",
- "rsc": true,
- "tsx": true,
- "tailwind": {
- "config": "tailwind.config.ts",
- "css": "app/globals.css",
- "baseColor": "neutral",
- "cssVariables": true,
- "prefix": ""
- },
- "aliases": {
- "components": "@/components",
- "utils": "@/lib/utils",
- "ui": "@/components/ui",
- "lib": "@/lib",
- "hooks": "@/hooks"
- },
- "iconLibrary": "lucide"
-}
\ No newline at end of file
diff --git a/apps/wr/components/toastFromUi.tsx b/apps/wr/components/toastFromUi.tsx
deleted file mode 100644
index 5270ca5ec..000000000
--- a/apps/wr/components/toastFromUi.tsx
+++ /dev/null
@@ -1,56 +0,0 @@
-
-import { Button } from "@common/components/ui";
-import Link from "next/link";
-import { useRouter } from "next/router";
-import toast from "react-hot-toast";
-
-
-
-export function ToastFormUi(body:string,title:string,url:string,buttonName:string){
-
- //const router = useRouter();
-
- return(
-
- toast.custom((t) => (
-
-
-
-
-
-
-
-
-
- {title}
-
-
- {body}
-
-
-
-
-
-
-
-
-
-
-
- ))
- )
-}
\ No newline at end of file
diff --git a/apps/wr/components/ui/IteratreForm.tsx b/apps/wr/components/ui/IteratreForm.tsx
deleted file mode 100644
index 9d35d865e..000000000
--- a/apps/wr/components/ui/IteratreForm.tsx
+++ /dev/null
@@ -1,54 +0,0 @@
-import { FileUpload, FormControl, FormField, FormItem, FormLabel, FormMessage, SelectBox } from "@common/business_components";
-import { DatePicker } from "@common/components";
-import { Input } from "@common/components";
-
-
-export type typeOfForm ={
- labelName: string;
- type: string;
- placeholder:any;
- formName: string;
- selectValue:selectValue|undefined;
-}
-type onSelectValue = (val:string) => void;
-export type selectValue ={
- label:string,
- value:{ text: string; val: string }[],
- fun:onSelectValue
-}
-
-
-export function IteraterFrom(formData:typeOfForm[],form:any , formClass:string ){
-
- const formItem =(data:typeOfForm,field:any)=>{
- let tag
- if(data.type==='select'){
- tag= (data.selectValue ? {...form} : null)
- }else if(data.type==='date'){
- tag =()
- }else{
- tag=()
- }
- return tag;
- }
-
- return (
- <>
- {formData.map((data: typeOfForm, index) => (
- (
-
- {data.labelName}
-
- {formItem(data,field)}
-
-
-
- )}
- />
- ))}
- >
- );
- };
\ No newline at end of file
diff --git a/apps/wr/components/ui/matDmd/coRegForm/component.tsx b/apps/wr/components/ui/matDmd/coRegForm/component.tsx
deleted file mode 100644
index f27639251..000000000
--- a/apps/wr/components/ui/matDmd/coRegForm/component.tsx
+++ /dev/null
@@ -1,91 +0,0 @@
-import { useWrStore } from "@/app/store";
-import { selectClass } from "@/app/store/rainReuseFacilityInsert";
-import { DatePicker, FormField, FormItem, FormLabel, FormUi, SelectBox } from "@common/business_components";
-import { Button, Input } from "@common/components";
-import { useState } from "react";
-
-export function CoRegForm(form:any){
-
- const { dmd } = useWrStore((state) => state);
-
- return(
-
- <>
- (
-
-
-
-
- )}
- />
-
- (
-
-
-
-
- )}
- />
-
- (
-
-
-
- )}
- />
-
- (
-
-
-
- )}
- />
-
- (
-
-
-
- )}
- />
-
- (
-
-
-
-
- )}
- />
-
-
- >
- )
-}
\ No newline at end of file
diff --git a/apps/wr/components/ui/matDmd/dmdRegform/component.tsx b/apps/wr/components/ui/matDmd/dmdRegform/component.tsx
deleted file mode 100644
index 4e6bf0a38..000000000
--- a/apps/wr/components/ui/matDmd/dmdRegform/component.tsx
+++ /dev/null
@@ -1,316 +0,0 @@
-import { useWrStore } from "@/app/store";
-import { selectClass } from "@/app/store/rainReuseFacilityInsert";
-import { DatePicker, FormField, FormItem, FormLabel, FormUi, SelectBox } from "@common/business_components";
-import { Button, Input } from "@common/components";
-import { useState } from "react";
-
-export function DmdRegForm(form: any) {
- const { dmd } = useWrStore((state) => state);
-
- const [dmdDate, setDmdDate] = useState(new Date())
-
-
- const onChangeDate = (val: Date|undefined) => {
- if(val)setDmdDate(val)
- }
-
- return (
- <>
- (
-
-
-
- )}
- />
-
- (
-
- 요구시기
-
-
- )}
- />
-
- (
-
-
-
-
- )}
- />
-
- (
-
-
-
-
- )}
- />
-
- (
-
-
-
-
- )}
- />
-
-
-
- 요구수질
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 공급후보지 선택
-
-
-
-
-
-
-
-
-
-
-
-
- 수요신청 비밀번호
-
-
-
- (
-
-
-
- )}
- />
-
-
- >
- );
-}
diff --git a/apps/wr/components/ui/publicReuseInsertForm.tsx b/apps/wr/components/ui/publicReuseInsertForm.tsx
deleted file mode 100644
index a521e8a59..000000000
--- a/apps/wr/components/ui/publicReuseInsertForm.tsx
+++ /dev/null
@@ -1,497 +0,0 @@
-"use client";
-
-import { SelectBox } from "@common/business_components";
-import { DatePicker, FileUpload, FormUi, UiTable } from "@common/business_components/ui";
-import { Form, FormField } from "@common/business_components/ui/form";
-import { Button, Input, TableHead, TableRow } 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 { selectClass, type TableUpperProps } from "@/app/store/rainReuseFacilityInsert";
-
-const formSchema = z.object({
- username: z.string().min(2).max(50),
- facilityName: z.string().min(2).max(50),
-});
-
-
- 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.upName === 'upChangeRe' ? {head.title} : null))}
-
- >)
-}
-export function PublicReuseFaciltyFormInsert() {
- const { pubFac } = useWrStore((state) => state);
- const { pubMngUpHeadList, pubMngFacData,erctUswtrCd,cyclCd,seCd,buseCd,rprcsCd,buseMet,rprcLoCd} = pubFac;
-const nodeList = headMakeColSpan(pubMngUpHeadList);
-
-
- const form = useForm>({
- resolver: zodResolver(formSchema),
- defaultValues: {
- username: "",
- },
- });
-
- // 2. Define a submit handler.
- function onSubmit(values: z.infer) {
- // Do something with the form values.
- // ✅ This will be type-safe and validated.
- console.log(values);
- }
- const onSelectValue=(val:string)=>{
- console.log(val)
-
-}
-
- const [instlAprvDate, setInstlAprvDate] = useState(new Date())
- const [bizCmcnDate, setBizCmcnDate] = useState(new Date())
- const [files, setFiles] = useState(null);
-
- return (
-
-
- {/* 차수별 등록 현황 폼 */}
-
-
- );
-}
diff --git a/apps/wr/components/ui/rainReuseInsertForm.tsx b/apps/wr/components/ui/rainReuseInsertForm.tsx
deleted file mode 100644
index 57e30c551..000000000
--- a/apps/wr/components/ui/rainReuseInsertForm.tsx
+++ /dev/null
@@ -1,240 +0,0 @@
-"use client";
-
-import {
- Form,
- FormField,
- SelectBox,
-} from "@common/business_components/ui";
-import { Input } from "@common/components/ui";
-import { zodResolver } from "@hookform/resolvers/zod";
-import { useForm } from "react-hook-form";
-import { z } from "zod";
-import { FormUi } from "@common/business_components";
-import { useWrStore } from "@/app/store";
-import { selectClass } from "@/app/store/rainReuseFacilityInsert";
-
-const formSchema = z.object({
- username: z.string().min(2).max(50),
- facilityName: z.string().min(2).max(50),
-});
-
-
-export function RainReuseFaciltyInsertForm() {
- const { rain } = useWrStore((state) => state);
-
- const form = useForm>({
- resolver: zodResolver(formSchema),
- defaultValues: {
- username: "",
- },
- });
-
- // 2. Define a submit handler.
- function onSubmit(values: z.infer) {
- // Do something with the form values.
- // ✅ This will be type-safe and validated.
- console.log(values);
- }
-
- const onSelectValue=(val:string)=>{
- console.log(val)
-
- }
- return (
-