From 7c9848cbc56e3af207c369703268fc2c12ae3b94 Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 13 Aug 2025 15:35:09 +0900 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20=EC=8B=9C=EB=8F=84,=20=EC=8B=9C?= =?UTF-8?q?=EA=B5=B0=EA=B5=AC=20=EC=88=9C=EC=84=9C=20Custom=20=EC=A0=95?= =?UTF-8?q?=EB=A0=AC?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sn/app/store/index.ts | 42 +++++++++++++++++++++++++++++++++++--- 1 file changed, 39 insertions(+), 3 deletions(-) diff --git a/apps/sn/app/store/index.ts b/apps/sn/app/store/index.ts index e27d2922f..99ab25ce9 100644 --- a/apps/sn/app/store/index.ts +++ b/apps/sn/app/store/index.ts @@ -18,7 +18,43 @@ export const fetchCtpv = async (set: (state: any) => void) => { text: f.properties.mctpv_korn_nm, val: f.properties.mctpv_cd, })) - .sort((a, b) => a.text.localeCompare(b.text, 'ko')); + .sort((a, b) => { + // 커스텀 순서 정의 + const customOrder = [ + "서울특별시", + "부산광역시", + "대구광역시", + "인천광역시", + "광주광역시", + "대전광역시", + "울산광역시", + "세종특별자치시", + "경기도", + "강원특별자치도", // 경기도 다음에 배치 + "충청북도", + "충청남도", + "전북특별자치도", // 충청남도 다음에 배치 + "전라남도", + "경상북도", + "경상남도", + "제주특별자치도" + ]; + + const indexA = customOrder.indexOf(a.text); + const indexB = customOrder.indexOf(b.text); + + // 둘 다 커스텀 순서에 있으면 해당 순서로 + if (indexA !== -1 && indexB !== -1) { + return indexA - indexB; + } + + // 하나만 커스텀 순서에 있으면 그것을 앞으로 + if (indexA !== -1) return -1; + if (indexB !== -1) return 1; + + // 둘 다 커스텀 순서에 없으면 기본 알파벳 순서 + return a.text.localeCompare(b.text, 'ko'); + }); console.log('시도 데이터', list); set({ ctpv: list }); @@ -53,8 +89,8 @@ export const fetchBIZ_TY_CD = async (set: (state: any) => void) => { try { const res = await getCmsData(`/api/v1/code/cache/BIZTYCD`); const filtered: BIZ_CD_TYPE[] = Array.isArray(res) - ? (res as BIZ_CD_TYPE[]).filter(item => item?.lwpoCd !== "AQAAA") - : []; + ? (res as BIZ_CD_TYPE[]).filter(item => item?.lwpoCd !== "AQAAA") + : []; set({ BIZ_TY_CD: filtered }); } catch (e: any) { // alert("BIZ_TY_CD 데이터 로드 실패: " + e.message); From f9424f6ac889fba6876af0aabe7e82f66f513086 Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 13 Aug 2025 15:45:06 +0900 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20merge=20=EB=B0=98=EC=98=81=20?= =?UTF-8?q?=EC=95=88=EB=90=9C=20=EC=82=AC=ED=95=AD=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/ui/map/searchBar/procSearchBar.tsx | 4 ---- 1 file changed, 4 deletions(-) diff --git a/packages/common/business_components/src/ui/map/searchBar/procSearchBar.tsx b/packages/common/business_components/src/ui/map/searchBar/procSearchBar.tsx index 6fb2d9890..465471715 100644 --- a/packages/common/business_components/src/ui/map/searchBar/procSearchBar.tsx +++ b/packages/common/business_components/src/ui/map/searchBar/procSearchBar.tsx @@ -48,9 +48,6 @@ export const ProcSearchBar = ({ gisMaps, facilityTypes }: SearchBarProps) => { text: f.properties.mctpv_korn_nm, val: f.properties.mctpv_cd, })) -<<<<<<< HEAD - .sort((a, b) => a.text.localeCompare(b.text, 'ko')); -======= .sort((a, b) => { // 커스텀 순서 정의 const customOrder = [ @@ -88,7 +85,6 @@ export const ProcSearchBar = ({ gisMaps, facilityTypes }: SearchBarProps) => { // 둘 다 커스텀 순서에 없으면 기본 알파벳 순서 return a.text.localeCompare(b.text, 'ko'); }); ->>>>>>> iipbs/common/main setSidoData([{ text: "시도", val: "0" }, ...list]); }; From f02a38702a57ae595821ce9cd8945822e3a802b5 Mon Sep 17 00:00:00 2001 From: swcho Date: Wed, 13 Aug 2025 15:48:16 +0900 Subject: [PATCH 3/3] =?UTF-8?q?fix:=20=EC=8B=9C=EA=B5=B0=EA=B5=AC,=20?= =?UTF-8?q?=ED=95=98=EC=88=98=EB=A7=A8=ED=99=80=20=EC=9A=A9=EB=8F=84=20Sel?= =?UTF-8?q?ectBox=20=EB=84=88=EB=B9=84=20=EC=88=98=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx | 2 +- apps/sn/app/components/ui/ctpvSggPrcsFcltSelectBox.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx b/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx index 721bbb40b..1c578a3e6 100644 --- a/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx +++ b/apps/sn/app/(map-layout)/map/searchModal/swageMhl.tsx @@ -69,7 +69,7 @@ const SwageMhl: React.FC = ({ {/* 용도 */} opt.val.startsWith(sidoPrefix))]}