diff --git a/apps/wr/components/ui/IteratreForm.tsx b/apps/wr/components/ui/IteratreForm.tsx index 96b9e2593..410923547 100644 --- a/apps/wr/components/ui/IteratreForm.tsx +++ b/apps/wr/components/ui/IteratreForm.tsx @@ -10,7 +10,11 @@ type typeOfForm ={ formName: string; } -export function IteraterFrom(formData:typeOfForm[],form:any , colSpanValue:string){ +type onSelectValue = (val:string) => void; + + + +export function IteraterFrom(formData:typeOfForm[],form:any , formClass:string , onSelectValue:onSelectValue ){ return ( <> @@ -19,13 +23,13 @@ export function IteraterFrom(formData:typeOfForm[],form:any , colSpanValue:strin control={form.control} name={data.formName} render={({ field }) => ( - + {data.labelName} {data.selectvlaue == undefined ? ( ) : ( - + )} diff --git a/apps/wr/components/ui/publicReuseInsertForm.tsx b/apps/wr/components/ui/publicReuseInsertForm.tsx index bf4405ab6..1625acb4d 100644 --- a/apps/wr/components/ui/publicReuseInsertForm.tsx +++ b/apps/wr/components/ui/publicReuseInsertForm.tsx @@ -23,7 +23,8 @@ type typeOfForm = { selectvlaue?: { text: string; val: string }[]; } export function PublicReuseFaciltyFormInsert() { - const { upHeadList, publicReuseFacilityUper } = useWrStore((state) => state); + const { pubFac } = useWrStore((state) => state); + const { pubFacHeadList, publicReuseFacilityData} = pubFac; const total = 100; const form = useForm>({ @@ -137,8 +138,8 @@ export function PublicReuseFaciltyFormInsert() {
( - + )} @@ -260,7 +263,9 @@ export function PublicReuseFaciltyFormInsert() { render={({ field }) => ( 구분 - + )} /> @@ -273,7 +278,9 @@ export function PublicReuseFaciltyFormInsert() { render={({ field }) => ( 사업방식 - + )} /> @@ -477,7 +484,9 @@ export function PublicReuseFaciltyFormInsert() { 재처리방식 - + diff --git a/apps/wr/components/ui/rainReuseInsertForm.tsx b/apps/wr/components/ui/rainReuseInsertForm.tsx index d095ef171..8a95d07e5 100644 --- a/apps/wr/components/ui/rainReuseInsertForm.tsx +++ b/apps/wr/components/ui/rainReuseInsertForm.tsx @@ -152,7 +152,10 @@ export function RainReuseFaciltyInsertForm() { }, ]; + const onSelectValue=(val:string)=>{ + console.log(val) + } return (
@@ -204,12 +207,12 @@ export function RainReuseFaciltyInsertForm() {

✓ 1. 집수면

-
{IteraterFrom(homeWaterData,form,'2')}
+
{IteraterFrom(homeWaterData,form,'2',onSelectValue)}

✓ 2. 여과 등 처리시설

-
{IteraterFrom(filtrTrtmfct,form,'2' )}
+
{IteraterFrom(filtrTrtmfct,form,'2' ,onSelectValue)}

인센티브 정보 @@ -218,12 +221,12 @@ export function RainReuseFaciltyInsertForm() {

✓ 1. 설치비 지원

-
{IteraterFrom(instlCst,form,'2' )}
+
{IteraterFrom(instlCst,form,'2' ,onSelectValue)}

✓ 2. 녹색건축물 인증

-
{IteraterFrom(greenBuilding,form,'2')}
+
{IteraterFrom(greenBuilding,form,'2',onSelectValue)}