시도시군구 정렬 삭제

This commit is contained in:
yschoi
2025-08-03 14:30:16 +09:00
parent f6333d0b29
commit 8eede7432b
+3 -6
View File
@@ -13,23 +13,20 @@ export type BIZ_CD_TYPE = {
export const fetchCtpvSggData = async (set: (state: any) => void) => {
try {
const ctpvData = await getCmsData('/api/v1/code/cache/ADSTDSTRCD');
console.log("CTPV Data:", ctpvData);
const ctpvData = await getCmsData('/api/v1/code/cache/ADSTDSTRCD/Y');
const ctpvList: Option[] = ctpvData
.filter((item: any) => typeof item.lwpoCd === 'string' && item.lwpoCd.length === 2)
.map((feature: any) => ({
id: feature.lwpoCd,
name: feature.lwpoCdNm
}))
.sort((a: Option, b: Option) => a.name.localeCompare(b.name, 'ko'));
}));
const sggList: Option[] = ctpvData
.filter((item: any) => typeof item.lwpoCd === 'string' && item.lwpoCd.length !== 2)
.map((item: any) => ({
id: item.lwpoCd,
name: item.lwpoCdNm
}))
.sort((a: Option, b: Option) => a.name.localeCompare(b.name, 'ko'));
}));
set({ ctpv: ctpvList, sgg: sggList });
} catch (e: any) {