빌드에러 수정중 /시설현황 잡아야함

This commit is contained in:
leedj312
2025-07-14 14:11:59 +09:00
parent 57eb6c59ba
commit 802204fa67
6 changed files with 47 additions and 61 deletions
@@ -33,9 +33,7 @@ import { writeRgtrAndMdfr } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg";
import { useFieldArray, useForm, type FieldErrors } from "react-hook-form"; // FieldErrors 타입 추가
import { zodResolver } from "@hookform/resolvers/zod";
import { z } from "zod";
import { createDefaultPbnstItem } from "./utilsZod";
import { flushSync } from "react-dom";
export default function PublicReuseFaciltyInsert() {
const {
@@ -49,7 +47,7 @@ export default function PublicReuseFaciltyInsert() {
pbnstRuseBizUpdate,
} = useWrStore((state) => state);
const { pubFacHeadList, pbnstHasuRes, pbnstRes } = pbnst;
const [currentTab, setCurrentTab] = useState<string>("mng");
const [, setCurrentTab] = useState<string>("mng");
const [isRuseReg, setIsRuseReg] = useState<{
isModal: boolean;
}>({ isModal: false });
@@ -278,11 +276,15 @@ export default function PublicReuseFaciltyInsert() {
<Button
className=""
size={"sm"}
onClick={(e) => {
searchTxt && searchTxt?.length > 0
? pubHasuSearch(String(pageNation), "41", searchTxt)
: pubHasuInit(String(pageNation), "41");
isResetPage(true);
onClick={() => {
if(searchTxt && searchTxt?.length > 0) {
pubHasuSearch(String(pageNation), "41", searchTxt)
}else{
pubHasuInit(String(pageNation), "41");
}
isResetPage(true);
}}
>
조회
@@ -324,7 +326,6 @@ export default function PublicReuseFaciltyInsert() {
headName={"공공 하수처리시설 목록"}
cellClick={cellClick}
onPageChange={setPageNation}
children={undefined}
resetPageNo={resetPage}
/>
</ScrollArea>
@@ -18,7 +18,6 @@ import { useCallback, useEffect, useRef, useState } from "react";
import { HeadMakeColSpan } from "@common/business_components/ui/table/HeadMakeColSpan";
import type { customPbnst } from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
import { excelDownload, yearOptions } from "@/components/lib/func/commom";
import SearchInputText from "@/components/ui/searchInput/searchInput";
import type { WaterReuseFacility } from "@/app/store/ruseFcltMng/fcltSttn/pbnstSttn/type";
import { PbnstSttnModal } from "@/components/ui/modal/sttn/pbnstSttnModal/pbnstSttnModal";
@@ -29,7 +28,6 @@ export default function PbnstSttn() {
pbnstSttnSearch,
pbnSttnInit,
getPbnStnDetail,
pbnNmSearch,
getFlcts
} = useWrStore((state) => state);
@@ -13,7 +13,6 @@ import {
fcBizSchema,
type fcBizType,
type PbnstRegArrrayType,
type ppInstlType,
} from "@/app/store/ruseFcltMng/fcltReg/pbnstReg/type";
import { selectClass } from "@/app/store/ruseFcltMng/fcltReg/rainReg";
import {
@@ -2,13 +2,13 @@
import { useWrStore } from "@/app/store";
import type { rateFeeType } from "@/app/store/common/searchCode/type";
import { UiTable } from "@common/business_components/ui";
import { UiTable } from "@common/business_components/ui";
import ListDiv from "@common/business_components/ui/list_div";
import { Input, Label } from "@common/components/ui";
import { Label } from "@common/components/ui";
import { useEffect, useState } from "react";
export function RateFeeTableModal() {
const { coRvw, rateFeeRes } = useWrStore((state) => state);
const { coRvw, rateFeeRes } = useWrStore((state) => state);
const [reateFeeTable, setRateFeeTable] = useState<rateFeeType[]>([]);
const gubunLabelMap: Record<number, string> = {
@@ -32,32 +32,32 @@ export function RateFeeTableModal() {
};
const fetchData = async (rateFeeRes: rateFeeType[]) => {
const data = await rateFeeRes?.filter((item: rateFeeType) => {
return item.incExpCd !== "SS";
})
.reduce((acc: any, cur: rateFeeType) => {
const key = cur.stdCost;
let target = acc.find((item: any) => item.stdCost === key);
if (!target) {
target = {
stdCost: cur.stdCost,
BD: 0,
SE: 0,
CE: 0,
};
acc.push(target);
}
target[cur.incExpCd] = cur.rt;
return acc;
}, []);
const data = await rateFeeRes
?.filter((item: rateFeeType) => {
return item.incExpCd !== "SS";
})
.reduce((acc: any, cur: rateFeeType) => {
const key = cur.stdCost;
let target = acc.find((item: any) => item.stdCost === key);
if (!target) {
target = {
stdCost: cur.stdCost,
BD: 0,
SE: 0,
CE: 0,
};
acc.push(target);
}
target[cur.incExpCd] = cur.rt;
return acc;
}, []);
const dataGubun = data?.map((item: any) => {
return {
...item,
gubun: gubunLabelMap[item.stdCost] || item.stdCost,
};
})
});
return dataGubun?.sort((a: any, b: any) => a.stdCost - b.stdCost);
};
@@ -81,26 +81,20 @@ export function RateFeeTableModal() {
<div className="col-span-5 flex items-center">
<Label className=" text-xl text-gray-600">기준년도</Label>
<Input
className="col-span-1 text-2xl text-right ml-2 w-32"
placeholder=""
type="text"
onChange={(e) => {}}
value={new Date().getFullYear() || ""}
/>
<span>{new Date().getFullYear() || ""}</span>
</div>
<div className="col-span-6 pr-6">
<UiTable
className="min-w-full pr-12"
key={"rateTable" + reateFeeTable?.length}
headName={""}
tableData={reateFeeTable || []}
headlist={coRvw.rateFeeHeadList}
onPageChange={() => {}}
pageSize={0}
total={0}
cellClick={undefined}
/>
<UiTable
className="min-w-full pr-12"
key={"rateTable" + reateFeeTable?.length}
headName={""}
tableData={reateFeeTable || []}
headlist={coRvw.rateFeeHeadList}
onPageChange={() => {}}
pageSize={0}
total={0}
cellClick={undefined}
/>
</div>
</div>
</ListDiv>
@@ -1,26 +1,21 @@
"use client";
import { headMakeprfmnc } from "@/app/ruseFcltMng/prfmncReg/chkgdnReg/TableHead";
import { useWrStore } from "@/app/store";
import type { TableUpperProps } from "@/app/store/common/type/header";
import type {
} from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn";
import type { chHeadType } from "@/app/store/prfmncReg/chkgdnReg/rainChkgdn/headList";
import { InputTableBody } from "@/components/lib/func/TableData";
import {
Input,
Table,
TableBody,
TableCell,
TableHeader,
TableRow,
} from "@common/components/ui";
import { useEffect, useState, type Dispatch, type SetStateAction } from "react";
import { useEffect, useState } from "react";
export function GuideDetailsTable({
chgRes,
headList,
upheadList,
type,
setChGuidData,
}: {
chgRes: any[];
@@ -29,7 +24,6 @@ export function GuideDetailsTable({
type: string;
setChGuidData: (chgRes: any[]) => void;
}) {
const { code, rainChkgdn } = useWrStore((state) => state);
const [inputData, setInputData] = useState<any[]>();
useEffect(() => {
@@ -35,7 +35,7 @@ export default function RswtChkgdTable({
onPageChange: (page: number) => void;
pageCount: number;
}) {
const { code, rswtChkgdn, rswtChkSttn, rswtChkgdnInit, rswtChkPolAndGuide, getRswtSttnExcel } = useWrStore(
const { code, rswtChkgdn, rswtChkSttn, rswtChkPolAndGuide, getRswtSttnExcel } = useWrStore(
(state) => state
);
const [headList, setHeadList] = useState<{ headList: TableUpperProps[], upHeadList: chHeadType[] }>({ headList: [], upHeadList: [] });