From e2ae39c73c081c4db98a4f71847eef7e8c58df56 Mon Sep 17 00:00:00 2001 From: leedj312 Date: Tue, 11 Mar 2025 17:21:23 +0900 Subject: [PATCH] =?UTF-8?q?formStore=20=EC=9E=91=EC=97=85=EC=99=84?= =?UTF-8?q?=EB=A3=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/wr/app/store/matDmd/index.tsx | 55 ++++++++++++++++++++++++++++++ apps/wr/app/store/store.tsx | 11 +++--- 2 files changed, 62 insertions(+), 4 deletions(-) create mode 100644 apps/wr/app/store/matDmd/index.tsx diff --git a/apps/wr/app/store/matDmd/index.tsx b/apps/wr/app/store/matDmd/index.tsx new file mode 100644 index 000000000..b1a27df1d --- /dev/null +++ b/apps/wr/app/store/matDmd/index.tsx @@ -0,0 +1,55 @@ +import type { selectArray } from "../rainReuseFacilityInsert"; + + + +const selectSido = [ + { text: '서울', val: "1" }, + { text: "인천", val: "2" }, + { text: "부산", val: "2" }, + ]; +const selectSgg = [ + { text: '종로구', val: "1" }, + { text: "성북구", val: "2" }, + { text: "강남구", val: "2" }, + ]; + 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/store.tsx b/apps/wr/app/store/store.tsx index 4d179e58d..68ca9db7e 100644 --- a/apps/wr/app/store/store.tsx +++ b/apps/wr/app/store/store.tsx @@ -2,20 +2,23 @@ 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; -export const StoreZus = (initState: rainFacState& pubFacState & rswtFacState= { +export type WrStore = pubFacState & rainFacType &rswtFacType &matDmdType; +export const StoreZus = (initState: rainFacState& pubFacState & rswtFacState &matDmdState= { ...pubFacStateExport, ...rainFacStateExport, - ...rswtFacStateExport + ...rswtFacStateExport , + ...matDmdStateExport }) => { return createStore()((set) => { return { ...initState, ...pubFacActionsExport(set), ...rainFacActionsExport(set), - ...rswtFacActionsExport + ...rswtFacActionsExport(set), + ...matDmdActionsExport(set) } }) }