Merge branch 'iipbs/wr/form_fuction' into iipbs/wr/dev
This commit is contained in:
+19
-18
@@ -1,26 +1,27 @@
|
||||
import Link from 'next/link';
|
||||
import { Button } from '@common/components/ui';
|
||||
|
||||
|
||||
import Link from "next/link";
|
||||
import { Button } from "@common/components/ui";
|
||||
|
||||
export default function Home() {
|
||||
return (
|
||||
<>
|
||||
<div className='flex'>
|
||||
<Button className='place-self-auto'>
|
||||
<Link href="ruseFcltMng/fcltReg/pbnstReg"> 하수재이용 시설 등록</Link>
|
||||
</Button>
|
||||
<Button className='place-self-auto'>
|
||||
<Link href="ruseFcltMng/fcltReg/rainReg"> 빗물재이용 시설 등록</Link>
|
||||
</Button>
|
||||
<Button className='place-self-auto'>
|
||||
<Link href="ruseFcltMng/fcltReg/rswtReg"> 중수도시설 등록</Link>
|
||||
</Button>
|
||||
<div className="flex">
|
||||
<Button className="place-self-auto">
|
||||
<Link href="ruseFcltMng/fcltReg/pbnstReg"> 하수재이용 시설 등록</Link>
|
||||
</Button>
|
||||
<Button className="place-self-auto">
|
||||
<Link href="ruseFcltMng/fcltReg/rainReg"> 빗물재이용 시설 등록</Link>
|
||||
</Button>
|
||||
<Button className="place-self-auto">
|
||||
<Link href="ruseFcltMng/fcltReg/rswtReg"> 중수도시설 등록</Link>
|
||||
</Button>
|
||||
|
||||
<Button className='place-self-auto'>
|
||||
<Link href="matMng/matDmd/coReg">수요처 등록</Link>
|
||||
</Button>
|
||||
<Button className="place-self-auto">
|
||||
<Link href="matMng/matDmd/coReg">수요처 등록</Link>
|
||||
</Button>
|
||||
<Button className="place-self-auto">
|
||||
<Link href="ruseFcltMng/fcltReg/htdflReg">온배수 등록</Link>
|
||||
</Button>
|
||||
</div>
|
||||
</>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,64 @@
|
||||
"use client";
|
||||
|
||||
import { useWrStore } from "@/app/store";
|
||||
import {
|
||||
ScrollArea,
|
||||
SearchDiv,
|
||||
SearchInput,
|
||||
UiTable,
|
||||
} from "@common/business_components";
|
||||
import { Button } from "@common/components";
|
||||
import { headMakeColSpan } from "../rainReg/page";
|
||||
import { HtdflRegForm } from "@/components/ui/form/fcltReg/htdflReg/component";
|
||||
|
||||
export default function Home() {
|
||||
const { htdfl } = useWrStore((state) => state);
|
||||
const nodeList = headMakeColSpan(htdfl.upHeadList);
|
||||
|
||||
const headName = () => {
|
||||
return (
|
||||
<>
|
||||
<h1 className="pl-3 text-xl">○건축물 목록</h1>
|
||||
</>
|
||||
);
|
||||
};
|
||||
|
||||
return (
|
||||
<>
|
||||
<div className="grid grid-cols-2 gap-4 ">
|
||||
<div className="col-span-2">
|
||||
<h1 className="pl-3 text-2xl">온배수시설 등록 </h1>
|
||||
<div className="m-8">
|
||||
<SearchDiv>
|
||||
<div className="w-4/5 grid grid-cols-12 gap-1 mx-4">
|
||||
<SearchInput className="col-span-3 my-7" label="건물명" />
|
||||
</div>
|
||||
<div className="w-1/5 flex items-center justify-end">
|
||||
<Button className="mr-4 rounded-lg">조회</Button>
|
||||
<Button className="mr-4 rounded-lg">저장</Button>
|
||||
<Button className="mr-4 rounded-lg">신규등록</Button>
|
||||
</div>
|
||||
</SearchDiv>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="colsapn-1 pl-11">
|
||||
<UiTable
|
||||
tableData={htdfl.htdflOfObject}
|
||||
headlist={htdfl.upHeadList}
|
||||
pageSize={100}
|
||||
total={10}
|
||||
headName={headName()}
|
||||
>
|
||||
{nodeList}
|
||||
</UiTable>
|
||||
</div>
|
||||
<div className="colsapn-1 pr-11 max-h-full ovreflow-y-scroll">
|
||||
<ScrollArea>
|
||||
<HtdflRegForm></HtdflRegForm>
|
||||
</ScrollArea>
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -1,52 +1,90 @@
|
||||
'use client'
|
||||
"use client";
|
||||
|
||||
import { ScrollArea, SearchDiv, SelectBox, UiTable } from '@common/business_components';
|
||||
import { Button } from '@common/components';
|
||||
import { useWrStore } from '../../../store';
|
||||
import { PbnstRegForm } from '@/components/ui/form/fcltReg/pbnstReg/component';
|
||||
import {
|
||||
ScrollArea,
|
||||
SearchDiv,
|
||||
SelectBox,
|
||||
UiTable,
|
||||
} from "@common/business_components";
|
||||
import { Button } from "@common/components";
|
||||
import { useWrStore } from "../../../store";
|
||||
import { PbnstBuseForm } from "@/components/ui/form/fcltReg/pbnstReg/buseReg/component";
|
||||
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@common/components";
|
||||
import { PbnstMngForm} from "@/components/ui/form/fcltReg/pbnstReg/mngReg/component";
|
||||
|
||||
|
||||
|
||||
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" }]
|
||||
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 (
|
||||
<h1 className="pl-3 text-xl">○공공 하수처리시설 등록</h1>
|
||||
)
|
||||
}
|
||||
return <h1 className="pl-3 text-xl">○공공 하수처리시설 등록</h1>;
|
||||
};
|
||||
const onSelectValue = (val: string) => {
|
||||
console.log(val)
|
||||
}
|
||||
console.log(val);
|
||||
};
|
||||
return (
|
||||
<>
|
||||
<div className="grid grid-cols-2 gap-4 h-full">
|
||||
<div className='col-span-4'>
|
||||
<h1 className="pl-3 text-xl" > 하수재이용시설 등록</h1>
|
||||
<div className="col-span-4 ">
|
||||
<h1 className="pl-3 text-xl"> 하수재이용시설 등록</h1>
|
||||
<div className="m-8">
|
||||
<SearchDiv>
|
||||
<div className='w-4/5 grid grid-cols-12 gap-1 mx-4'>
|
||||
<SelectBox className='col-span-4' label={searchDiv} selectArray={selectBox} onSelectValue={onSelectValue} />
|
||||
<div className="w-4/5 grid grid-cols-12 gap-1 mx-4">
|
||||
<SelectBox
|
||||
className="col-span-4"
|
||||
label={searchDiv}
|
||||
selectArray={selectBox}
|
||||
onSelectValue={onSelectValue}
|
||||
selectClass={undefined}
|
||||
/>
|
||||
</div>
|
||||
<div className='w-1/5 flex items-center justify-end'>
|
||||
<Button className='mr-4 rounded-lg'>조회</Button>
|
||||
<Button className='mr-4 rounded-lg'>신규추가</Button>
|
||||
<div className="w-1/5 flex items-center justify-end">
|
||||
<Button className="mr-16 rounded-lg">조회</Button>
|
||||
</div>
|
||||
</SearchDiv>
|
||||
</div>
|
||||
</div>
|
||||
<div className="col-span-1 pl-11">
|
||||
<UiTable tableData={publicReuseFacilityData} headlist={pubFacHeadList} pageSize={100} total={10} headName={headName()} children={undefined}/>
|
||||
<div className="col-span-1 pl-11 max-h-full">
|
||||
<UiTable
|
||||
tableData={publicReuseFacilityData}
|
||||
headlist={pubFacHeadList}
|
||||
pageSize={100}
|
||||
total={10}
|
||||
headName={headName()}
|
||||
children={undefined}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-1 pr-6 max-h-full overflow-y-scroll">
|
||||
<ScrollArea>
|
||||
<PbnstRegForm />
|
||||
{/* <ScrollBar orientation="vertical"></ScrollBar> */}
|
||||
</ScrollArea>
|
||||
<div className="col-span-1 pr-6 max-h-full overflow-y-scroll">
|
||||
|
||||
|
||||
|
||||
<Tabs defaultValue="mng">
|
||||
<TabsList>
|
||||
<TabsTrigger value="mng">운영정보</TabsTrigger>
|
||||
<TabsTrigger value="buse">시설현황</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent className="max-h-full" value="mng">
|
||||
<ScrollArea>
|
||||
<PbnstMngForm />
|
||||
</ScrollArea>
|
||||
</TabsContent>
|
||||
<TabsContent value="buse">
|
||||
<ScrollArea>
|
||||
<PbnstBuseForm />
|
||||
</ScrollArea>
|
||||
|
||||
</TabsContent>
|
||||
</Tabs>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</>
|
||||
)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
@@ -0,0 +1,89 @@
|
||||
import {
|
||||
upHeadList,
|
||||
type rainFacOfType,
|
||||
type TableUpperProps,
|
||||
} from "../rainReg";
|
||||
|
||||
const htdflOfObject: 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 htdflFacState = {
|
||||
htdfl: {
|
||||
isInit: boolean;
|
||||
upHeadList: TableUpperProps[];
|
||||
htdflOfObject: rainFacOfType[];
|
||||
};
|
||||
};
|
||||
type htdflFacSActions = {
|
||||
decrementList: () => void;
|
||||
};
|
||||
|
||||
export type htdflFacType = htdflFacState & htdflFacSActions;
|
||||
|
||||
export const htdflFacStateExport: htdflFacState = {
|
||||
htdfl: {
|
||||
isInit: false,
|
||||
upHeadList: upHeadList,
|
||||
htdflOfObject: htdflOfObject,
|
||||
},
|
||||
};
|
||||
export const htdflFacActionsExport: (set: any) => htdflFacSActions = (
|
||||
set: any
|
||||
) => {
|
||||
return {
|
||||
decrementList: () =>
|
||||
set((state: htdflFacState) => {
|
||||
return {
|
||||
htdfl: {
|
||||
upHeadList: state.htdfl.upHeadList,
|
||||
rainOfObject: state.htdfl.htdflOfObject.slice(
|
||||
0,
|
||||
state.htdfl.htdflOfObject.length - 1
|
||||
),
|
||||
},
|
||||
};
|
||||
}),
|
||||
};
|
||||
};
|
||||
+54
-18
@@ -1,25 +1,61 @@
|
||||
import { createStore } from 'zustand/vanilla';
|
||||
import { pubFacActionsExport, pubFacStateExport, type pubFacState } from './ruseFcltMng/fcltReg/pbnstReg';
|
||||
import { rainFacActionsExport, rainFacStateExport, type rainFacState, type rainFacType } from './ruseFcltMng/fcltReg/rainReg';
|
||||
import { rswtFacActionsExport, rswtFacStateExport, type rswtFacState, type rswtFacType } from './ruseFcltMng/fcltReg/rswtReg';
|
||||
import { matDmdActionsExport, matDmdStateExport, type matDmdState, type matDmdType } from './matDmd';
|
||||
import { createStore } from "zustand/vanilla";
|
||||
import {
|
||||
pubFacActionsExport,
|
||||
pubFacStateExport,
|
||||
type pubFacState,
|
||||
} from "./ruseFcltMng/fcltReg/pbnstReg";
|
||||
import {
|
||||
rainFacActionsExport,
|
||||
rainFacStateExport,
|
||||
type rainFacState,
|
||||
type rainFacType,
|
||||
} from "./ruseFcltMng/fcltReg/rainReg";
|
||||
import {
|
||||
rswtFacActionsExport,
|
||||
rswtFacStateExport,
|
||||
type rswtFacState,
|
||||
type rswtFacType,
|
||||
} from "./ruseFcltMng/fcltReg/rswtReg";
|
||||
import {
|
||||
matDmdActionsExport,
|
||||
matDmdStateExport,
|
||||
type matDmdState,
|
||||
type matDmdType,
|
||||
} from "./matDmd";
|
||||
import {
|
||||
htdflFacActionsExport,
|
||||
htdflFacStateExport,
|
||||
type htdflFacState,
|
||||
type htdflFacType,
|
||||
} from "./ruseFcltMng/fcltReg/htdflReg";
|
||||
|
||||
|
||||
export type WrStore = pubFacState & rainFacType &rswtFacType &matDmdType;
|
||||
export const StoreZus = (initState: rainFacState& pubFacState & rswtFacState &matDmdState= {
|
||||
...pubFacStateExport,
|
||||
...rainFacStateExport,
|
||||
...rswtFacStateExport ,
|
||||
...matDmdStateExport
|
||||
}) => {
|
||||
export type WrStore = pubFacState &
|
||||
rainFacType &
|
||||
rswtFacType &
|
||||
matDmdType &
|
||||
htdflFacType;
|
||||
export const StoreZus = (
|
||||
initState: rainFacState &
|
||||
pubFacState &
|
||||
rswtFacState &
|
||||
matDmdState &
|
||||
htdflFacState = {
|
||||
...pubFacStateExport,
|
||||
...rainFacStateExport,
|
||||
...rswtFacStateExport,
|
||||
...matDmdStateExport,
|
||||
...htdflFacStateExport,
|
||||
}
|
||||
) => {
|
||||
return createStore<WrStore>()((set) => {
|
||||
return {
|
||||
...initState,
|
||||
...pubFacActionsExport(set),
|
||||
...rainFacActionsExport(set),
|
||||
...rswtFacActionsExport(set),
|
||||
...matDmdActionsExport(set)
|
||||
}
|
||||
})
|
||||
}
|
||||
//store 등록하는 부분
|
||||
...matDmdActionsExport(set),
|
||||
...htdflFacActionsExport(set),
|
||||
};
|
||||
});
|
||||
};
|
||||
//store 등록하는 부분
|
||||
|
||||
@@ -0,0 +1,469 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
Form,
|
||||
FormField,
|
||||
FormUi,
|
||||
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 { useWrStore } from "@/app/store";
|
||||
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
|
||||
const formSchema = z.object({
|
||||
etgtType: z.string().min(2).max(50),
|
||||
fclCpct: z.string(),
|
||||
plwtYn: z.string(),
|
||||
orgwtwtritspt: z.string(),
|
||||
orgwtocrnprocs: z.string(),
|
||||
wtritentrctp: z.string(),
|
||||
amtgnr: z.string(),
|
||||
prcsfcltcpct: z.string(),
|
||||
utztnqnt: z.string(),
|
||||
utztnusgcd: 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(),
|
||||
emsnexittp: z.string(),
|
||||
});
|
||||
|
||||
export function HtdflRegForm() {
|
||||
const { rswt } = useWrStore((state) => state);
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
etgtType: "",
|
||||
fclCpct: "",
|
||||
plwtYn: "",
|
||||
orgwtwtritspt: "",
|
||||
orgwtocrnprocs: "",
|
||||
wtritentrctp: "",
|
||||
amtgnr: "",
|
||||
prcsfcltcpct: "",
|
||||
utztnqnt: "",
|
||||
utztnusgcd: "",
|
||||
wntUntprc: "",
|
||||
grssClfg: "",
|
||||
tn: "",
|
||||
combResdch: "",
|
||||
tp: "",
|
||||
trbt: "",
|
||||
ph: "",
|
||||
bod: "",
|
||||
clIonQnt: "",
|
||||
smll: "",
|
||||
cdtnv: "",
|
||||
crmty: "",
|
||||
emsnexittp: "",
|
||||
},
|
||||
});
|
||||
|
||||
// 2. Define a submit handler.
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
// Do something with the form values.
|
||||
// ✅ This will be type-safe and validated.
|
||||
console.log(values);
|
||||
}
|
||||
|
||||
const onSelectValue = (val: string) => {
|
||||
console.log(val);
|
||||
};
|
||||
return (
|
||||
<div className="">
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)}>
|
||||
{/* <div className="flex justify-between items-center mx-3"> */}
|
||||
<div>
|
||||
<div>
|
||||
<h1 className="pl-3 text-xl ">○온배수 시설 정보</h1>
|
||||
</div>
|
||||
</div>
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 ">
|
||||
시설현황
|
||||
</h1>
|
||||
<div className="grid grid-cols-6 gap-2 mt-4 pl-6">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="etgtType"
|
||||
render={({ field }) => (
|
||||
<FormUi label="발전유형">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="fclCpct"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설비용량">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="plwtYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="담수화 여부">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className=" my-4">
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 pl-6">
|
||||
온배수 시설 운영현황
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-10 gap-1 mt-4">
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="orgwtwtritspt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="원수취수 지점">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="orgwtocrnprocs"
|
||||
render={({ field }) => (
|
||||
<FormUi label="원수발생 공정">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="wtritentrctp"
|
||||
render={({ field }) => (
|
||||
<FormUi label="취수구 온도">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="wtritentrctp"
|
||||
render={({ field }) => (
|
||||
<FormUi label="발생량(m³/년)">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="amtgnr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="처리공정">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="prcsfcltcpct"
|
||||
render={({ field }) => (
|
||||
<FormUi label="처리시설 용량(m³/년)">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="fmyn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="유량계유무">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="utztnqnt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="이용량(m³/년)">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="utztnusgcd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="이용용도">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className=" my-2">
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 ">
|
||||
요구수질
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4 pl-6">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grssClfg"
|
||||
render={({ field }) => (
|
||||
<FormUi label="총대장균군">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="tn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="총질소">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4 pl-6">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="combResdch"
|
||||
render={({ field }) => (
|
||||
<FormUi label="결합잔류염소">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-6 ">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="tp"
|
||||
render={({ field }) => (
|
||||
<FormUi label="총인">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4 pl-6">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="trbt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="탁도">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="ph"
|
||||
render={({ field }) => (
|
||||
<FormUi label="수소이온농도">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4 pl-6">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="bod"
|
||||
render={({ field }) => (
|
||||
<FormUi label="생물학적 산소요구량">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="clIonQnt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="염화물">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4 pl-6">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="smll"
|
||||
render={({ field }) => (
|
||||
<FormUi label="냄새">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="cdtnv"
|
||||
render={({ field }) => (
|
||||
<FormUi label="전기전도도">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4 pl-6">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="crmty"
|
||||
render={({ field }) => (
|
||||
<FormUi label="색도">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="emsnexittp"
|
||||
render={({ field }) => (
|
||||
<FormUi label="배출구온도">
|
||||
<Input placeholder="10" type="text" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+1
-115
@@ -30,7 +30,7 @@ const formSchema = z.object({
|
||||
</TableRow>
|
||||
</>)
|
||||
}
|
||||
export function PbnstRegForm() {
|
||||
export function PbnstBuseForm() {
|
||||
const { pubFac } = useWrStore((state) => state);
|
||||
const { pubMngUpHeadList, pubMngFacData,erctUswtrCd,cyclCd,seCd,buseCd,rprcsCd,buseMet,rprcLoCd} = pubFac;
|
||||
const nodeList = headMakeColSpan(pubMngUpHeadList);
|
||||
@@ -60,120 +60,6 @@ const nodeList = headMakeColSpan(pubMngUpHeadList);
|
||||
|
||||
return (
|
||||
<div className="pl-3">
|
||||
<div>
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)}>
|
||||
<div className="flex justify-between items-center mx-3 mb-3">
|
||||
<div className="col-span-2 flex items-top">
|
||||
<h1 className="pl-3 pr-3 text-xl">○ 재이용시설 운영정보</h1>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="facilityName"
|
||||
render={({ field }) => (
|
||||
<FormUi label="">
|
||||
<Input readOnly className="h-10 text-center text-xl" placeholder="난지" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Button className=" rounded-lg" type="submit">
|
||||
신규등록
|
||||
</Button>
|
||||
</div>
|
||||
<div className="grid grid-cols-12 gap-4 my-4">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_0211213336"
|
||||
render={({ }) => (
|
||||
<FormUi label="계통도">
|
||||
<FileUpload files={files} setFiles={setFiles} fileTypes="PDF"></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_0211213336"
|
||||
render={({ }) => (
|
||||
<FormUi label="평면도">
|
||||
<FileUpload files={files} setFiles={setFiles} fileTypes="PDF"></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="flex justify-between items-center mx-3 mb-3">
|
||||
<h1 className="pl-3 text-xl">○ 재이용시설 운영정보</h1>
|
||||
<Button className=" rounded-lg" >추가등록</Button>
|
||||
</div>
|
||||
<div>
|
||||
<UiTable
|
||||
tableData={pubMngFacData}
|
||||
headlist={pubMngUpHeadList}
|
||||
pageSize={100}
|
||||
total={-1}
|
||||
headName={""}
|
||||
>{nodeList}</UiTable>
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="pl-3 text-xl mb-3">○ 재이용수 공급 가능량</h1>
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_0943143371"
|
||||
render={({ field }) => (
|
||||
<FormUi label="시설용량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_2007089217"
|
||||
render={({ field }) => (
|
||||
<FormUi label="하수처리량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1624679275"
|
||||
render={({ field }) => (
|
||||
<FormUi label="재이용량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1624679277"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공급여유량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
{/* 차수별 등록 현황 폼 */}
|
||||
<div className="justify-between">
|
||||
<Form {...form}>
|
||||
@@ -0,0 +1,180 @@
|
||||
"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";
|
||||
import { selectClass, type TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
|
||||
const formSchema = z.object({
|
||||
username: z.string().min(2).max(50),
|
||||
facilityName: z.string().min(2).max(50),
|
||||
});
|
||||
|
||||
|
||||
const headMakeColSpan = (upHeadList: TableUpperProps[]) => {
|
||||
return (<>
|
||||
<TableRow>{
|
||||
upHeadList.map((head: TableUpperProps) =>
|
||||
(!head.upSequnce ? <TableHead rowSpan={2} key={head.id}>{head.title}</TableHead> :
|
||||
head.upName === 'upChangeRe' && head.upSequnce === 1 ? <TableHead key={head.id} rowSpan={1} colSpan={2}>{'운영대행기간'}</TableHead> : null))}
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
{upHeadList.map((head: TableUpperProps) =>
|
||||
(head.upName === 'upChangeRe' ? <TableHead key={head.id}>{head.title}</TableHead> : null))}
|
||||
</TableRow>
|
||||
</>)
|
||||
}
|
||||
export function PbnstMngForm() {
|
||||
const { pubFac } = useWrStore((state) => state);
|
||||
const { pubMngUpHeadList, pubMngFacData,cyclCd} = pubFac;
|
||||
const nodeList = headMakeColSpan(pubMngUpHeadList);
|
||||
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
username: "",
|
||||
},
|
||||
});
|
||||
|
||||
// 2. Define a submit handler.
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
// 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 (
|
||||
<div className="pl-3 pb-[10.3vh]">
|
||||
<div>
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)}>
|
||||
<div className="flex justify-between items-center mx-3 mb-3">
|
||||
<div className="col-span-2 flex items-top">
|
||||
<h1 className="pl-3 pr-3 text-xl">○ 재이용시설 운영정보</h1>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="facilityName"
|
||||
render={({ field }) => (
|
||||
<FormUi label="">
|
||||
<SelectBox label='' selectArray={cyclCd} className={""} selectClass={selectClass} onSelectValue={onSelectValue } {...field}></SelectBox>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<Button className=" rounded-lg" type="submit">
|
||||
신규등록
|
||||
</Button>
|
||||
</div>
|
||||
<div className="grid grid-cols-12 gap-4 my-4">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_0211213336"
|
||||
render={({ }) => (
|
||||
<FormUi label="계통도">
|
||||
<FileUpload files={files} setFiles={setFiles} fileTypes="PDF"></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_0211213336"
|
||||
render={({ }) => (
|
||||
<FormUi label="평면도">
|
||||
<FileUpload files={files} setFiles={setFiles} fileTypes="PDF"></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="flex justify-between items-center mx-3 mb-3">
|
||||
<h1 className="pl-3 text-xl">○ 재이용시설 운영정보</h1>
|
||||
<Button className=" rounded-lg" >추가등록</Button>
|
||||
</div>
|
||||
<div>
|
||||
<UiTable
|
||||
tableData={pubMngFacData}
|
||||
headlist={pubMngUpHeadList}
|
||||
pageSize={100}
|
||||
total={-1}
|
||||
headName={""}
|
||||
>{nodeList}</UiTable>
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="pl-3 text-xl mb-3">○ 재이용수 공급 가능량</h1>
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_0943143371"
|
||||
render={({ field }) => (
|
||||
<FormUi label="시설용량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_2007089217"
|
||||
render={({ field }) => (
|
||||
<FormUi label="하수처리량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1624679275"
|
||||
render={({ field }) => (
|
||||
<FormUi label="재이용량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1624679277"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공급여유량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,10 +1,6 @@
|
||||
"use client";
|
||||
|
||||
import {
|
||||
Form,
|
||||
FormField,
|
||||
SelectBox,
|
||||
} from "@common/business_components/ui";
|
||||
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";
|
||||
@@ -13,65 +9,65 @@ import { FormUi } from "@common/business_components";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
|
||||
const formSchema = z.object({
|
||||
facilityName: z.string().min(2).max(50),
|
||||
instlCmptnDt:z.string(),
|
||||
instlCst:z.string(),
|
||||
chmaraKndCd:z.string(),
|
||||
chmaraSz:z.string(),
|
||||
chmaraYn:z.string(),
|
||||
chmaraCpct:z.string(),
|
||||
chmaraProcs:z.string(),
|
||||
instlCstSprtYn:z.string(),
|
||||
instlCstSprtAmt:z.string(),
|
||||
grntchCstSprtYn:z.string(),
|
||||
grntchCstSprtCst:z.string(),
|
||||
grntchBdstCertYn:z.string(),
|
||||
grntchBdstCertYr:z.string(),
|
||||
grntchBdstCertNo:z.string(),
|
||||
grntchBdstCertGrd:z.string(),
|
||||
});
|
||||
|
||||
const formSchema = z
|
||||
.object({
|
||||
facilityName: z.string().min(2).max(50),
|
||||
instlCmptnDt: z.string(),
|
||||
instlCst: z.string(),
|
||||
chmaraKndCd: z.string(),
|
||||
chmaraSz: z.string(),
|
||||
chmaraYn: z.string(),
|
||||
chmaraCpct: z.string(),
|
||||
chmaraProcs: z.string(),
|
||||
instlCstSprtYn: z.string(),
|
||||
instlCstSprtAmt: z.string(),
|
||||
grntchCstSprtYn: z.string(),
|
||||
grntchCstSprtCst: z.string(),
|
||||
grntchBdstCertYn: z.string(),
|
||||
grntchBdstCertYr: z.string(),
|
||||
grntchBdstCertNo: z.string(),
|
||||
grntchBdstCertGrd: z.string(),
|
||||
})
|
||||
.readonly();
|
||||
|
||||
export function RainRegForm() {
|
||||
const { rain } = useWrStore((state) => state);
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
facilityName :'',
|
||||
instlCmptnDt:'',
|
||||
instlCst:'',
|
||||
chmaraKndCd:'',
|
||||
chmaraYn:'',
|
||||
chmaraSz:'',
|
||||
chmaraCpct:'',
|
||||
chmaraProcs:'',
|
||||
instlCstSprtYn:'',
|
||||
instlCstSprtAmt:'',
|
||||
grntchCstSprtYn:'',
|
||||
grntchCstSprtCst:'',
|
||||
grntchBdstCertYn:'',
|
||||
grntchBdstCertYr:'',
|
||||
grntchBdstCertNo:'',
|
||||
grntchBdstCertGrd:'',
|
||||
},
|
||||
});
|
||||
|
||||
// 2. Define a submit handler.
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
// Do something with the form values.
|
||||
// ✅ This will be type-safe and validated.
|
||||
console.log(values);
|
||||
}
|
||||
|
||||
const onSelectValue=(val:string)=>{
|
||||
console.log(val)
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
facilityName: "",
|
||||
instlCmptnDt: "",
|
||||
instlCst: "",
|
||||
chmaraKndCd: "",
|
||||
chmaraYn: "",
|
||||
chmaraSz: "",
|
||||
chmaraCpct: "",
|
||||
chmaraProcs: "",
|
||||
instlCstSprtYn: "",
|
||||
instlCstSprtAmt: "",
|
||||
grntchCstSprtYn: "",
|
||||
grntchCstSprtCst: "",
|
||||
grntchBdstCertYn: "",
|
||||
grntchBdstCertYr: "",
|
||||
grntchBdstCertNo: "",
|
||||
grntchBdstCertGrd: "",
|
||||
},
|
||||
});
|
||||
|
||||
// 2. Define a submit handler.
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
// Do something with the form values.
|
||||
// ✅ This will be type-safe and validated.
|
||||
console.log(values);
|
||||
}
|
||||
|
||||
const onSelectValue = (val: string) => {
|
||||
console.log(val);
|
||||
};
|
||||
return (
|
||||
<div className="">
|
||||
<Form {...form}>
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)}>
|
||||
{/* <div className="flex justify-between items-center mx-3"> */}
|
||||
<div>
|
||||
@@ -82,33 +78,43 @@ export function RainRegForm() {
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 ">
|
||||
기본정보
|
||||
</h1>
|
||||
<div className="grid grid-cols-4 gap-2 mt-4 pl-6" >
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCmptnDt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치완료일">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
<div className="grid grid-cols-4 gap-2 mt-4 pl-6">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCmptnDt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치완료일">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-2" >
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCst"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치비">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className=" my-4">
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 pl-6" >
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 pl-6">
|
||||
빗물이용시설 정보
|
||||
</h1>
|
||||
</div>
|
||||
@@ -116,70 +122,97 @@ export function RainRegForm() {
|
||||
<h2 className="pl-3 text-xl">✓ 1. 집수면</h2>
|
||||
</div>
|
||||
<div className="grid grid-cols-10 gap-1 mt-4">
|
||||
<div className="col-span-5 pl-6" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraKndCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="종류">
|
||||
<SelectBox className={""} selectClass={selectClass} label={""} selectArray={rain.selectYN} onSelectValue={onSelectValue} {...field}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraSz"
|
||||
render={({ field }) => (
|
||||
|
||||
<FormUi label="면적(m³)">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraKndCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="종류">
|
||||
<SelectBox
|
||||
className={""}
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rain.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraSz"
|
||||
render={({ field }) => (
|
||||
<FormUi label="면적(m³)">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<h2 className="pl-3 text-xl">✓ 2. 여과 등 처리시설</h2>
|
||||
</div>
|
||||
<div className="grid grid-cols-12 gap-2 mt-4">
|
||||
<div className="col-span-4 pl-6" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="유무">
|
||||
<SelectBox className={""} selectClass={selectClass} label={""} selectArray={rain.selectYN} onSelectValue={onSelectValue} {...field}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraCpct"
|
||||
render={({ field }) => (
|
||||
<FormUi label="용량(m³/일)">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraProcs"
|
||||
render={({ field }) => (
|
||||
<FormUi label="처리공정">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="유무">
|
||||
<SelectBox
|
||||
className={""}
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rain.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraCpct"
|
||||
render={({ field }) => (
|
||||
<FormUi label="용량(m³/일)">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="chmaraProcs"
|
||||
render={({ field }) => (
|
||||
<FormUi label="처리공정">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className=" my-2">
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 ">
|
||||
인센티브 정보
|
||||
@@ -189,81 +222,105 @@ export function RainRegForm() {
|
||||
<h2 className="pl-3 text-xl">✓ 1. 설치비 지원</h2>
|
||||
</div>
|
||||
<div className="grid grid-cols-10 gap-2 pl-6 mt-4">
|
||||
<div className="col-span-5" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCstSprtYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치비 지원 여부">
|
||||
<SelectBox className={""} selectClass={selectClass} label={""} selectArray={rain.selectYN} onSelectValue={onSelectValue} {...field}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCstSprtAmt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="지원금액(원)">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCstSprtYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치비 지원 여부">
|
||||
<SelectBox
|
||||
className={""}
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rain.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCstSprtAmt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="지원금액(원)">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<h2 className="pl-3 text-xl">✓ 2. 녹색건축물 인증</h2>
|
||||
</div>
|
||||
<div className="grid grid-cols-6 gap-2 mt-4">
|
||||
<div className="col-span-3 pl-6" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchCstSprtYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증여부">
|
||||
<SelectBox className={""} selectClass={selectClass} label={""} selectArray={rain.selectYN} onSelectValue={onSelectValue} {...field}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertYr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증년도">
|
||||
<Input className="" placeholder="2024" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 pl-6" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertNo"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증번호">
|
||||
<Input className="" placeholder="ab1234678" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertGrd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증등급">
|
||||
<Input className="" placeholder="A" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchCstSprtYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증여부">
|
||||
<SelectBox
|
||||
className={""}
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rain.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertYr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증년도">
|
||||
<Input className="" placeholder="2024" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertNo"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증번호">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="ab1234678"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertGrd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증등급">
|
||||
<Input className="" placeholder="A" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,67 +11,65 @@ import { zodResolver } from "@hookform/resolvers/zod";
|
||||
import { useForm } from "react-hook-form";
|
||||
import { z } from "zod";
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
|
||||
const formSchema = z.object({
|
||||
facilityName: z.string().min(2).max(50),
|
||||
instlCmptnDt:z.string(),
|
||||
instlCst:z.string(),
|
||||
wtrUsqty:z.string(),
|
||||
oblgTrgtwtrUsqty:z.string(),
|
||||
rswtrKndCd:z.string(),
|
||||
rswrtProcs:z.string(),
|
||||
utztmUsgCd:z.string(),
|
||||
instlCstSprtYn:z.string(),
|
||||
instlCstSprtAmt:z.string(),
|
||||
grntchCstSprtYn:z.string(),
|
||||
grntchCstSprtCst:z.string(),
|
||||
grntchBdstCertYn:z.string(),
|
||||
grntchBdstCertYr:z.string(),
|
||||
grntchBdstCertNo:z.string(),
|
||||
grntchBdstCertGrd:z.string(),
|
||||
facilityName: z.string().min(2).max(50),
|
||||
instlCmptnDt: z.string(),
|
||||
instlCst: z.string(),
|
||||
wtrUsqty: z.string(),
|
||||
oblgTrgtwtrUsqty: z.string(),
|
||||
rswtrKndCd: z.string(),
|
||||
rswrtProcs: z.string(),
|
||||
utztmUsgCd: z.string(),
|
||||
instlCstSprtYn: z.string(),
|
||||
instlCstSprtAmt: z.string(),
|
||||
grntchCstSprtYn: z.string(),
|
||||
grntchCstSprtCst: z.string(),
|
||||
grntchBdstCertYn: z.string(),
|
||||
grntchBdstCertYr: z.string(),
|
||||
grntchBdstCertNo: z.string(),
|
||||
grntchBdstCertGrd: z.string(),
|
||||
});
|
||||
|
||||
|
||||
export function RswtrRegForm() {
|
||||
const { rswt } = useWrStore((state) => state);
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
facilityName:'' ,
|
||||
instlCmptnDt:'',
|
||||
instlCst:'',
|
||||
wtrUsqty:'',
|
||||
oblgTrgtwtrUsqty:'',
|
||||
rswtrKndCd:'',
|
||||
rswrtProcs:'',
|
||||
utztmUsgCd:'',
|
||||
instlCstSprtYn:'',
|
||||
instlCstSprtAmt:'',
|
||||
grntchCstSprtYn:'',
|
||||
grntchCstSprtCst:'',
|
||||
grntchBdstCertYn:'',
|
||||
grntchBdstCertYr:'',
|
||||
grntchBdstCertNo:'',
|
||||
grntchBdstCertGrd:'',
|
||||
},
|
||||
});
|
||||
|
||||
// 2. Define a submit handler.
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
// Do something with the form values.
|
||||
// ✅ This will be type-safe and validated.
|
||||
console.log(values);
|
||||
}
|
||||
|
||||
const onSelectValue=(val:string)=>{
|
||||
console.log(val)
|
||||
|
||||
}
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
facilityName: "",
|
||||
instlCmptnDt: "",
|
||||
instlCst: "",
|
||||
wtrUsqty: "",
|
||||
oblgTrgtwtrUsqty: "",
|
||||
rswtrKndCd: "",
|
||||
rswrtProcs: "",
|
||||
utztmUsgCd: "",
|
||||
instlCstSprtYn: "",
|
||||
instlCstSprtAmt: "",
|
||||
grntchCstSprtYn: "",
|
||||
grntchCstSprtCst: "",
|
||||
grntchBdstCertYn: "",
|
||||
grntchBdstCertYr: "",
|
||||
grntchBdstCertNo: "",
|
||||
grntchBdstCertGrd: "",
|
||||
},
|
||||
});
|
||||
|
||||
// 2. Define a submit handler.
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
// Do something with the form values.
|
||||
// ✅ This will be type-safe and validated.
|
||||
console.log(values);
|
||||
}
|
||||
|
||||
const onSelectValue = (val: string) => {
|
||||
console.log(val);
|
||||
};
|
||||
return (
|
||||
<div className="">
|
||||
<Form {...form}>
|
||||
<Form {...form}>
|
||||
<form onSubmit={form.handleSubmit(onSubmit)}>
|
||||
{/* <div className="flex justify-between items-center mx-3"> */}
|
||||
<div>
|
||||
@@ -82,99 +80,134 @@ export function RswtrRegForm() {
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 ">
|
||||
기본정보
|
||||
</h1>
|
||||
<div className="grid grid-cols-4 gap-2 mt-4 pl-6" >
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCmptnDt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치완료일">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
<div className="grid grid-cols-4 gap-2 mt-4 pl-6">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCmptnDt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치완료일">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-2" >
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCst"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치비">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-4 gap-2 mt-4 pl-6" >
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="wtrUsqty"
|
||||
render={({ field }) => (
|
||||
<FormUi label="물사용량(m³)">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
<div className="grid grid-cols-4 gap-2 mt-4 pl-6">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="wtrUsqty"
|
||||
render={({ field }) => (
|
||||
<FormUi label="물사용량(m³)">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-2" >
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="oblgTrgtwtrUsqty"
|
||||
render={({ field }) => (
|
||||
<FormUi label="의무대상 물사용량(m³)">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className=" my-4">
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 pl-6" >
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 pl-6">
|
||||
중수도 시설 정보
|
||||
</h1>
|
||||
</div>
|
||||
|
||||
|
||||
<div className="grid grid-cols-10 gap-1 mt-4">
|
||||
<div className="col-span-5 pl-6" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="rswtrKndCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="필수 종류">
|
||||
<SelectBox selectClass={selectClass} selectArray={rswt.selectYN} onSelectValue={onSelectValue} {...field}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="rswrtProcs"
|
||||
render={({ field }) => (
|
||||
|
||||
<FormUi label="주요처리공정">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="utztmUsgCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="이용용도">
|
||||
<SelectBox selectClass={selectClass}label={""} selectArray={rswt.selectYN} onSelectValue={onSelectValue} {...field}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="rswtrKndCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="필수 종류">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="rswrtProcs"
|
||||
render={({ field }) => (
|
||||
<FormUi label="주요처리공정">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-5 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="utztmUsgCd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="이용용도">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div className=" my-2">
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 mt-4 ">
|
||||
인센티브 정보
|
||||
@@ -184,81 +217,103 @@ export function RswtrRegForm() {
|
||||
<h2 className="pl-3 text-xl">✓ 1. 설치비 지원</h2>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-2 mt-4">
|
||||
<div className="col-span-1 pl-6" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCstSprtYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치비 지원여부">
|
||||
<SelectBox selectClass={selectClass} label={""} selectArray={rswt.selectYN} onSelectValue={onSelectValue} {...field}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-1" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCstSprtAmt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="지원금액(원)">
|
||||
<Input className="" placeholder="1,000,000" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-1 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCstSprtYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치비 지원여부">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-1">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="instlCstSprtAmt"
|
||||
render={({ field }) => (
|
||||
<FormUi label="지원금액(원)">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="1,000,000"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div>
|
||||
<h2 className="pl-3 text-xl">✓ 2. 녹색건축물 인증</h2>
|
||||
</div>
|
||||
<div className="grid grid-cols-6 gap-2 mt-4">
|
||||
<div className="col-span-3 pl-6" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchCstSprtYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증여부">
|
||||
<SelectBox selectClass={selectClass} label={""} selectArray={rswt.selectYN} onSelectValue={onSelectValue} {...field}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertYr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증년도">
|
||||
<Input className="" placeholder="2024" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 pl-6" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertNo"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증번호">
|
||||
<Input className="" placeholder="ab1234678" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3" >
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertGrd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증등급">
|
||||
<Input className="" placeholder="A" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchCstSprtYn"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증여부">
|
||||
<SelectBox
|
||||
selectClass={selectClass}
|
||||
label={""}
|
||||
selectArray={rswt.selectYN}
|
||||
onSelectValue={onSelectValue}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertYr"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증년도">
|
||||
<Input className="" placeholder="2024" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3 pl-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertNo"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증번호">
|
||||
<Input
|
||||
className=""
|
||||
placeholder="ab1234678"
|
||||
type=""
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="grntchBdstCertGrd"
|
||||
render={({ field }) => (
|
||||
<FormUi label="인증등급">
|
||||
<Input className="" placeholder="A" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user