공공재이용시설 등록 작업중
This commit is contained in:
@@ -41,7 +41,7 @@ export default function MyForm() {
|
||||
function onSubmit(values: z.infer<typeof formSchema>) {
|
||||
try {
|
||||
toast.dismiss();
|
||||
ToastFormUi("수요신청 화면으로 이동하시겠습니까?", "수요처 등록 완료", "./dmdReg", "이동")
|
||||
//ToastFormUi("수요신청 화면으로 이동하시겠습니까?", "수요처 등록 완료", "./dmdReg", "이동")
|
||||
|
||||
} catch (error) {
|
||||
console.error("Form submission error", error);
|
||||
|
||||
@@ -92,7 +92,7 @@ export default function coSttn() {
|
||||
headlist={coSttn.coSttHeadList}
|
||||
pageSize={20}
|
||||
total={10000}
|
||||
cellClick={(index: number | undefined,headId:string)=>{cellClick(index ?? undefined,headId)} }
|
||||
cellClick={(index: number | undefined,headId:string)=>{} }
|
||||
onPageChange={setPageNation}
|
||||
></UiTable>
|
||||
</ListDiv>
|
||||
|
||||
@@ -4,17 +4,15 @@ import {
|
||||
ScrollArea,
|
||||
SearchDiv,
|
||||
SearchFormLeft,
|
||||
SearchFormRight,
|
||||
SearchInput,
|
||||
SelectBox,
|
||||
Title,
|
||||
UiTable,
|
||||
} from "@common/business_components";
|
||||
import { Button, Input } from "@common/components";
|
||||
import { useWrStore } from "../../../store";
|
||||
import { PbnstBuseForm } from "@/components/ui/form/fcltReg/pbnstReg/buseReg/component";
|
||||
import { PbnstBuseForm } from "@/components/ui/form/fcltReg/pbnstReg/buseReg/bugRegForm";
|
||||
import { Tabs, TabsList, TabsTrigger, TabsContent } from "@common/components";
|
||||
import { PbnstMngForm } from "@/components/ui/form/fcltReg/pbnstReg/mngReg/component";
|
||||
import { PbnstMngForm } from "@/components/ui/form/fcltReg/pbnstReg/mngReg/mngRegForm";
|
||||
import { useEffect, useState } from "react";
|
||||
import type { customPbnst, ruseFcltType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
@@ -41,8 +39,6 @@ useEffect(() => {
|
||||
|
||||
useEffect(() => {
|
||||
if (code.sggCd.length > 0) {
|
||||
console.log("pbnstReg ", pbnstReg)
|
||||
console.log( " wd ", tableData(pbnstReg, { code }))
|
||||
setbdstTable(tableData(pbnstReg, { code }));
|
||||
}
|
||||
}, [code, pbnstReg]);
|
||||
@@ -67,32 +63,45 @@ useEffect(() => {
|
||||
return (
|
||||
<>
|
||||
<ContentsDiv>
|
||||
<div className="grid grid-cols-4 gap-4 ">
|
||||
<div className="col-span-4 m-8">
|
||||
<Title title={"하수재이용시설 등록"} />
|
||||
<div className="grid grid-cols-4 gap-4">
|
||||
<div className="col-span-4">
|
||||
<Title title={"하수재이용 시설 등록"} />
|
||||
<SearchDiv>
|
||||
<SearchFormLeft>
|
||||
|
||||
<SearchInput
|
||||
className="col-span-3 my-7"
|
||||
<SearchInput
|
||||
className={"col-span-3 my-7 !text-3xl"}
|
||||
label="건물명"
|
||||
textValue={searchTxt || ""}
|
||||
setText={(e) => {
|
||||
setSearchTxt(e);
|
||||
}}
|
||||
/>
|
||||
<div className="flex flex-row space-x-2 items-center">
|
||||
<Button
|
||||
className=""
|
||||
size={"sm"}
|
||||
onClick={(e) => {
|
||||
}}
|
||||
>
|
||||
조회
|
||||
</Button>
|
||||
<Button
|
||||
size={"sm"}
|
||||
className=""
|
||||
onClick={() =>{}}
|
||||
>
|
||||
신규등록
|
||||
</Button>
|
||||
</div>
|
||||
</SearchFormLeft>
|
||||
<SearchFormRight>
|
||||
<Button className="mr-16 rounded-lg">조회</Button>
|
||||
</SearchFormRight>
|
||||
</SearchDiv>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-6 gap-4">
|
||||
<div className="col-span-4">
|
||||
<ScrollArea className="h-[60vh] rounded-md border p-2">
|
||||
<div className="min-h-[300px]">
|
||||
<div className="grid grid-cols-6 gap-4 h-full">
|
||||
<div className="col-span-4 h-full min-h-0">
|
||||
<ListDiv className="min-h-0">
|
||||
<ScrollArea className="h-[60vh]">
|
||||
<UiTable
|
||||
tableData={bdstTable || []}
|
||||
headlist={pubFacHeadList}
|
||||
@@ -101,21 +110,16 @@ useEffect(() => {
|
||||
headName={"공공 하수처리시설 등록"}
|
||||
cellClick={cellClick}
|
||||
onPageChange={(page: number) => { } } children={undefined} />
|
||||
</div>
|
||||
</ScrollArea>
|
||||
</div>
|
||||
<ListDiv className="col-span-2 pr-6 max-h-full overflow-y-scrolh1l">
|
||||
</ScrollArea>
|
||||
</ListDiv>
|
||||
</div>
|
||||
<ListDiv className="col-span-2 pr-6 ">
|
||||
<ScrollArea className="h-[60vh]">
|
||||
<Tabs defaultValue="mng" onValueChange={handleTabChange}>
|
||||
<div className="flex justify-between items-center">
|
||||
<TabsList>
|
||||
<TabsTrigger value="mng">시설정보</TabsTrigger>
|
||||
<TabsTrigger value="buse">차수별정보</TabsTrigger>
|
||||
<Tabs defaultValue="mng" onValueChange={handleTabChange}>
|
||||
<TabsList className="">
|
||||
<TabsTrigger className="!text-xl" value="mng">시설정보</TabsTrigger>
|
||||
<TabsTrigger className="!text-xl" value="buse">차수별정보</TabsTrigger>
|
||||
</TabsList>
|
||||
<Button className="rounded-lg" onClick={resetContents}>
|
||||
신규등록
|
||||
</Button>
|
||||
</div>
|
||||
<TabsContent className="max-h-full" value="mng">
|
||||
<PbnstMngForm data={fcltMng || []} />
|
||||
</TabsContent>
|
||||
|
||||
@@ -13,7 +13,6 @@ import {
|
||||
ScrollArea,
|
||||
SearchDiv,
|
||||
SearchFormLeft,
|
||||
SearchFormRight,
|
||||
SearchInput,
|
||||
Title,
|
||||
UiModal,
|
||||
@@ -120,7 +119,6 @@ export default function Home() {
|
||||
</Button>
|
||||
</div>
|
||||
</SearchFormLeft>
|
||||
|
||||
{/* <SearchFormRight>
|
||||
|
||||
</SearchFormRight> */}
|
||||
|
||||
@@ -85,7 +85,7 @@ export default function PbnstSttn() {
|
||||
headlist={pbnstSttn.pbnstSttHeadList}
|
||||
pageSize={20}
|
||||
total={100000}
|
||||
cellClick={(index: number | undefined,headId:string)=>{cellClick(index ?? undefined,headId)} }
|
||||
cellClick={(index: number | undefined,headId:string)=>{} }
|
||||
onPageChange={setPageNation}
|
||||
></UiTable>
|
||||
</ListDiv>
|
||||
|
||||
@@ -17,10 +17,8 @@ export interface StoreProviderProps {
|
||||
export const StoreProvider = ({
|
||||
children,
|
||||
}: StoreProviderProps) => {
|
||||
const storeRef = useRef<StoreApi>(null)
|
||||
if (!storeRef.current) {
|
||||
storeRef.current = StoreZus()
|
||||
}
|
||||
const storeRef = useRef<StoreApi>(StoreZus())
|
||||
|
||||
return (
|
||||
<StoreContext.Provider value={storeRef.current}>
|
||||
{children}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
import type { selectArray } from "../ruseFcltMng/fcltReg/rainReg";
|
||||
import type { SelectDataType } from "@common/business_components/ui";
|
||||
|
||||
|
||||
|
||||
@@ -23,10 +23,10 @@ const selectSgg = [
|
||||
|
||||
export type matDmdState ={ dmd:{
|
||||
isInit: boolean;
|
||||
selectSido:selectArray[];
|
||||
selectSgg:selectArray[];
|
||||
selectUsg:selectArray[];
|
||||
selectYN:selectArray[];
|
||||
selectSido:SelectDataType[];
|
||||
selectSgg:SelectDataType[];
|
||||
selectUsg:SelectDataType[];
|
||||
selectYN:SelectDataType[];
|
||||
}}
|
||||
type matDmdActions = {
|
||||
decrementList: () => void
|
||||
|
||||
@@ -88,7 +88,7 @@ const isRswtBdst = (data: any): data is customRswtBdst =>{
|
||||
}
|
||||
|
||||
if(data?.chgBuilding.length>0){
|
||||
const chRgtr = data.chgBuilding.map((item) =>({...item, rgtr:TEST_UUID}))
|
||||
const chRgtr = data.chgBuilding.map((item) =>({...item, rgtr:TEST_UUID, mdfr: item.mdfr ?? null }))
|
||||
data.chgBuilding =chRgtr;
|
||||
}
|
||||
return data;
|
||||
@@ -108,7 +108,8 @@ const isRswtBdst = (data: any): data is customRswtBdst =>{
|
||||
}
|
||||
}));
|
||||
if(data?.chgBuilding.length>0){
|
||||
const chRgtr = data.chgBuilding.map((item) =>({...item, rgtr:TEST_UUID}))
|
||||
const chRgtr = data.chgBuilding.map((item) =>({...item, rgtr:TEST_UUID, mdfr: item.mdfr ?? null }))
|
||||
data.chgBuilding =chRgtr;
|
||||
}
|
||||
|
||||
data.reuseBuilding=chData
|
||||
@@ -135,7 +136,7 @@ const isRswtBdst = (data: any): data is customRswtBdst =>{
|
||||
}
|
||||
|
||||
if(data?.chgBuilding.length>0){
|
||||
const chMdfr = data.chgBuilding.map((item) =>({...item, mdfr:TEST_UUID}))
|
||||
const chMdfr = data.chgBuilding.map((item) =>({...item, mdfr:TEST_UUID, archChgArea: item.archChgArea ?? '' }))
|
||||
data.chgBuilding =chMdfr;
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,73 @@
|
||||
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
|
||||
import type { TableUpperProps } from "../rainReg";
|
||||
|
||||
|
||||
export const pubFacHeadListExport: TableUpperProps[] = [
|
||||
{ id: "sido", title: "시도" },
|
||||
{ id: "gugun", title: "시군구" },
|
||||
{ id: "bscFctNm", title: "시설명" },
|
||||
{ id: "addr", title: "위치" },
|
||||
{ id: "efflWqltStndrdNm", title: "지역구분" },
|
||||
{ id: "fctCpc", title: "시설용량" },
|
||||
{ id: "yn", title: "재이용여부" },
|
||||
{ id: "authoDay", title: "등록여부" },
|
||||
];
|
||||
|
||||
export const pubMngUpHeadListExport: 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();
|
||||
|
||||
export const pubMngNmExport: chHeadType[] = [
|
||||
{ headNm: "upChangeRe", text: "운영대행기간", length: 2 },
|
||||
];
|
||||
|
||||
export type formDetailType ={
|
||||
id:string,
|
||||
lable:string
|
||||
type?:string
|
||||
}
|
||||
|
||||
|
||||
export const wasteWaterFcltINfo:formDetailType[]=[
|
||||
{id:'username' , lable:'폐수배출물신고 허가여부'},
|
||||
{id:'username' , lable:'Tms설치여부'},
|
||||
{id:'username' , lable:'공공하수도유입제외 허가여부'},
|
||||
]
|
||||
|
||||
export const concentratedWaterInfo:formDetailType[]=[
|
||||
{id:'username' , lable:'눙축수 발생량(m³/일)'},
|
||||
{id:'username' , lable:'눙축수연계지점'},
|
||||
{id:'username' , lable:'시설용량(m³/일)'},
|
||||
{id:'username' , lable:'눙축수처리방식'},
|
||||
{id:'username' , lable:'눙축수처리공법'},
|
||||
]
|
||||
|
||||
export const ruseFcltinfo:formDetailType[]=[
|
||||
{id:'username' , lable:'시설용량(m³/일)'},
|
||||
{id:'username' , lable:'주처리공법'},
|
||||
{id:'username' , lable:'위치(주소)'},
|
||||
{id:'username' , lable:'재처리방식'},
|
||||
{id:'username' , lable:'위치(처리장 내외)'},
|
||||
{id:'username' , lable:'메인공급펌프 용량'},
|
||||
]
|
||||
|
||||
|
||||
export const businessMoneyInfo:formDetailType[]=[
|
||||
{id:'username' , lable:'국고'},
|
||||
{id:'username' , lable:'지방비'},
|
||||
{id:'username' , lable:'민간투자비'},
|
||||
{id:'username' , lable:'원인자부담금'},
|
||||
{id:'username' , lable:'기타'},
|
||||
{id:'username' , lable:'합계'},
|
||||
]
|
||||
|
||||
export const businessSttnInfo:formDetailType[]=[
|
||||
{id:'username' , lable:'구분'},
|
||||
{id:'username' , lable:'사업방식'},
|
||||
{id:'username' , lable:'사업준공일' ,type:'date'},
|
||||
{id:'username' , lable:'설치승인인가일' ,type:'date'} ,
|
||||
]
|
||||
@@ -1,6 +1,8 @@
|
||||
import { z } from "zod";
|
||||
import type { TableUpperProps } from "../rainReg";
|
||||
import { getFetch } from "@/components/lib/api";
|
||||
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
|
||||
import { pubFacHeadListExport, pubMngNmExport, pubMngUpHeadListExport } from "./headList";
|
||||
|
||||
|
||||
export const pbnstZod = z.object({
|
||||
@@ -63,26 +65,9 @@ export type ruseFcltType = {
|
||||
splyExtraCpct:number;
|
||||
};
|
||||
const selectLabel: selectLabel[] = [{ text: "test", val: "1" }];
|
||||
|
||||
const pubFacHeadList: TableProps[] = [
|
||||
{ id: "sido", title: "시도" },
|
||||
{ id: "gugun", title: "시군구" },
|
||||
{ id: "bscFctNm", title: "시설명" },
|
||||
{ id: "addr", title: "위치" },
|
||||
{ id: "efflWqltStndrdNm", title: "지역구분" },
|
||||
{ id: "fctCpc", 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 pubFacHeadList= pubFacHeadListExport;
|
||||
const pubMngUpHeadList = pubMngUpHeadListExport
|
||||
const pubMngNm= pubMngNmExport;
|
||||
|
||||
|
||||
export type pubFacState = {
|
||||
@@ -90,6 +75,7 @@ export type pubFacState = {
|
||||
isInit: boolean;
|
||||
pubFacHeadList: TableProps[];
|
||||
pubMngUpHeadList: TableUpperProps[];
|
||||
pubMngNm: chHeadType[];
|
||||
selectLabel: selectLabel[];
|
||||
pbnstReg:customPbnst[];
|
||||
}
|
||||
@@ -106,6 +92,7 @@ export const pubFacStateExport: pubFacState = {
|
||||
pubFacHeadList: pubFacHeadList,
|
||||
pubMngUpHeadList: pubMngUpHeadList,
|
||||
selectLabel: selectLabel,
|
||||
pubMngNm:pubMngNm,
|
||||
pbnstReg:pbnstReg,
|
||||
},
|
||||
|
||||
@@ -113,7 +100,7 @@ export const pubFacStateExport: pubFacState = {
|
||||
|
||||
const initFetch = async (txt:string|undefined) => {
|
||||
|
||||
const rainRes =await getFetch("common", `/prcsFclt/info/1/20/'A'/41220` +(txt? `/${txt}`:'')+'/0'+'/1' );
|
||||
const rainRes =await getFetch("common", `/prcsFclt/info/1/10/'A'/41220` +(txt? `/${txt}`:'')+'/0'+'/1' );
|
||||
|
||||
return rainRes
|
||||
};
|
||||
|
||||
@@ -102,6 +102,7 @@ export type WrStore = comCodeType &
|
||||
htdflSttnType &
|
||||
rainChkSttnType&
|
||||
rswtChkSttnType&
|
||||
pbnstSttnType&
|
||||
coSttnType& // 옮겨야함
|
||||
ldrmntCoSttnType // 옮겨야함
|
||||
;
|
||||
@@ -121,6 +122,7 @@ export const StoreZus = (
|
||||
htdflSttnState &
|
||||
rainChkSttnState&
|
||||
rswtChkSttnState &
|
||||
pbnstSttnState&
|
||||
coSttnState& // 옮겨야함
|
||||
ldrmntCoSttnState // 옮겨야함
|
||||
|
||||
|
||||
@@ -1,2 +1,5 @@
|
||||
export const formH1Class = "bg-[#eaf3fb] text-xl text-center border-2 p-2 mt-4 font-medium"
|
||||
export const formH2Class = "text-xl my-4 underline font-bold"
|
||||
export const formH2Class = "text-xl my-4 underline font-bold"
|
||||
|
||||
export const formTableName = 'text-xl my-4 font-bold'
|
||||
export const commonButonSize = "sm"
|
||||
@@ -126,3 +126,9 @@ export const getCityOrSgg = (ref: RefObject<ReturnType>) => {
|
||||
}
|
||||
return con;
|
||||
};
|
||||
|
||||
|
||||
export const safeDate = (value: any): Date | undefined => {
|
||||
const date = new Date(value);
|
||||
return isNaN(date.getTime()) ? undefined : date;
|
||||
};
|
||||
@@ -4,6 +4,7 @@ import {
|
||||
formatCommaNumber,
|
||||
getCity,
|
||||
handleCommaNumberChange,
|
||||
safeDate,
|
||||
} from "@/components/lib/func/commom";
|
||||
import type { objSearchType } from "@/components/ui/modal/fcltReg/bdstRegModal/bdstRegModal";
|
||||
import {
|
||||
@@ -74,10 +75,7 @@ export default function BdstReg({ form }: { form: any }) {
|
||||
return () => subscription?.unsubscribe();
|
||||
}, [form.form]);
|
||||
|
||||
const safeDate = (value: any): Date | undefined => {
|
||||
const date = new Date(value);
|
||||
return isNaN(date.getTime()) ? undefined : date;
|
||||
};
|
||||
|
||||
|
||||
return (
|
||||
<>
|
||||
|
||||
@@ -0,0 +1,224 @@
|
||||
"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";
|
||||
import {
|
||||
commonButonSize,
|
||||
formH1Class,
|
||||
formH2Class,
|
||||
formTableName,
|
||||
} from "@/components/lib/class/comClass";
|
||||
import MngRegFormDetail from "../mngReg/mngRegFormDetail/mngRegFormDetail";
|
||||
import {
|
||||
businessMoneyInfo,
|
||||
businessSttnInfo,
|
||||
concentratedWaterInfo,
|
||||
ruseFcltinfo,
|
||||
wasteWaterFcltINfo,
|
||||
} from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/headList";
|
||||
|
||||
const formSchema = z.object({
|
||||
username: z.string().min(2).max(50),
|
||||
facilityName: z.string().min(2).max(50),
|
||||
});
|
||||
|
||||
export function PbnstBuseForm() {
|
||||
const { code, pubFac } = useWrStore((state) => state);
|
||||
const { pubMngUpHeadList } = pubFac;
|
||||
|
||||
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=" !mx-[1.6rem] !p-0r">
|
||||
{/* 차수별 등록 현황 폼 */}
|
||||
<div className="justify-between">
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="space-y-8 mx-auto w-full mt-7"
|
||||
>
|
||||
<div className="flex justify-between items-center mx-3 mb-3">
|
||||
<h1 className=" text-xl"></h1>
|
||||
<div className="flex items-center gap-2 mx-3">
|
||||
<h1 className={formTableName}>등록차수</h1>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="username"
|
||||
render={({ field }) => (
|
||||
<FormUi label="">
|
||||
<SelectBox
|
||||
label=""
|
||||
selectArray={code.yn}
|
||||
className={""}
|
||||
selectClass={selectClass}
|
||||
onSelectValue={() => {}}
|
||||
{...field}
|
||||
></SelectBox>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
<Button size={commonButonSize}>저장</Button>
|
||||
</div>
|
||||
</div>
|
||||
{/* <div>
|
||||
<h1 className={formH1Class}>사업현황 </h1>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="username"
|
||||
render={({ field }) => (
|
||||
<FormUi label="구분">
|
||||
<SelectBox
|
||||
selectArray={code.yn}
|
||||
className={""}
|
||||
label={""}
|
||||
selectClass={selectClass}
|
||||
onSelectValue={() => {}}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="username"
|
||||
render={({ field }) => (
|
||||
<FormUi label="사업방식">
|
||||
<SelectBox
|
||||
selectArray={code.yn}
|
||||
className={""}
|
||||
label={""}
|
||||
selectClass={selectClass}
|
||||
onSelectValue={() => {}}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="username"
|
||||
render={({ field }) => (
|
||||
<FormUi label="사업준공일">
|
||||
<DatePicker
|
||||
selectClass={"rounded-lg w-full"}
|
||||
field={{
|
||||
value: bizCmcnDate,
|
||||
onChange: function (date: Date | undefined): void {
|
||||
if (date) setBizCmcnDate(date);
|
||||
},
|
||||
}}
|
||||
mode="single"
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="username"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치승인인가일">
|
||||
<DatePicker
|
||||
selectClass={"rounded-lg w-full bg-white"}
|
||||
field={{
|
||||
value: instlAprvDate,
|
||||
onChange: (date: Date | undefined): void => {
|
||||
if (date) setInstlAprvDate(date);
|
||||
},
|
||||
}}
|
||||
mode="single"
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div> */}
|
||||
<MngRegFormDetail
|
||||
formList={businessSttnInfo}
|
||||
h1Title={"사업현황"}
|
||||
form={form}
|
||||
moClass="grid grid-cols-12 gap-4"
|
||||
sonClass="col-span-4"
|
||||
/>
|
||||
|
||||
<MngRegFormDetail
|
||||
formList={businessMoneyInfo}
|
||||
h1Title={"사업비"}
|
||||
form={form}
|
||||
moClass="grid grid-cols-12 gap-4"
|
||||
sonClass="col-span-4"
|
||||
/>
|
||||
<MngRegFormDetail
|
||||
formList={ruseFcltinfo}
|
||||
h1Title={"재처리시설"}
|
||||
form={form}
|
||||
moClass="grid grid-cols-12 gap-4"
|
||||
sonClass="col-span-4"
|
||||
/>
|
||||
<MngRegFormDetail
|
||||
formList={concentratedWaterInfo}
|
||||
h1Title={"농축수관리"}
|
||||
form={form}
|
||||
moClass="grid grid-cols-12 gap-4"
|
||||
sonClass="col-span-4"
|
||||
/>
|
||||
<MngRegFormDetail
|
||||
formList={wasteWaterFcltINfo}
|
||||
h1Title={"폐수배출시설 정보"}
|
||||
form={form}
|
||||
moClass="grid grid-cols-12 gap-4"
|
||||
sonClass="col-span-4"
|
||||
/>
|
||||
|
||||
<h1 className={formH1Class}>재이용 원수취수 현황</h1>
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
@@ -1,412 +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";
|
||||
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),
|
||||
});
|
||||
|
||||
export function PbnstBuseForm() {
|
||||
const { code ,pubFac } = useWrStore((state) => state);
|
||||
const { pubMngUpHeadList} = pubFac;
|
||||
|
||||
|
||||
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">
|
||||
{/* 차수별 등록 현황 폼 */}
|
||||
<div className="justify-between">
|
||||
<Form {...form}>
|
||||
<form
|
||||
onSubmit={form.handleSubmit(onSubmit)}
|
||||
className="space-y-8 mx-auto w-full mt-7">
|
||||
<div className="flex justify-between items-center mx-3 mb-3">
|
||||
<h1 className=" text-xl">
|
||||
○ 차수별 하수처리수 재이용 시설 현황
|
||||
</h1>
|
||||
<div className="flex items-center gap-2 mx-3">
|
||||
<h1 className=" text-xl">
|
||||
등록차수
|
||||
</h1>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1486273033"
|
||||
render={({ field }) => (
|
||||
<FormUi label=''>
|
||||
<SelectBox label='' selectArray={code.yn} className={""} selectClass={selectClass} onSelectValue={() =>{} } {...field}></SelectBox>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
<Button className="rounded-lg">
|
||||
신규등록
|
||||
</Button>
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="pl-3 text-xl">♦︎하수처리수 재이용 시설 현황</h1>
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 ">
|
||||
사업개요{" "}
|
||||
</h1>
|
||||
<h1 className="pl-4 text-xl my-0">1. 현황</h1>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_8928357542"
|
||||
render={({ field }) => (
|
||||
<FormUi label="구분">
|
||||
<SelectBox selectArray={code.yn} className={""} label={""} selectClass={selectClass} onSelectValue={()=>{} } />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_9484942814"
|
||||
render={({ field }) => (
|
||||
<FormUi label="사업방식">
|
||||
<SelectBox selectArray={code.yn} className={""} label={""} selectClass={selectClass} onSelectValue={()=>{} }/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_2450741594"
|
||||
render={({ field }) => (
|
||||
<FormUi label="사업준공일">
|
||||
<DatePicker
|
||||
selectClass={'rounded-lg w-full'}
|
||||
field={{
|
||||
value: bizCmcnDate,
|
||||
onChange: function (date: Date | undefined): void {
|
||||
if (date) setBizCmcnDate(date);
|
||||
}
|
||||
}} mode="single" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_2450741594"
|
||||
render={({ field }) => (
|
||||
<FormUi label="설치승인인가일">
|
||||
<DatePicker
|
||||
|
||||
selectClass={'rounded-lg w-full bg-white'} field={{
|
||||
value: instlAprvDate,
|
||||
onChange: (date: Date | undefined): void => {
|
||||
if (date) setInstlAprvDate(date);
|
||||
}
|
||||
}} mode="single" {...field}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<h1 className="pl-4 text-xl">2. 사업비</h1>
|
||||
<div className="grid grid-cols-10 gap-4">
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7678668236"
|
||||
render={({ field }) => (
|
||||
<FormUi label="국고">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7913744238"
|
||||
render={({ field }) => (
|
||||
<FormUi label="지방비">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1368081408"
|
||||
render={({ field }) => (
|
||||
<FormUi label="민간투자비">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1368081408"
|
||||
render={({ field }) => (
|
||||
<FormUi label="원인자부담금">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1368081408"
|
||||
render={({ field }) => (
|
||||
<FormUi label="기타">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="w-64">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1368081408"
|
||||
render={({ field }) => (
|
||||
<FormUi label="합계">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 ">
|
||||
재처리시설{" "}
|
||||
</h1>
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7678668236"
|
||||
render={({ field }) => (
|
||||
<FormUi label="시설용량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7913744238"
|
||||
render={({ field }) => (
|
||||
<FormUi label="주처리공법">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1368081408"
|
||||
render={({ field }) => (
|
||||
<FormUi label="위치(주소)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-4 ">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_5139286452"
|
||||
render={({ field }) => (
|
||||
<FormUi label="재처리방식">
|
||||
<SelectBox selectArray={code.yn} className={""} label={""} selectClass={selectClass} onSelectValue={() =>{} }/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7233630277"
|
||||
render={({ field }) => (
|
||||
<FormUi label="위치(처리장 내외)">
|
||||
<SelectBox selectArray={code.yn} className={""} label={""} selectClass={selectClass} onSelectValue={()=>{} }/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_0973765174"
|
||||
render={({ field }) => (
|
||||
<FormUi label="메인공급펌프 용량">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 ">
|
||||
농축수관리{" "}
|
||||
</h1>
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7678668236"
|
||||
render={({ field }) => (
|
||||
<FormUi label="눙축수 발생량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7913744238"
|
||||
render={({ field }) => (
|
||||
<FormUi label="눙축수연계지점">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1368081408"
|
||||
render={({ field }) => (
|
||||
<FormUi label="시설용량(m³/일)">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-4 ">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_5139286452"
|
||||
render={({ field }) => (
|
||||
<FormUi label="눙축수처리방식">
|
||||
<SelectBox selectArray={code.yn} className={""} label={""} selectClass={selectClass} onSelectValue={() =>{}}/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7233630277"
|
||||
render={({ field }) => (
|
||||
<FormUi label="눙축수처리공법">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 ">
|
||||
폐수배출시설 정보
|
||||
</h1>
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7678668236"
|
||||
render={({ field }) => (
|
||||
<FormUi label="폐수배출물신고 허가여부">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_7913744238"
|
||||
render={({ field }) => (
|
||||
<FormUi label="Tms설치여부">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
|
||||
<div className="col-span-4">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="name_1368081408"
|
||||
render={({ field }) => (
|
||||
<FormUi label="공공하수도 유입제외 허가여부">
|
||||
<Input placeholder="" type="" {...field} />
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<h1 className=" text-xl">
|
||||
재이용 원수취수 현황
|
||||
</h1>
|
||||
|
||||
</form>
|
||||
</Form>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
+85
-84
@@ -1,11 +1,7 @@
|
||||
"use client";
|
||||
|
||||
import { SelectBox } from "@common/business_components";
|
||||
import {
|
||||
FileUpload,
|
||||
FormUi,
|
||||
UiTable,
|
||||
} from "@common/business_components/ui";
|
||||
import { 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";
|
||||
@@ -17,7 +13,12 @@ import {
|
||||
selectClass,
|
||||
type TableUpperProps,
|
||||
} from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import type { fcltOperInfoType, ruseFcltType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg";
|
||||
import type {
|
||||
fcltOperInfoType,
|
||||
ruseFcltType,
|
||||
} from "@/app/store/ruseFcltMng/fcltReg/pbnstReg";
|
||||
import { commonButonSize, formH1Class, formH2Class, formTableName } from "@/components/lib/class/comClass";
|
||||
import RuseMngTable from "@/components/ui/table/pbnstReg/ruseMngTable/ruseMngTable";
|
||||
|
||||
const formSchema = z.object({
|
||||
fcltNm: z.string().min(2).max(50),
|
||||
@@ -29,37 +30,32 @@ const formSchema = z.object({
|
||||
splyExtraCpct: z.number(),
|
||||
});
|
||||
|
||||
|
||||
|
||||
export function PbnstMngForm({ data }: { data: ruseFcltType[] }) {
|
||||
export function PbnstMngForm({ data }: { data: ruseFcltType[] }) {
|
||||
const { pubFac } = useWrStore((state) => state);
|
||||
const { pubMngUpHeadList, isInit } = pubFac;
|
||||
const [ruseOperData, setRuseOperData] = useState<fcltOperInfoType[]>();
|
||||
const [files, setFiles] = useState(null);
|
||||
const [files, setFiles] = useState<File[] | null>(null);
|
||||
const [isModalOpen, setIsModalOpen] = useState(false);
|
||||
|
||||
|
||||
|
||||
const form = useForm<z.infer<typeof formSchema>>({
|
||||
resolver: zodResolver(formSchema),
|
||||
defaultValues: {
|
||||
fcltNm: '',
|
||||
psysScdg: '',
|
||||
designScdg: '',
|
||||
fcltNm: "",
|
||||
psysScdg: "",
|
||||
designScdg: "",
|
||||
fcltCpct: 0,
|
||||
swtrmtCpct: 0,
|
||||
ruseCpct: 0,
|
||||
splyExtraCpct: 0,
|
||||
},
|
||||
});
|
||||
|
||||
const selectOptions = data?.map((item) => ({text: item.fcltNm, val: item.pbnstRuseFcltPk})) || [{text:'없음', val:'1'}];
|
||||
|
||||
const onSelectValue = (val: string) => {
|
||||
|
||||
};
|
||||
const selectOptions = data?.map((item) => ({
|
||||
text: item.fcltNm,
|
||||
val: item.pbnstRuseFcltPk,
|
||||
})) || [{ text: "없음", val: "1" }];
|
||||
|
||||
|
||||
const onSelectValue = (val: string) => {};
|
||||
|
||||
useEffect(() => {
|
||||
if (isInit) {
|
||||
@@ -102,88 +98,58 @@ export function PbnstMngForm({ data }: { data: ruseFcltType[] }) {
|
||||
const nodeList = headMakeColSpan(pubMngUpHeadList);
|
||||
|
||||
return (
|
||||
<div className="pl-3 pb-[10.3vh]">
|
||||
<div className=" !mx-[1.6rem] !p-0r">
|
||||
<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>
|
||||
<h2 className={formTableName + "pr-3 col-span-10 "}>
|
||||
재이용 시설명
|
||||
</h2>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="fcltNm"
|
||||
render={({ field }) => (
|
||||
<FormUi label="">
|
||||
{data.length === 0 ? (
|
||||
<Input placeholder="시설명을 입력하세요" {...field} />
|
||||
) : (
|
||||
<SelectBox
|
||||
label=""
|
||||
selectArray={selectOptions}
|
||||
className={""}
|
||||
selectClass={selectClass}
|
||||
onSelectValue={()=>{}}
|
||||
{...field}
|
||||
/>
|
||||
)}
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="grid grid-cols-12 gap-4 my-4">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="psysScdg"
|
||||
render={({}) => (
|
||||
<FormUi label="계통도">
|
||||
<FileUpload
|
||||
files={files}
|
||||
setFiles={setFiles}
|
||||
fileTypes="PDF"
|
||||
></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="designScdg"
|
||||
render={({}) => (
|
||||
<FormUi label="평면도">
|
||||
<FileUpload
|
||||
files={files}
|
||||
setFiles={setFiles}
|
||||
fileTypes="PDF"
|
||||
></FileUpload>
|
||||
<SelectBox
|
||||
label=""
|
||||
selectArray={selectOptions}
|
||||
className={""}
|
||||
selectClass={selectClass}
|
||||
onSelectValue={() => {}}
|
||||
{...field}
|
||||
/>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div className="flex justify-between items-center mx-3 mb-3 ">
|
||||
<h1 className="pl-3 text-xl">○ 재이용시설 운영정보</h1>
|
||||
<Button type="button" className="rounded-lg" onClick={() => setIsModalOpen(true)}>추가등록</Button>
|
||||
{/* <PbnstMngModal /> */}
|
||||
</div>
|
||||
<div>
|
||||
|
||||
<div className="h-[200px] overflow-y-auto">
|
||||
<UiTable
|
||||
tableData={[]}
|
||||
headlist={pubMngUpHeadList}
|
||||
pageSize={100}
|
||||
total={-1}
|
||||
headName={""}
|
||||
cellClick={() => { } } onPageChange={function (page: number): void {
|
||||
throw new Error("Function not implemented.");
|
||||
} } >
|
||||
{nodeList}
|
||||
</UiTable>
|
||||
<div className="flex justify-between items-center mx-3 mb-3">
|
||||
<span className={formTableName}>재이용시설 운영정보</span>
|
||||
<Button
|
||||
type="button"
|
||||
size={commonButonSize}
|
||||
className="!text-xl"
|
||||
onClick={() => setIsModalOpen(true)}
|
||||
>
|
||||
추가등록
|
||||
</Button>
|
||||
</div>
|
||||
<RuseMngTable
|
||||
tableData={ []}
|
||||
headList={pubFac.pubMngUpHeadList}
|
||||
upHeadList={pubFac.pubMngNm}>
|
||||
</RuseMngTable>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div>
|
||||
<h1 className="pl-3 text-xl mb-3">○ 재이용수 공급 가능량</h1>
|
||||
<h1 className={formH1Class}>재이용수 공급 가능량</h1>
|
||||
<div className="grid grid-cols-12 gap-4">
|
||||
<div className="col-span-3">
|
||||
<FormField
|
||||
@@ -230,6 +196,41 @@ export function PbnstMngForm({ data }: { data: ruseFcltType[] }) {
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
<div className="">
|
||||
<h1 className={formH1Class}>계통도 평면도</h1>
|
||||
</div>
|
||||
<div className="grid grid-cols-12 gap-4 my-4">
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="psysScdg"
|
||||
render={({}) => (
|
||||
<FormUi label="계통도">
|
||||
<FileUpload
|
||||
files={files || []}
|
||||
setFiles={setFiles}
|
||||
fileTypes="PDF"
|
||||
></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-6">
|
||||
<FormField
|
||||
control={form.control}
|
||||
name="designScdg"
|
||||
render={({}) => (
|
||||
<FormUi label="평면도">
|
||||
<FileUpload
|
||||
files={files || []}
|
||||
setFiles={setFiles}
|
||||
fileTypes="PDF"
|
||||
></FileUpload>
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</Form>
|
||||
+58
@@ -0,0 +1,58 @@
|
||||
import type { formDetailType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/headList";
|
||||
import { formH1Class } from "@/components/lib/class/comClass";
|
||||
import { safeDate } from "@/components/lib/func/commom";
|
||||
import { FormField, FormUi } from "@common/business_components/ui";
|
||||
import { DatePicker, Input } from "@common/components/ui";
|
||||
|
||||
export default function MngRegFormDetail({
|
||||
formList,
|
||||
h1Title,
|
||||
form,
|
||||
moClass,
|
||||
sonClass,
|
||||
}: {
|
||||
formList: formDetailType[];
|
||||
h1Title: string;
|
||||
form: any;
|
||||
moClass?: string;
|
||||
sonClass?: string;
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<h1 className={formH1Class}>{h1Title}</h1>
|
||||
<div className={moClass}>
|
||||
{formList?.map((item, index) => {
|
||||
return (
|
||||
<div className={sonClass} key={index + `${item.id}`}>
|
||||
<FormField
|
||||
control={form.control}
|
||||
name={item.id}
|
||||
render={({ field }) => (
|
||||
<FormUi label={item.lable}>
|
||||
{item.type === "select" ? (
|
||||
<Input placeholder="" type="text" {...field} />
|
||||
) : item.type === "date" ? (
|
||||
<DatePicker
|
||||
mode={"single"}
|
||||
field={{
|
||||
value: safeDate(field.value) || new Date(),
|
||||
onChange: (date: Date | undefined) =>
|
||||
field.onChange(date),
|
||||
}}
|
||||
selectClass={"rounded-lg w-full"}
|
||||
></DatePicker>
|
||||
) : item.type === "number" ? (
|
||||
<Input placeholder="" type="number" {...field} />
|
||||
) : (
|
||||
<Input placeholder="" type="" {...field} />
|
||||
)}
|
||||
</FormUi>
|
||||
)}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
@@ -105,7 +105,6 @@ export default function RainRegForm({
|
||||
if (rainZod) form.reset(cleanRainData(rainForm));
|
||||
}, [rainForm]);
|
||||
|
||||
const inputClass = "!text-lg";
|
||||
|
||||
return (
|
||||
<div className=" !mx-[1.6rem] !p-0r">
|
||||
|
||||
@@ -36,7 +36,7 @@ export function DmdRegForm(form: any) {
|
||||
render={({ field }) => (
|
||||
<FormItem className="flex flex-col">
|
||||
<FormLabel>요구시기</FormLabel>
|
||||
<DatePicker mode={"single"} field={{ value: dmdDate, onChange: onChangeDate }} />
|
||||
<DatePicker mode={"single"} field={{ value: dmdDate, onChange: onChangeDate }} selectClass={undefined} />
|
||||
</FormItem>
|
||||
)}
|
||||
/>
|
||||
|
||||
@@ -88,7 +88,7 @@ export default function ChkgdExcel({ type }: { type: string }) {
|
||||
if (fusion) {
|
||||
return {
|
||||
...guide,
|
||||
rswtrPolutions: fusion?.rswtrPolutions,
|
||||
rswtrPolutions: fusion?.rswtrPollutions,
|
||||
rswtrDetails:fusion?.rswtrDetails
|
||||
};
|
||||
} else {
|
||||
|
||||
@@ -16,7 +16,7 @@ export default function CoRegExcel() {
|
||||
const [files, setFiles] = useState<File[] | null>(null);
|
||||
const form = useForm<z.infer<typeof coRegExcel>>({
|
||||
resolver: zodResolver(coRegExcel),
|
||||
defaultValues: { file: [] },
|
||||
defaultValues: { file: undefined },
|
||||
});
|
||||
useEffect(() => {
|
||||
if (!files || files.length === 0) return;
|
||||
|
||||
@@ -0,0 +1,51 @@
|
||||
import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/TableHead";
|
||||
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
|
||||
import type { TableUpperProps } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
|
||||
import { Input, Table, TableBody, TableCell, TableHeader, TableRow } from "@common/components/ui";
|
||||
|
||||
export default function RuseMngTable({
|
||||
tableData,
|
||||
headList,
|
||||
upHeadList,
|
||||
}: {
|
||||
tableData: any[];
|
||||
headList: TableUpperProps[];
|
||||
upHeadList: chHeadType[];
|
||||
}) {
|
||||
return (
|
||||
<>
|
||||
<Table variant="secondary">
|
||||
<TableHeader className="font-bold">
|
||||
{headMakeprfmnc(headList, upHeadList)}
|
||||
</TableHeader>
|
||||
|
||||
<TableBody>
|
||||
{tableData.map((item, index) => (
|
||||
<TableRow key={index}>
|
||||
{headList.map((head, index) => (
|
||||
<TableCell
|
||||
key={`${head.id}-${index}`}
|
||||
className="text-center whitespace-nowrap"
|
||||
onClick={() => {}}
|
||||
>
|
||||
{head.edit === true ? (
|
||||
<Input
|
||||
className={`${head.type === "number" ? "text-right" : "text-center"} !text-xl`}
|
||||
type={head.type}
|
||||
onChange={(e) => {
|
||||
;
|
||||
}}
|
||||
value={item[head.id] || ""}
|
||||
/>
|
||||
) : (
|
||||
`${item[head.id] || ""}`
|
||||
)}
|
||||
</TableCell>
|
||||
))}
|
||||
</TableRow>
|
||||
))}
|
||||
</TableBody>
|
||||
</Table>
|
||||
</>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user