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;