Merge commit 'f592ab31d86a86ce305ce8b4a65170340d03186a' into iipbs/wr/hasuReg
iipbs_wr / build (push) Waiting to run
iipbs_wr / build (push) Waiting to run
This commit is contained in:
@@ -1,16 +1,14 @@
|
||||
import { useWrStore } from "@/app/store";
|
||||
import { ScrollArea, Title } from "@common/business_components/ui";
|
||||
import { Button } from "@common/components/ui";
|
||||
import { useEffect, useState } from "react";
|
||||
import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/TableHead";
|
||||
import { GuideDetailsTable } from "@/components/ui/table/chkgdTable/guideDetailTable/guideDetailTable";
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
import type { splRuseWaterType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
|
||||
import type { rswtrPolutionsZode } from "@/app/store/prfmncReg/chkgdnReg/rswrtChkgdn/headList";
|
||||
import { GuideDetailsTable } from "@/components/ui/table/chkgdTable/guideDetailTable/guideDetailTable";
|
||||
import { ScrollArea, Title } from "@common/business_components/ui";
|
||||
import { Button } from "@common/components/ui";
|
||||
import React, { useEffect, useState } from "react";
|
||||
import type { z } from "zod";
|
||||
import React from "react";
|
||||
import type { TableUpperProps } from "@/app/store/common/type/header";
|
||||
|
||||
export default function ChkgdModal({ type, obj ,setIsModal }: { type: string; obj: any , setIsModal:(open:boolean)=>void}) {
|
||||
export default function ChkgdModal({ type, obj, setIsModal }: { type: string; obj: any, setIsModal: (open: boolean) => void }) {
|
||||
const {
|
||||
rainChkgdn,
|
||||
rswtChkgdn,
|
||||
@@ -253,7 +251,8 @@ export default function ChkgdModal({ type, obj ,setIsModal }: { type: string; ob
|
||||
</div>
|
||||
<div className="flex justify-between">
|
||||
<h3 className="text-2xl font-bold text-gray-900 mt-2 ml-6">
|
||||
{`(${obj.bdstNm})`}
|
||||
{type === "RNB"
|
||||
? `(${obj.bdstNm})` : `(${obj.building.bdstNm})`}
|
||||
</h3>
|
||||
{!rainChkSttn.isSttn ? (
|
||||
<Button className="" onClick={allDataUpdate}>
|
||||
@@ -273,7 +272,7 @@ export default function ChkgdModal({ type, obj ,setIsModal }: { type: string; ob
|
||||
<GuideDetailsTable
|
||||
chgRes={guidData || []}
|
||||
headList={headList.splHeadList}
|
||||
upheadList={type === "RNB"? rainChkgdn.rainSplHeadNm :rswtChkgdn.rswtSplHeadNm}
|
||||
upheadList={type === "RNB" ? rainChkgdn.rainSplHeadNm : rswtChkgdn.rswtSplHeadNm}
|
||||
type={""}
|
||||
setChGuidData={(data) => {
|
||||
setChGuidData(data);
|
||||
@@ -287,7 +286,7 @@ export default function ChkgdModal({ type, obj ,setIsModal }: { type: string; ob
|
||||
<GuideDetailsTable
|
||||
chgRes={guidData || []}
|
||||
headList={headList.ruseHeadList}
|
||||
upheadList={type === "RNB"? rainChkgdn.rainRuseHeadNm :rswtChkgdn.rswtRuseHeadNm}
|
||||
upheadList={type === "RNB" ? rainChkgdn.rainRuseHeadNm : rswtChkgdn.rswtRuseHeadNm}
|
||||
type={""}
|
||||
setChGuidData={(data) => {
|
||||
setChGuidData(data);
|
||||
|
||||
@@ -25,6 +25,7 @@ export default function RainChkgdTable({
|
||||
rainChkData,
|
||||
pageNation,
|
||||
onPageChange,
|
||||
pageCount,
|
||||
}: {
|
||||
detailUp: (data: rainChkZodType[]) => void;
|
||||
handleClick?: (data: any) => void;
|
||||
@@ -32,6 +33,7 @@ export default function RainChkgdTable({
|
||||
rainChkData?: rainChkZodType[];
|
||||
pageNation: number;
|
||||
onPageChange: (page: number) => void;
|
||||
pageCount: number;
|
||||
}) {
|
||||
const { code, rainChkgdn, rainChkSttn, getRainSttnExcel } = useWrStore((state) => state);
|
||||
const [makeTableData, setMakeTableData] = useState<any[]>([]);
|
||||
@@ -74,7 +76,7 @@ export default function RainChkgdTable({
|
||||
|
||||
useEffect(() => {
|
||||
setSelectedIds([])// 셀렉트 초기화를 위한 작업
|
||||
if (rainChkData&&rainChkData.length>0) {
|
||||
if (rainChkData && rainChkData.length > 0) {
|
||||
|
||||
const rainChg = rainChkData?.map((item: any) => {
|
||||
const bud = tableData([item.building], { code });
|
||||
@@ -86,7 +88,7 @@ export default function RainChkgdTable({
|
||||
});
|
||||
|
||||
setMakeTableData(rainChkTableData(rainChg));
|
||||
}else{
|
||||
} else {
|
||||
setMakeTableData([]);
|
||||
}
|
||||
}, [rainChkData, code]);
|
||||
@@ -170,14 +172,8 @@ export default function RainChkgdTable({
|
||||
})
|
||||
|
||||
}
|
||||
|
||||
}, [rainChkSttn.isSttn, rainChkgdn.rainChkgdnHeadList, rainChkSttn.rainChkgdnHeadList]);
|
||||
|
||||
|
||||
useEffect(() =>{
|
||||
console.log('rainChkgdn.count ', rainChkgdn.rainChkCount)
|
||||
},[rainChkgdn.rainChkCount])
|
||||
|
||||
return (
|
||||
<>
|
||||
<LoadingOverlay isLoading={rainChkgdn.isLoading}></LoadingOverlay>
|
||||
@@ -202,7 +198,7 @@ export default function RainChkgdTable({
|
||||
</TableBody>
|
||||
</Table>
|
||||
<UiPageNations
|
||||
total={rainChkgdn.rainChkCount||20}
|
||||
total={pageCount}
|
||||
cur={pageNation}
|
||||
pageSize={rainPageSize}
|
||||
onPageChange={onPageChange}
|
||||
|
||||
@@ -25,6 +25,7 @@ export default function RswtChkgdTable({
|
||||
rswtChkData,
|
||||
pageNation,
|
||||
onPageChange,
|
||||
pageCount,
|
||||
}: {
|
||||
detaiRswtlUpdate: (data: rswtrChkDetailsZodType[]) => void;
|
||||
handleRswtClick?: (data: any) => void;
|
||||
@@ -32,6 +33,7 @@ export default function RswtChkgdTable({
|
||||
rswtChkData: rswtChkZodType[];
|
||||
pageNation: number;
|
||||
onPageChange: (page: number) => void;
|
||||
pageCount: number;
|
||||
}) {
|
||||
const { code, rswtChkgdn, rswtChkSttn, rswtChkgdnInit, rswtChkPolAndGuide, getRswtSttnExcel } = useWrStore(
|
||||
(state) => state
|
||||
@@ -152,7 +154,7 @@ export default function RswtChkgdTable({
|
||||
</TableBody>
|
||||
</Table>
|
||||
<UiPageNations
|
||||
total={rswtChkgdn.rswtChkCount}
|
||||
total={pageCount}
|
||||
cur={pageNation}
|
||||
pageSize={rswtPageSize}
|
||||
onPageChange={onPageChange}
|
||||
|
||||
Reference in New Issue
Block a user