빗물재이용 데이터 조회 개발 중

This commit is contained in:
leedj312
2025-03-24 14:42:07 +09:00
parent 8d904d6714
commit 27ea503260
12 changed files with 430 additions and 140 deletions
@@ -308,7 +308,7 @@ const nodeList = headMakeColSpan(pubMngUpHeadList);
</div>
</div>
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 ">
<h1 className="bg-gray-400 text-xl text-center border-2 p-2 ">
농축수관리{" "}
</h1>
<div className="grid grid-cols-12 gap-4">
@@ -375,6 +375,51 @@ const nodeList = headMakeColSpan(pubMngUpHeadList);
</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>
@@ -18,6 +18,7 @@ import {
type TableUpperProps,
} from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import type { fcltOperInfoType, ruseFcltType } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg";
import { PbnstMngModal } from "@/components/ui/modal/pbnstMng/component";
const formSchema = z.object({
fcltNm: z.string().min(2).max(50),
@@ -37,6 +38,9 @@ export function PbnstMngForm({ data }: { data: ruseFcltType[] }) {
const { fcltOperInfo } = pubMng;
const [ruseOperData, setRuseOperData] = useState<fcltOperInfoType[]>();
const [files, setFiles] = useState(null);
const [isModalOpen, setIsModalOpen] = useState(false);
const form = useForm<z.infer<typeof formSchema>>({
resolver: zodResolver(formSchema),
@@ -61,10 +65,7 @@ export function PbnstMngForm({ data }: { data: ruseFcltType[] }) {
}
};
const newReuseFclt = () => {
form.reset();
setRuseOperData([{}] as fcltOperInfoType[]);
};
useEffect(() => {
if (isInit) {
@@ -169,11 +170,12 @@ export function PbnstMngForm({ data }: { data: ruseFcltType[] }) {
</div>
</div>
<div className="flex justify-between items-center mx-3 mb-3">
<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={newReuseFclt}>추가등록</Button>
<Button type="button" className="rounded-lg" onClick={() => setIsModalOpen(true)}>추가등록</Button>
{/* <PbnstMngModal /> */}
</div>
<div>
<div className="h-[200px] overflow-y-auto">
<UiTable
tableData={ruseOperData?ruseOperData:[]}
headlist={pubMngUpHeadList}
@@ -0,0 +1,29 @@
import { Button, Dialog, DialogClose, DialogContent, DialogDescription, DialogFooter, DialogHeader, DialogTitle, DialogTrigger } from "@common/components";
export function PbnstMngModal(butNm:string,chldrn:React.ReactNode) {
return (
<>
<Dialog>
<DialogTrigger asChild>
<Button variant="outline">{butNm}</Button>
</DialogTrigger>
<DialogContent className="sm:max-w-md">
<DialogHeader>
<DialogTitle>Share link</DialogTitle>
<DialogDescription>
Anyone who has this link will be able to view this.
</DialogDescription>
</DialogHeader>
{chldrn}
<DialogFooter className="sm:justify-start">
<DialogClose asChild>
<Button type="button" variant="secondary">
닫기
</Button>
</DialogClose>
</DialogFooter>
</DialogContent>
</Dialog>
</>
);
}