Merge remote-tracking branch 'origin/iipbs/wr/dev' into iipbs/wr/dev

This commit is contained in:
leedj312
2025-03-10 22:25:42 +09:00
8 changed files with 94 additions and 90 deletions
@@ -1,7 +1,7 @@
'use client'
import { ScrollArea, SearchDiv, SelectBox, UiTable } from '@common/business_components';
import { Button, TableHead, TableRow } from '@common/components';
import { Button } from '@common/components';
import { PublicReuseFaciltyFormInsert } from '../../../../components/ui/publicReuseInsertForm';
import { useWrStore } from '../../../store';
@@ -11,43 +11,44 @@ import { useWrStore } from '../../../store';
const {pubFac} = useWrStore((state) => state);
const { pubFacHeadList, publicReuseFacilityData, selectLabel} = pubFac;
console.log(pubFacHeadList)
const searchDiv ='시군구'
const selectBox = [{text:'한양', value:1}]
const headName= ()=>{
return(
<h1 className="pl-3 text-xl">○공공 허수처리시설 등록</h1>
)
const searchDiv = '시군구'
const selectBox = [{ text: '한양', val: "1" }, { text: '서울', val: "2" }, { text: '부산', val: "3" }]
const headName = () => {
return (
<h1 className="pl-3 text-xl">○공공 허수처리시설 등록</h1>
)
}
return ( <>
<div className="grid grid-cols-2 gap-4 h-full">
<div className='col-span-2'>
<h1 className="pl-3 text-2xl" > 하수재이용시설 등록</h1>
<SearchDiv >
<div className='flex'>
<SelectBox label={searchDiv} selectArray={selectBox} />
<Button className ='mr-4' size='sm'>조회</Button>
<Button className ='mr-4' size='sm'>신규추가</Button>
const onSelectValue = (val: string) => {
console.log(val)
}
return (
<>
<div className="grid grid-cols-2 gap-4 h-full">
<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'>
<SelectBox className='col-span-2' label={searchDiv} selectArray={selectBox} onSelectValue={onSelectValue} />
</div>
<div className='w-1/5 flex items-center justify-end'>
<Button className='mr-4 rounded-md'>조회</Button>
<Button className='mr-4 rounded-md'>신규추가</Button>
</div>
</SearchDiv>
{/* </div> */}
</div>
</div>
</SearchDiv>
</div>
<div className="col-span-1">
<UiTable tableData={publicReuseFacilityData} headlist={pubFacHeadList} pageSize={100} total={10} headName={headName()} children={undefined}>
</ UiTable>
<UiTable tableData={publicReuseFacilityData} headlist={pubFacHeadList} pageSize={100} total={10} headName={headName()} children={undefined}/>
</div>
<div className="col-span-1 max-h-full overflow-y-scroll">
<ScrollArea>
<PublicReuseFaciltyFormInsert></PublicReuseFaciltyFormInsert>
{/* <ScrollBar orientation="vertical"></ScrollBar> */}
<PublicReuseFaciltyFormInsert />
{/* <ScrollBar orientation="vertical"></ScrollBar> */}
</ScrollArea>
</div>
</div>
</>
)}
</div>
</>
)
}
+7 -5
View File
@@ -1,13 +1,15 @@
import { createStore } from 'zustand/vanilla';
import { pubFacActionsExport, pubFacStateExport, type pubFacState, type pubFacType } from './publicReuseFaciltyInsert/index';
import { buildingTableActionsExport, buildingtableStateExport, type buildingTableType } from './rainReuseFacilityInsert';
export type WrStore = pubFacType & buildingTableType;
export const StoreZus = (initState: pubFacState = pubFacStateExport) => {
import { pubFacActionsExport, pubFacStateExport, type pubFacState } from './publicReuseFaciltyInsert/index';
import { buildingTableActionsExport, buildingtableStateExport, type buildingTableState, type buildingTableType } from './rainReuseFacilityInsert';
export type WrStore = pubFacState & buildingTableType;
export const StoreZus = (initState: buildingTableState& pubFacState = {
...pubFacStateExport,
...buildingtableStateExport
}) => {
return createStore<WrStore>()((set) => {
return {
...initState,
...pubFacActionsExport(set),
...buildingtableStateExport,
...buildingTableActionsExport(set)
}
})
@@ -1,15 +1,14 @@
"use client";
import { SelectBox } from "@common/business_components";
import { FileUpload, UiTable } from "@common/business_components/ui";
import { Form, FormControl, FormDescription, FormField, FormItem, FormLabel, FormMessage } from "@common/business_components/ui/form";
import { Button, FileSearch, Input } from "@common/components";
import { Form, FormControl, FormField, FormItem, FormLabel, FormMessage } from "@common/business_components/ui/form";
import { Button, DatePicker, Input } 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/index";
import { SelectBox } from "@common/business_components";
import { DatePicker } from "@common/components";
const formSchema = z.object({
username: z.string().min(2).max(50),
@@ -17,11 +16,11 @@ const formSchema = z.object({
});
type typeOfForm = {
labelName: string;
type: string;
selectvlaue?: { text: string; val: string }[];
}
// type typeOfForm = {
// labelName: string;
// type: string;
// selectvlaue?: { text: string; val: string }[];
// }
export function PublicReuseFaciltyFormInsert() {
const { pubFac } = useWrStore((state) => state);
const { pubFacHeadList, publicReuseFacilityData} = pubFac;