store 정리
search
This commit is contained in:
+5
-5
@@ -1,11 +1,10 @@
|
||||
'use client'
|
||||
|
||||
import {ScrollArea, ScrollBar, SearchDiv, SelectBox, UiTable } from '@common/business_components';
|
||||
import { Button, TableRow } from '@common/components';
|
||||
import { TableHead } from '@common/components';
|
||||
import { ScrollArea, SearchDiv, SelectBox, UiTable } from '@common/business_components';
|
||||
import { Button, TableHead, TableRow } from '@common/components';
|
||||
import { PublicReuseFaciltyFormInsert } from '../../../../components/ui/publicReuseInsertForm';
|
||||
import { useWrStore } from '../../../store';
|
||||
import type { TableUpperProps } from '../../../store/publicReuseFaciltyInsert';
|
||||
import { PublicReuseFaciltyFormInsert } from '../../../../components/ui/publicReuseInsertForm';
|
||||
|
||||
|
||||
|
||||
@@ -28,7 +27,8 @@ import { PublicReuseFaciltyFormInsert } from '../../../../components/ui/publicR
|
||||
|
||||
|
||||
export default function PublicReuseFaciltyInsert() {
|
||||
const { upHeadList, publicReuseFacilityUper} = useWrStore((state) => state);
|
||||
const {building} = useWrStore((state) => state);
|
||||
const { upHeadList, publicReuseFacilityUper} = building;
|
||||
const nodeList= headMakeColSpan(upHeadList);
|
||||
const total = 100;
|
||||
|
||||
|
||||
+50
-49
@@ -2,62 +2,63 @@
|
||||
import { useWrStore } from "@/app/store";
|
||||
import type { TableUpperProps } from "@/app/store/publicReuseFaciltyInsert";
|
||||
import { RainReuseFaciltyInsertForm } from "@/components/ui/rainReuseInsertForm";
|
||||
import { SearchDiv, SelectBox, UiTable } from "@common/business_components";
|
||||
import { SearchDiv, SearchInput, UiTable } from "@common/business_components";
|
||||
import { Button, TableHead, TableRow } from "@common/components";
|
||||
|
||||
|
||||
const headMakeColSpan = (upHeadList: TableUpperProps[]) => {
|
||||
return ( <>
|
||||
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={3}>{'중축 개축 증축 '}</TableHead>:null))}
|
||||
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={3}>{'중축 개축 증축 '}</TableHead> : null))}
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
{upHeadList.map((head: TableUpperProps) =>
|
||||
(head.upName === 'upChangeRe'?<TableHead key={head.id}>{head.title}</TableHead>:null))}
|
||||
(head.upName === 'upChangeRe' ? <TableHead key={head.id}>{head.title}</TableHead> : null))}
|
||||
</TableRow>
|
||||
</> )
|
||||
}
|
||||
|
||||
|
||||
export default function Home (){
|
||||
const { building } = useWrStore((state) => state);
|
||||
const nodeList= headMakeColSpan(building.upHeadList);
|
||||
const total = 100;
|
||||
|
||||
|
||||
const selectBox = [{text:'서울', value:'대전'}]
|
||||
const headName= ()=>{
|
||||
return(
|
||||
<h1 className="pl-3 text-xl">○건축물 목록</h1>
|
||||
)
|
||||
}
|
||||
|
||||
return(
|
||||
<>
|
||||
{/* <div>
|
||||
<h1 className="pl-3 text-2xl mr-2" >빗물이용시설 등록 </h1>
|
||||
<SearchDiv >
|
||||
<SelectBox className="pl-3 mr-3" label="시군구" selectArray={selectBox} />
|
||||
<Button className ='mr-2' size='sm'>조회</Button>
|
||||
<Button className ='mr-2' size='sm'>저장</Button>
|
||||
<Button className ='mr-2' size='sm'>신규등록</Button>
|
||||
</SearchDiv>
|
||||
</div> */}
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
|
||||
<div className="colsapn-1 ">
|
||||
<UiTable publicReuseFacility={building.buildingObject} headlist={building.upHeadList} pageSize={100} total={total} headName={headName()}>
|
||||
{nodeList}
|
||||
</UiTable>
|
||||
</div>
|
||||
<div className="colsapn-1 ovreflow-y">
|
||||
<RainReuseFaciltyInsertForm></RainReuseFaciltyInsertForm>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
</>)
|
||||
}
|
||||
|
||||
|
||||
export default function Home() {
|
||||
const { building } = useWrStore((state) => state);
|
||||
const nodeList = headMakeColSpan(building.upHeadList);
|
||||
const total = 100;
|
||||
|
||||
|
||||
const headName = () => {
|
||||
return (
|
||||
<h1 className="pl-3 text-xl">○건축물 목록</h1>
|
||||
)
|
||||
}
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<h1 className="pl-3 text-2xl mr-2" >빗물이용시설 등록 </h1>
|
||||
<SearchDiv >
|
||||
<div>
|
||||
<SearchInput className="pl-3 mr-3" label="시군구" />
|
||||
</div>
|
||||
<div>
|
||||
<Button className='mr-2' size='sm'>조회</Button>
|
||||
<Button className='mr-2' size='sm'>저장</Button>
|
||||
<Button className='mr-2' size='sm'>신규등록</Button>
|
||||
</div>
|
||||
</SearchDiv>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
|
||||
<div className="colsapn-1 ">
|
||||
<UiTable publicReuseFacility={building.buildingObject} headlist={building.upHeadList} pageSize={100} total={total} headName={headName()}>
|
||||
{nodeList}
|
||||
</UiTable>
|
||||
</div>
|
||||
<div className="colsapn-1 ovreflow-y">
|
||||
<RainReuseFaciltyInsertForm></RainReuseFaciltyInsertForm>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
+48
-45
@@ -2,62 +2,65 @@
|
||||
import { useWrStore } from "@/app/store";
|
||||
import type { TableUpperProps } from "@/app/store/publicReuseFaciltyInsert";
|
||||
import { RswtrReuseFaciltyInsertForm } from "@/components/ui/rswtrReuseFacilityInsetForm";
|
||||
import { SearchDiv, SelectBox, UiTable } from "@common/business_components";
|
||||
import { SearchDiv, SearchInput, UiTable } from "@common/business_components";
|
||||
import { Button, TableHead, TableRow } from "@common/components";
|
||||
|
||||
|
||||
const headMakeColSpan = (upHeadList: TableUpperProps[]) => {
|
||||
return ( <>
|
||||
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={3}>{'중축 개축 증축 '}</TableHead>:null))}
|
||||
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={3}>{'중축 개축 증축 '}</TableHead> : null))}
|
||||
</TableRow>
|
||||
<TableRow>
|
||||
{upHeadList.map((head: TableUpperProps) =>
|
||||
(head.upName === 'upChangeRe'?<TableHead key={head.id}>{head.title}</TableHead>:null))}
|
||||
(head.upName === 'upChangeRe' ? <TableHead key={head.id}>{head.title}</TableHead> : null))}
|
||||
</TableRow>
|
||||
</> )
|
||||
</>)
|
||||
}
|
||||
|
||||
|
||||
export default function Home() {
|
||||
const {pubFac} = useWrStore((state) => state);
|
||||
const { upHeadList, publicReuseFacilityUper} = pubFac;
|
||||
const nodeList = headMakeColSpan(upHeadList);
|
||||
const total = 100;
|
||||
|
||||
|
||||
const headName = () => {
|
||||
return (
|
||||
<h1 className="pl-3 text-xl">○건축물 목록</h1>
|
||||
)
|
||||
}
|
||||
|
||||
return (
|
||||
<>
|
||||
<div>
|
||||
<h1 className="pl-3 text-2xl mr-2" >빗물이용시설 등록 </h1>
|
||||
<SearchDiv>
|
||||
<div className="w-9/10">
|
||||
<SearchInput className="pl-3 mr-3" label="시군구" />
|
||||
</div>
|
||||
<div className="flex items-center justify-end w-1/10">
|
||||
<Button className='mr-2' size='sm'>조회</Button>
|
||||
<Button className='mr-2' size='sm'>저장</Button>
|
||||
<Button className='mr-2' size='sm'>신규등록</Button>
|
||||
</div>
|
||||
</SearchDiv>
|
||||
</div>
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
|
||||
export default function Home (){
|
||||
const { building } = useWrStore((state) => state);
|
||||
const nodeList= headMakeColSpan(building.upHeadList);
|
||||
const total = 100;
|
||||
|
||||
|
||||
const selectBox = [{text:'서울', value:'대전'}]
|
||||
const headName= ()=>{
|
||||
return(
|
||||
<h1 className="pl-3 text-xl">○건축물 목록</h1>
|
||||
)
|
||||
}
|
||||
|
||||
return(
|
||||
<>
|
||||
{/* <div>
|
||||
<h1 className="pl-3 text-2xl mr-2" >빗물이용시설 등록 </h1>
|
||||
<SearchDiv >
|
||||
<SelectBox className="pl-3 mr-3" label="시군구" selectArray={selectBox} />
|
||||
<Button className ='mr-2' size='sm'>조회</Button>
|
||||
<Button className ='mr-2' size='sm'>저장</Button>
|
||||
<Button className ='mr-2' size='sm'>신규등록</Button>
|
||||
</SearchDiv>
|
||||
</div> */}
|
||||
<div className="grid grid-cols-2 gap-4">
|
||||
<div className="colsapn-1">
|
||||
<UiTable publicReuseFacility={publicReuseFacilityUper} headlist={upHeadList} pageSize={100} total={total} headName={headName()}>
|
||||
{nodeList}
|
||||
</UiTable>
|
||||
</div>
|
||||
<div className="colsapn-1 h-full">
|
||||
<RswtrReuseFaciltyInsertForm></RswtrReuseFaciltyInsertForm>
|
||||
</div>
|
||||
|
||||
<div className="colsapn-1">
|
||||
<UiTable publicReuseFacility={building.buildingObject} headlist={building.upHeadList} pageSize={100} total={total} headName={headName()}>
|
||||
{nodeList}
|
||||
</UiTable>
|
||||
</div>
|
||||
<div className="colsapn-1 h-full">
|
||||
<RswtrReuseFaciltyInsertForm></RswtrReuseFaciltyInsertForm>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
</div>
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
@@ -62,32 +62,32 @@ const publicReuseFacilityUper:PublicReuseFacility[] = [
|
||||
},
|
||||
]
|
||||
|
||||
export type tableState = {
|
||||
export type tableState = {pubFac:{
|
||||
isInit: boolean;
|
||||
upHeadList: TableUpperProps[];
|
||||
publicReuseFacilityUper: PublicReuseFacility[];
|
||||
}
|
||||
}}
|
||||
type tableActions = {
|
||||
decrementList: () => void
|
||||
}
|
||||
|
||||
export type tableType = tableState & tableActions;
|
||||
|
||||
export const tableStateExport:tableState= {
|
||||
export const tableStateExport:tableState= {pubFac:{
|
||||
isInit:false,
|
||||
upHeadList: upHeadList,
|
||||
publicReuseFacilityUper: publicReuseFacilityUper,
|
||||
}
|
||||
}}
|
||||
export const tableActionsExport:(set:any)=>tableActions=(set: any) => {
|
||||
return {
|
||||
decrementList:()=>set(
|
||||
(state:tableState) => {
|
||||
return (
|
||||
{
|
||||
upHeadList: state.upHeadList,
|
||||
{pubFac:{
|
||||
upHeadList: state.pubFac.upHeadList,
|
||||
publicReuseFacilityUper:
|
||||
state.publicReuseFacilityUper.slice(0, state.publicReuseFacilityUper.length - 1)
|
||||
})}
|
||||
state.pubFac.publicReuseFacilityUper.slice(0, state.pubFac.publicReuseFacilityUper.length - 1)
|
||||
}})}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -8,6 +8,7 @@ export default {
|
||||
content: [
|
||||
"./app/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"../../packages/common/components/src/ui/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
"../../packages/common/business_components/src/ui/**/*.{js,ts,jsx,tsx,mdx}",
|
||||
],
|
||||
plugins: [require("tailwindcss-animate")],
|
||||
theme: {
|
||||
|
||||
Reference in New Issue
Block a user