From cc4e3ea0cf0f08f3eee0d8e6786dab963cfe6af9 Mon Sep 17 00:00:00 2001 From: jsyang Date: Wed, 20 Aug 2025 18:11:59 +0900 Subject: [PATCH] =?UTF-8?q?=EB=B9=8C=EB=93=9C=20=EC=97=90=EB=9F=AC=20?= =?UTF-8?q?=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../pages/(with-layout)/facilityPrecipitation/modal/page.tsx | 4 ++-- apps/fo/app/store/planSewage/index.tsx | 5 +++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx index 980be5865..0b4ef5830 100644 --- a/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx +++ b/apps/fo/app/pages/(with-layout)/facilityPrecipitation/modal/page.tsx @@ -28,8 +28,8 @@ export default function PrecipitationModal(props: PrecipitationModalProps) { const endPickerRef = useRef(null); // States - const [startDate, setStartDate] = useState(null); - const [endDate, setEndDate] = useState(null); + const [startDate, setStartDate] = useState(new Date()); + const [endDate, setEndDate] = useState(new Date()); const didInit = useRef(false); const [filteredDetailList, setFilteredDetailList] = useState([]); const [copyDetailList, setCopyDetailList] = useState([]); diff --git a/apps/fo/app/store/planSewage/index.tsx b/apps/fo/app/store/planSewage/index.tsx index 885949e3b..36e5feb9f 100644 --- a/apps/fo/app/store/planSewage/index.tsx +++ b/apps/fo/app/store/planSewage/index.tsx @@ -1,7 +1,8 @@ import DataForm from "@/app/components/common/DataForm"; import type { TableUpperProps } from "../dashboard"; import { getFetch } from "@/app/components/api"; -import { calRainEffectDay, type ApiResponse, type FlowDataItem } from "../underWaterInput"; +import { type ApiResponse, type FlowDataItem } from "../underWaterInput"; +import CalcRainEffect from "@/app/components/common/CalcRainEffect"; export type { TableUpperProps }; /**==================================== * Store - 타입 @@ -182,7 +183,7 @@ export const planSewageReducer:(set:(fn: (state: PlanSewageType) => PlanSewageTy const data = res.data const processedData = await Promise.all(data.map(async (item:PlanSewageProps) => { const res2 = await getFetch('fo', '/fclt/flow/' + item.bscFctCd + '/' + searchYear) as ApiResponse; - const calData = calRainEffectDay(res2.data, 'SUNNY'); + const calData = CalcRainEffect(res2.data, 'SUNNY'); let sumInflAmntSunny = 0; let avgInflAmntSunny = 0;