From 10d3fc096a298a0068c9822a254143d302f82d69 Mon Sep 17 00:00:00 2001 From: ljpark Date: Fri, 4 Sep 2026 11:00:38 +0900 Subject: [PATCH] =?UTF-8?q?sn:=20=EC=8B=9C=EB=8F=84=20=EC=A0=84=EC=B2=B4?= =?UTF-8?q?=EC=9D=BC=20=EB=95=8C,=20=EC=8B=9C=EA=B5=B0=EA=B5=AC=20?= =?UTF-8?q?=EB=AA=A9=EB=A1=9D=20=EB=B9=84=EC=9A=B0=EA=B8=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../map/components/agedPipe/AgedPipePopupPage.tsx | 2 +- .../map/components/fldngHstry/FldngHstryPopupPage.tsx | 2 +- .../map/components/floodDngrMap/FloodDngrMapPopupPage.tsx | 2 +- .../map/components/pipeAnalysis/PipeAnalysisPopupPage.tsx | 2 +- .../map/components/sbmrgDngrMap/SbmrgDngrMapPopupPage.tsx | 2 +- .../map/components/sinkhole/SinkholePopupPage.tsx | 2 +- .../map/components/waterRisk/WaterRiskPopupPage.tsx | 4 ++-- apps/sn/app/(with-base-layout)/oper/dredging/page.tsx | 2 +- .../sn/app/html/(map-layout)/aged-pipe/AgedPipeListModal.tsx | 2 +- .../fldngPredcPrst/ui/FldngPredcPrstPopupContent.tsx | 2 +- apps/sn/src/features/obsltPpl/lib/obslt-ppl-region.ts | 5 ++++- 11 files changed, 15 insertions(+), 12 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/components/agedPipe/AgedPipePopupPage.tsx b/apps/sn/app/(map-layout)/map/components/agedPipe/AgedPipePopupPage.tsx index 5a8caf2d9..b2a12c783 100644 --- a/apps/sn/app/(map-layout)/map/components/agedPipe/AgedPipePopupPage.tsx +++ b/apps/sn/app/(map-layout)/map/components/agedPipe/AgedPipePopupPage.tsx @@ -57,7 +57,7 @@ export default function AgedPipePopupPage() { const sggOptions = useMemo( () => filters.ctpvCd === "0" - ? sgg + ? [] : sgg.filter((item) => String(item.val).startsWith(filters.ctpvCd.slice(0, 2)), ), diff --git a/apps/sn/app/(map-layout)/map/components/fldngHstry/FldngHstryPopupPage.tsx b/apps/sn/app/(map-layout)/map/components/fldngHstry/FldngHstryPopupPage.tsx index 9191a4be5..42750f87d 100644 --- a/apps/sn/app/(map-layout)/map/components/fldngHstry/FldngHstryPopupPage.tsx +++ b/apps/sn/app/(map-layout)/map/components/fldngHstry/FldngHstryPopupPage.tsx @@ -126,7 +126,7 @@ export default function FldngHstryPopupPage() { const sggOptions = useMemo( () => filters.ctpvCd === "0" - ? sgg + ? [] : sgg.filter((item) => String(item.val).startsWith(filters.ctpvCd.slice(0, 2)), ), diff --git a/apps/sn/app/(map-layout)/map/components/floodDngrMap/FloodDngrMapPopupPage.tsx b/apps/sn/app/(map-layout)/map/components/floodDngrMap/FloodDngrMapPopupPage.tsx index b65c7b38f..62821229f 100644 --- a/apps/sn/app/(map-layout)/map/components/floodDngrMap/FloodDngrMapPopupPage.tsx +++ b/apps/sn/app/(map-layout)/map/components/floodDngrMap/FloodDngrMapPopupPage.tsx @@ -101,7 +101,7 @@ export default function FloodDngrMapPopupPage() { availableSggCodes.has(String(item.val).trim().slice(0, 5)), ); return filters.ctpvCd === "0" - ? scopedOptions + ? [] : scopedOptions.filter((item) => String(item.val).startsWith(filters.ctpvCd.slice(0, 2)), ); diff --git a/apps/sn/app/(map-layout)/map/components/pipeAnalysis/PipeAnalysisPopupPage.tsx b/apps/sn/app/(map-layout)/map/components/pipeAnalysis/PipeAnalysisPopupPage.tsx index 725921045..e657c6f2d 100644 --- a/apps/sn/app/(map-layout)/map/components/pipeAnalysis/PipeAnalysisPopupPage.tsx +++ b/apps/sn/app/(map-layout)/map/components/pipeAnalysis/PipeAnalysisPopupPage.tsx @@ -388,7 +388,7 @@ export default function PipeAnalysisPopupPage() { const sggOptions = useMemo( () => draftFilters.ctpvCd === "0" - ? sgg + ? [] : sgg.filter((item) => String(item.val).startsWith(draftFilters.ctpvCd.slice(0, 2)), ), diff --git a/apps/sn/app/(map-layout)/map/components/sbmrgDngrMap/SbmrgDngrMapPopupPage.tsx b/apps/sn/app/(map-layout)/map/components/sbmrgDngrMap/SbmrgDngrMapPopupPage.tsx index 4cb3987fe..a6e2190e4 100644 --- a/apps/sn/app/(map-layout)/map/components/sbmrgDngrMap/SbmrgDngrMapPopupPage.tsx +++ b/apps/sn/app/(map-layout)/map/components/sbmrgDngrMap/SbmrgDngrMapPopupPage.tsx @@ -85,7 +85,7 @@ export default function SbmrgDngrMapPopupPage() { availableSggCodes.has(String(item.val).trim().slice(0, 5)), ); return filters.ctpvCd === "0" - ? scopedOptions + ? [] : scopedOptions.filter((item) => String(item.val).startsWith(filters.ctpvCd.slice(0, 2)), ); diff --git a/apps/sn/app/(map-layout)/map/components/sinkhole/SinkholePopupPage.tsx b/apps/sn/app/(map-layout)/map/components/sinkhole/SinkholePopupPage.tsx index c837cefdf..c5268b167 100644 --- a/apps/sn/app/(map-layout)/map/components/sinkhole/SinkholePopupPage.tsx +++ b/apps/sn/app/(map-layout)/map/components/sinkhole/SinkholePopupPage.tsx @@ -197,7 +197,7 @@ export default function SinkholePopupPage() { const sggOptions = useMemo( () => filters.ctpvCd === "0" - ? sgg + ? [] : sgg.filter((item) => String(item.val).startsWith(filters.ctpvCd.slice(0, 2)), ), diff --git a/apps/sn/app/(map-layout)/map/components/waterRisk/WaterRiskPopupPage.tsx b/apps/sn/app/(map-layout)/map/components/waterRisk/WaterRiskPopupPage.tsx index 2077532aa..6758738f5 100644 --- a/apps/sn/app/(map-layout)/map/components/waterRisk/WaterRiskPopupPage.tsx +++ b/apps/sn/app/(map-layout)/map/components/waterRisk/WaterRiskPopupPage.tsx @@ -366,7 +366,7 @@ export default function WaterRiskPopupPage(_props: WindowPopupContentProps) { areaOptions .filter( (option) => - draftResultFilters.ctpvCd === "ALL" || + draftResultFilters.ctpvCd !== "ALL" && option.ctpvCd === draftResultFilters.ctpvCd, ) .forEach((option) => { @@ -382,7 +382,7 @@ export default function WaterRiskPopupPage(_props: WindowPopupContentProps) { () => areaOptions.filter( (option) => - (draftResultFilters.ctpvCd === "ALL" || + (draftResultFilters.ctpvCd !== "ALL" && option.ctpvCd === draftResultFilters.ctpvCd) && (draftResultFilters.sggCd === "ALL" || option.sggCd === draftResultFilters.sggCd), diff --git a/apps/sn/app/(with-base-layout)/oper/dredging/page.tsx b/apps/sn/app/(with-base-layout)/oper/dredging/page.tsx index aa9e18396..7e041a273 100644 --- a/apps/sn/app/(with-base-layout)/oper/dredging/page.tsx +++ b/apps/sn/app/(with-base-layout)/oper/dredging/page.tsx @@ -361,7 +361,7 @@ const Page = () => { /** 선택한 시도 코드와 앞 두 자리가 같은 시군구만 후보로 제공한다. */ const availableSggOptions = useMemo(() => { - if (ctpvCd === "0") return sggRegionOptions; + if (ctpvCd === "0") return []; const ctpvPrefix = ctpvCd.slice(0, 2); return sggRegionOptions.filter((option) => String(option.val).startsWith(ctpvPrefix), diff --git a/apps/sn/app/html/(map-layout)/aged-pipe/AgedPipeListModal.tsx b/apps/sn/app/html/(map-layout)/aged-pipe/AgedPipeListModal.tsx index a5c90e184..45a04331b 100644 --- a/apps/sn/app/html/(map-layout)/aged-pipe/AgedPipeListModal.tsx +++ b/apps/sn/app/html/(map-layout)/aged-pipe/AgedPipeListModal.tsx @@ -41,7 +41,7 @@ export default function AgedPipeListModal({ const { ctpv, sgg } = useStore(); const lastClickRef = useRef<{ index: number; clickedAt: number } | null>(null); const sggOptions = filters.ctpvCd === "0" - ? sgg + ? [] : sgg.filter((item) => String(item.val).startsWith(filters.ctpvCd.slice(0, 2))); const handleRowClick = (index?: number) => { diff --git a/apps/sn/src/features/fldngPredcPrst/ui/FldngPredcPrstPopupContent.tsx b/apps/sn/src/features/fldngPredcPrst/ui/FldngPredcPrstPopupContent.tsx index b16991eb1..38abae35b 100644 --- a/apps/sn/src/features/fldngPredcPrst/ui/FldngPredcPrstPopupContent.tsx +++ b/apps/sn/src/features/fldngPredcPrst/ui/FldngPredcPrstPopupContent.tsx @@ -240,7 +240,7 @@ export default function FldngPredcPrstPopupContent() { const sggOptions = useMemo( () => filters.ctpvCd === "0" - ? sgg + ? [] : sgg.filter((item) => String(item.val).startsWith(filters.ctpvCd.slice(0, 2)), ), diff --git a/apps/sn/src/features/obsltPpl/lib/obslt-ppl-region.ts b/apps/sn/src/features/obsltPpl/lib/obslt-ppl-region.ts index 2fc38854e..46547c757 100644 --- a/apps/sn/src/features/obsltPpl/lib/obslt-ppl-region.ts +++ b/apps/sn/src/features/obsltPpl/lib/obslt-ppl-region.ts @@ -40,12 +40,15 @@ export const buildObsltPplRepresentativeSggOptions = ( sggOptions: RegionOption[], ctpvCd: string, ) => { + // 시도가 전체(0)이면 시군구를 선택할 수 없도록 목록을 비운다. + if (ctpvCd === "0") return []; + const representativeMap = new Map(); sggOptions .filter((option) => { const optionCode = String(option.val ?? "").trim(); - return ctpvCd === "0" || optionCode.startsWith(ctpvCd.slice(0, 2)); + return optionCode.startsWith(ctpvCd.slice(0, 2)); }) .forEach((option) => { const representativeName = normalizeObsltPplSigunName(option.text);