Merge commit 'ed5fa161f56b2d0f34abaa138d7df04292e55f07' into iipbs/wr/form_fuction
iipbs_wr / build (push) Waiting to run
iipbs_wr / build (push) Waiting to run
This commit is contained in:
@@ -95,7 +95,7 @@ export default function Home() {
|
||||
<SearchDiv>
|
||||
<SearchFormLeft>
|
||||
<SearchInput
|
||||
className="col-span-3 my-7"
|
||||
className="col-span-3 my-7 !text-3xl"
|
||||
label="건물명"
|
||||
textValue={searchTxt || ""}
|
||||
setText={(e) => {
|
||||
@@ -104,8 +104,8 @@ export default function Home() {
|
||||
/>
|
||||
</SearchFormLeft>
|
||||
<SearchFormRight>
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button size={"sm"} onClick={()=>{initHtdfl(searchTxt||"")}}>조회</Button>
|
||||
<div className="flex flex-row space-x-2 items-center">
|
||||
<Button size={"sm"} onClick={()=>{initHtdfl(searchTxt||"")}}>조회</Button>
|
||||
<Button
|
||||
size={"sm"}
|
||||
onClick={() => setIsNewReg(!issNewReg)}
|
||||
@@ -119,8 +119,8 @@ export default function Home() {
|
||||
</div>
|
||||
|
||||
<div className="grid grid-cols-6 gap-4 ">
|
||||
<div className="col-span-4">
|
||||
<ListDiv>
|
||||
<div className="col-span-4 h-full min-h-0">
|
||||
<ListDiv className="min-h-0">
|
||||
<UiTable
|
||||
tableData={bdstTable || []}
|
||||
headlist={htdfl.upHeadList}
|
||||
@@ -133,9 +133,9 @@ export default function Home() {
|
||||
</UiTable>
|
||||
</ListDiv>
|
||||
</div>
|
||||
<div className="col-span-2 max-h-full">
|
||||
<div className="col-span-2 max-h-full">
|
||||
<ListDiv>
|
||||
<ScrollArea>
|
||||
<ScrollArea className="h-[60vh]">
|
||||
<HtdflRegForm
|
||||
htdflForm={htdflForm ?? ({} as customHtdflBdst)}
|
||||
isModal={false}
|
||||
@@ -145,25 +145,23 @@ export default function Home() {
|
||||
</div>
|
||||
</div>
|
||||
<UiModal
|
||||
body={<BdstReg moType="HTB"></BdstReg>}
|
||||
bodyClass="w-[68vw] max-w-none h-[90vh]"
|
||||
open={issNewReg}
|
||||
onOpenChange={(open) => {
|
||||
setIsNewReg(open);
|
||||
}}
|
||||
/>
|
||||
body={<BdstReg moType="HTB"></BdstReg>}
|
||||
bodyClass="w-[68vw] max-w-none h-[90vh]"
|
||||
open={issNewReg}
|
||||
onOpenChange={(open) => {
|
||||
setIsNewReg(open);
|
||||
}}
|
||||
/>
|
||||
|
||||
<UiModal
|
||||
bodyClass={""}
|
||||
open={bdstChgProps.isOpen}
|
||||
body={<BdstChgModal chgBuilding={bdstChgProps.chgBuilding}></BdstChgModal>}
|
||||
onOpenChange={(open) => {
|
||||
setBdstChgProps({ ...bdstChgProps, isOpen: open });
|
||||
}
|
||||
}
|
||||
/>
|
||||
|
||||
|
||||
<UiModal
|
||||
bodyClass={""}
|
||||
open={bdstChgProps.isOpen}
|
||||
body={<BdstChgModal chgBuilding={bdstChgProps.chgBuilding}></BdstChgModal>}
|
||||
onOpenChange={(open) => {
|
||||
setBdstChgProps({ ...bdstChgProps, isOpen: open });
|
||||
}
|
||||
}
|
||||
/>
|
||||
</ContentsDiv>
|
||||
</>
|
||||
);
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { rswtChkZodType, rswtrChkDetailsZodType } from "@/app/store/prfmncR
|
||||
import {
|
||||
excelArrayDownload,
|
||||
excelDownload,
|
||||
yearOptions,
|
||||
} from "@/components/lib/func/commom";
|
||||
import ChkgdExcel from "@/components/ui/modal/chkgd/chkgdExcel/chkgdExcel";
|
||||
import ChkgdModal from "@/components/ui/modal/chkgd/chkgdModal/chkgdModal";
|
||||
@@ -22,7 +23,7 @@ import {
|
||||
UiModal,
|
||||
} from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
|
||||
@@ -38,7 +39,7 @@ export default function Page() {
|
||||
rainChkExcelDownload,
|
||||
rainChkHeadChange,
|
||||
isRainSttn,
|
||||
|
||||
|
||||
rswtChkgdnInit,
|
||||
rswtChkDetilsUpdate,
|
||||
rswtChkDelete,
|
||||
@@ -48,7 +49,6 @@ export default function Page() {
|
||||
return state;
|
||||
});
|
||||
const [isRegExcel, setIsRegExcel] = useState(false);
|
||||
const [searchTxt, setSearchTxt] = useState<string>();
|
||||
const [updateRainDetail, setUpdateRainDetail] = useState<rainChkZodType[]>(
|
||||
[]
|
||||
);
|
||||
@@ -63,10 +63,10 @@ export default function Page() {
|
||||
data: {},
|
||||
});
|
||||
const cellClick = () => {
|
||||
if (searchTxt) rainChkInit(searchTxt, "0");
|
||||
if (searchYear) rainChkInit(searchYear, "0");
|
||||
};
|
||||
|
||||
|
||||
const [searchYear, setSearchYear] = useState<string>(String(new Date().getFullYear()));
|
||||
|
||||
useEffect(() => {
|
||||
if (!rainChkgdn.isInit) {
|
||||
@@ -126,67 +126,70 @@ export default function Page() {
|
||||
);
|
||||
|
||||
useEffect(() => {
|
||||
rainChkgdn.isSttn=false
|
||||
rswtChkgdn.isSttn=false
|
||||
if (!rainChkgdn.isSttn &&!rswtChkgdn.isSttn) {
|
||||
rainChkHeadChange({rainChkgdn}, true);
|
||||
rswtChkHeadChange({rswtChkgdn}, true);
|
||||
rainChkgdn.isSttn = false
|
||||
rswtChkgdn.isSttn = false
|
||||
if (!rainChkgdn.isSttn && !rswtChkgdn.isSttn) {
|
||||
rainChkHeadChange({ rainChkgdn }, true);
|
||||
rswtChkHeadChange({ rswtChkgdn }, true);
|
||||
}
|
||||
}, [rainChkgdn.isSttn ,rswtChkgdn.isSttn]);
|
||||
|
||||
}, [rainChkgdn.isSttn, rswtChkgdn.isSttn]);
|
||||
|
||||
|
||||
|
||||
|
||||
const clickDelete = (data: number[],selFcltDiv:string) => {
|
||||
const clickDelete = (data: number[], selFcltDiv: string) => {
|
||||
if (data.length > 0) {
|
||||
if(selFcltDiv === "RNB"){
|
||||
if (selFcltDiv === "RNB") {
|
||||
rainChkDelete(data);
|
||||
}else{
|
||||
} else {
|
||||
rswtChkDelete(data)
|
||||
}
|
||||
}
|
||||
};
|
||||
const chkUpdateTable =(selFcltDiv:string) =>{
|
||||
if(selFcltDiv === "RNB"){
|
||||
const chkUpdateTable = (selFcltDiv: string) => {
|
||||
if (selFcltDiv === "RNB") {
|
||||
|
||||
rainChkDetilUpdate(updateRainDetail)
|
||||
}else{
|
||||
} else {
|
||||
|
||||
rswtChkDetilsUpdate(updateRswtDetail)
|
||||
rswtChkDetilsUpdate(updateRswtDetail)
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
return (
|
||||
<ContentsDiv>
|
||||
<div className="grid grid-cols-4 gap-4 ">
|
||||
<div className="col-span-4">
|
||||
<Title title={"지도점검 결과 등록 "} />
|
||||
<Title title={"지도점검 결과 등록"} />
|
||||
<SearchDiv>
|
||||
<SearchFormLeft>
|
||||
<SearchInput
|
||||
className="col-span-3 my-7 !text-xl"
|
||||
label=" 지도점검년도"
|
||||
textValue={searchTxt ?? ""}
|
||||
setText={(e) => {
|
||||
setSearchTxt(e);
|
||||
}}
|
||||
/>
|
||||
<SelectBox
|
||||
className={"col-span-3 w-full h-full text-2xl"}
|
||||
label={"시설구분"}
|
||||
selectClass={""}
|
||||
selectArray={rainChkgdn.fcltDiv}
|
||||
onSelectValue={(val: string | number) =>
|
||||
setSelFcltDiv(String(val))
|
||||
}
|
||||
value={selFcltDiv ?? rainChkgdn.fcltDiv[0]?.val}
|
||||
/>
|
||||
<div className="col-span-2 flex flex-row space-x-2">
|
||||
<Label className="w-48 mt-2 text-xl text-gray-600">{'지도점검년도'}</Label>
|
||||
<SelectBox
|
||||
className="w-full h-full text-2xl"
|
||||
label=""
|
||||
selectClass={""}
|
||||
selectArray={yearOptions}
|
||||
value={searchYear}
|
||||
onSelectValue={(val: string | number) =>
|
||||
setSearchYear(String(val))
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2 flex flex-row space-x-2">
|
||||
<Label className="w-28 mt-2 text-xl text-gray-600">{'시설구분'}</Label>
|
||||
<SelectBox
|
||||
className={"w-full h-full text-2xl"}
|
||||
label={""}
|
||||
selectClass={""}
|
||||
selectArray={rainChkgdn.fcltDiv}
|
||||
onSelectValue={(val: string | number) =>
|
||||
setSelFcltDiv(String(val))
|
||||
}
|
||||
value={selFcltDiv ?? rainChkgdn.fcltDiv[0]?.val}
|
||||
/>
|
||||
</div>
|
||||
</SearchFormLeft>
|
||||
<SearchFormRight>
|
||||
<SearchFormRight
|
||||
className="w-2/12 mx-5 flex flex-col items-center justify-center space-x-2 ">
|
||||
<div className="space-y">
|
||||
<div className="flex flex-row space-x-2">
|
||||
<Button
|
||||
@@ -200,7 +203,7 @@ export default function Page() {
|
||||
<Button
|
||||
size={"sm"}
|
||||
onClick={() => {
|
||||
clickDelete( deleteIdx,selFcltDiv);
|
||||
clickDelete(deleteIdx, selFcltDiv);
|
||||
}}
|
||||
>
|
||||
삭제
|
||||
@@ -213,8 +216,6 @@ export default function Page() {
|
||||
>
|
||||
저장
|
||||
</Button>
|
||||
</div>
|
||||
<div className="flex flex-row space-x-2 pt-3">
|
||||
<Button
|
||||
size={"sm"}
|
||||
onClick={() => {
|
||||
@@ -249,7 +250,7 @@ export default function Page() {
|
||||
handleRswtClick={handleClick}
|
||||
rswtChkData={rswtChkgdn.rswtChkRes}
|
||||
/>
|
||||
) }
|
||||
)}
|
||||
</ListDiv>
|
||||
</div>
|
||||
</div>
|
||||
@@ -264,7 +265,7 @@ export default function Page() {
|
||||
<UiModal
|
||||
open={isRegExcel}
|
||||
onOpenChange={setIsRegExcel}
|
||||
bodyClass={"w-[40vw] max-w-none"}
|
||||
bodyClass={"w-[30vw] max-w-none"}
|
||||
body={<ChkgdExcel type={selFcltDiv}></ChkgdExcel>}
|
||||
/>
|
||||
<Toaster position="top-center" />
|
||||
|
||||
@@ -6,6 +6,7 @@ import type { rswtChkZodType } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn
|
||||
import {
|
||||
excelArrayDownload,
|
||||
excelDownload,
|
||||
yearOptions,
|
||||
} from "@/components/lib/func/commom";
|
||||
import ChkgdExcel from "@/components/ui/modal/chkgd/chkgdExcel/chkgdExcel";
|
||||
import ChkgdModal from "@/components/ui/modal/chkgd/chkgdModal/chkgdModal";
|
||||
@@ -22,7 +23,7 @@ import {
|
||||
UiModal,
|
||||
} from "@common/business_components/ui";
|
||||
import ListDiv from "@common/business_components/ui/list_div";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { Button, Label } from "@common/components/ui";
|
||||
import { useCallback, useEffect, useState } from "react";
|
||||
import { Toaster } from "react-hot-toast";
|
||||
|
||||
@@ -42,14 +43,15 @@ export default function Page() {
|
||||
} = useWrStore((state) => {
|
||||
return state;
|
||||
});
|
||||
const [searchTxt, setSearchTxt] = useState<string>();
|
||||
|
||||
const [selFcltDiv, setSelFcltDiv] = useState("RNB");
|
||||
const [isModal, setIsModal] = useState({
|
||||
open: false,
|
||||
data: {},
|
||||
});
|
||||
const [searchYear, setSearchYear] = useState<string>(String(new Date().getFullYear()));
|
||||
const cellClick = () => {
|
||||
if (searchTxt) rainChkSttnSearch(searchTxt, "0");
|
||||
if (searchYear) rainChkSttnSearch(searchYear, "0");
|
||||
};
|
||||
|
||||
useEffect(() => {
|
||||
@@ -103,24 +105,32 @@ const excelDown=() =>{
|
||||
<Title title={"지도점검 결과 현황"} />
|
||||
<SearchDiv>
|
||||
<SearchFormLeft>
|
||||
<SearchInput
|
||||
className="col-span-3 my-7 !text-xl"
|
||||
label=" 지도점검년도"
|
||||
textValue={searchTxt ?? ""}
|
||||
setText={(e) => {
|
||||
setSearchTxt(e);
|
||||
}}
|
||||
/>
|
||||
<SelectBox
|
||||
className={"col-span-3 w-full h-full text-2xl"}
|
||||
label={"시설구분"}
|
||||
selectClass={""}
|
||||
selectArray={rainChkSttn.fcltDiv}
|
||||
onSelectValue={(val: string | number) =>
|
||||
<div className="col-span-2 flex flex-row space-x-2">
|
||||
<Label className="w-48 mt-2 text-xl text-gray-600">{'지도점검년도'}</Label>
|
||||
<SelectBox
|
||||
className="w-full h-full text-2xl"
|
||||
label=""
|
||||
selectClass={""}
|
||||
selectArray={yearOptions}
|
||||
value={searchYear}
|
||||
onSelectValue={(val: string | number) =>
|
||||
setSearchYear(String(val))
|
||||
}
|
||||
/>
|
||||
</div>
|
||||
<div className="col-span-2 flex flex-row space-x-2">
|
||||
<Label className="w-28 mt-2 text-xl text-gray-600">{'시설구분'}</Label>
|
||||
<SelectBox
|
||||
className={"w-full h-full text-2xl"}
|
||||
label={""}
|
||||
selectClass={""}
|
||||
selectArray={rainChkSttn.fcltDiv}
|
||||
onSelectValue={(val: string | number) =>
|
||||
setSelFcltDiv(String(val))
|
||||
}
|
||||
value={selFcltDiv ?? rainChkSttn.fcltDiv[0]?.val}
|
||||
/>
|
||||
/>
|
||||
</div>
|
||||
</SearchFormLeft>
|
||||
<SearchFormRight>
|
||||
<div className="space-y">
|
||||
@@ -133,8 +143,6 @@ const excelDown=() =>{
|
||||
>
|
||||
조회
|
||||
</Button>
|
||||
</div>
|
||||
<div className="flex flex-row space-x-2 pt-3">
|
||||
<Button color="green" size={"sm"} onClick={(e) =>{excelDown()}}>
|
||||
다운로드
|
||||
</Button>
|
||||
|
||||
Reference in New Issue
Block a user