diff --git a/apps/dm/app/(with-layout)/status/_components/SewageStatusSection.tsx b/apps/dm/app/(with-layout)/status/_components/SewageStatusSection.tsx index 064e7c6e1..cd660a929 100644 --- a/apps/dm/app/(with-layout)/status/_components/SewageStatusSection.tsx +++ b/apps/dm/app/(with-layout)/status/_components/SewageStatusSection.tsx @@ -154,7 +154,7 @@ export default function SewageStatusSection() { const getPbnstByLawYears = useDmStore((state) => state.getPbnstByLawYears); const getPbnstByUsgYears = useDmStore((state) => state.getPbnstByUsgYears); const getPbnstByCpcYears = useDmStore((state) => state.getPbnstByCpcYears); - const getPbnstBySidoYears = useDmStore((state) => state.getPbnstBySidoYears); + const getPbnstBySido = useDmStore((state) => state.getPbnstBySido); const pbnstYears = useDmStore((state) => state.pbnst.pbnstYears); const selectYear = pbnstYears.slice(-1)[0]; const pbnstByLawYearsHeader = useDmStore((state) => state.pbnst.pbnstByLawYearsHeader); @@ -163,8 +163,8 @@ export default function SewageStatusSection() { const pbnstByUsgYears = useDmStore((state) => state.pbnst.pbnstByUsgYears); const pbnstByCpcYearsHeader = useDmStore((state) => state.pbnst.pbnstByCpcYearsHeader); const pbnstByCpcYears = useDmStore((state) => state.pbnst.pbnstByCpcYears); - const pbnstBySidoYearsHeader = useDmStore((state) => state.pbnst.pbnstBySidoYearsHeader); - const pbnstBySidoYears = useDmStore((state) => state.pbnst.pbnstBySidoYears); + const pbnstBySidoHeader = useDmStore((state) => state.pbnst.pbnstBySidoHeader); + const pbnstBySido = useDmStore((state) => state.pbnst.pbnstBySido); // 출처 텍스트 function SourceText() { @@ -179,8 +179,8 @@ export default function SewageStatusSection() { void getPbnstByLawYears(); void getPbnstByUsgYears(); void getPbnstByCpcYears(); - void getPbnstBySidoYears(); - }, [getPbnstByLawYears, getPbnstByUsgYears, getPbnstByCpcYears, getPbnstBySidoYears]); + void getPbnstBySido(); + }, [getPbnstByLawYears, getPbnstByUsgYears, getPbnstByCpcYears, getPbnstBySido]); const renderPartHeaders = (headers: string[], headerColors: string[]) => { return headers.map((header, index) => ( @@ -573,9 +573,9 @@ export default function SewageStatusSection() { - {pbnstBySidoYears.map((row, idx) => ( + {pbnstBySido.map((row, idx) => ( - {renderSidoUsgCells(idx, row, pbnstBySidoYearsHeader)} + {renderSidoUsgCells(idx, row, pbnstBySidoHeader)} ))} diff --git a/apps/dm/app/main/_sections/Cases.tsx b/apps/dm/app/main/_sections/Cases.tsx index a2619f330..0d8523647 100644 --- a/apps/dm/app/main/_sections/Cases.tsx +++ b/apps/dm/app/main/_sections/Cases.tsx @@ -28,7 +28,7 @@ export default function Cases() {
Promise; // 7.대민 하수재이용현황 법적대상별 최근 6년간 getPbnstByUsgYears: () => Promise; // 8.대민 하수재이용현황 이용용도별 최근 6년간 getPbnstByCpcYears: () => Promise; // 9.대민 하수재이용현황 용량 최근 6년간 - getPbnstBySidoYears: () => Promise; // 10.대민 하수재이용현황 시도별 + getPbnstBySido: () => Promise; // 10.대민 하수재이용현황 시도별 }; export type DmStatusType = { @@ -46,11 +46,11 @@ export type DmStatusType = { pbnstByLawYearsHeader: TableHeaderType[]; pbnstByUsgYearsHeader: TableHeaderType[]; pbnstByCpcYearsHeader: TableHeaderType[]; - pbnstBySidoYearsHeader: TableHeaderType[]; + pbnstBySidoHeader: TableHeaderType[]; pbnstByLawYears: DmStatusLawYearsType[]; pbnstByUsgYears: DmStatusUsgYearsType[]; pbnstByCpcYears: DmStatusLawYearsType[]; - pbnstBySidoYears: DmStatusSidoUsgType[]; + pbnstBySido: DmStatusSidoUsgType[]; } }; @@ -79,11 +79,11 @@ export const dmStatusState: DmStatusType = { pbnstByLawYearsHeader: pbnstByLawYearsHeader, pbnstByUsgYearsHeader: pbnstByUsgYearsHeader, pbnstByCpcYearsHeader: pbnstByCpcYearsHeader, - pbnstBySidoYearsHeader: pbnstBySidoYearsHeader, + pbnstBySidoHeader: pbnstBySidoHeader, pbnstByLawYears: [], pbnstByUsgYears: [], pbnstByCpcYears: [], - pbnstBySidoYears: [], + pbnstBySido: [], } }; @@ -245,15 +245,15 @@ export const DmStatusReducer = (set: any): DmStatusActions => { }, // 10.대민 하수재이용현황 시도별 - getPbnstBySidoYears: async () => { - const res = await getFetch(fetchType.WR,"/dmStatus/pbnstBySidoYears"); - const pbnstBySidoYears = Array.isArray(res?.data) ? res.data : []; + getPbnstBySido: async () => { + const res = await getFetch(fetchType.WR,"/dmStatus/pbnstBySido"); + const pbnstBySido = Array.isArray(res?.data) ? res.data : []; set((state: DmStatusType) => ({ ...state, pbnst: { ...state.pbnst, - pbnstBySidoYears, + pbnstBySido, } })); diff --git a/apps/dm/app/store/dm-status/type.ts b/apps/dm/app/store/dm-status/type.ts index dcce808f8..7766c84ae 100644 --- a/apps/dm/app/store/dm-status/type.ts +++ b/apps/dm/app/store/dm-status/type.ts @@ -269,7 +269,7 @@ export const pbnstByCpcYearsHeader: TableHeaderType[] = [ ]; // 시도별 하수처리수 재이용 현황 -export const pbnstBySidoYearsHeader: TableHeaderType[] = [ +export const pbnstBySidoHeader: TableHeaderType[] = [ { id: "SIDONM", title: "시도", row: 0, widthPercent: 15 }, { id: "TPUT_TOTAL", title: "연간하수처리량", row: 1, widthPercent: 5 }, { id: "USE_AMNT_TOTAL", title: "재이용현황계", row: 1, widthPercent: 5 },