[ST] - fix: type 오류 수정
This commit is contained in:
@@ -46,11 +46,10 @@ const StatisticsPopulationManagement = () => {
|
||||
|
||||
const foreignTab = usePopulationMappingTab<ForeignPopulationItem>({
|
||||
kind: "foreign",
|
||||
getList: async (statsYr, opt1) => {
|
||||
const res = await statisticsPpltnApi.getForeignPopulationList(statsYr, opt1);
|
||||
// res.data를 확실하게 ForeignPopulationItem[]로 캐스팅
|
||||
return { ...res, data: res.data as ForeignPopulationItem[] };
|
||||
},
|
||||
getList: async (statsYr, opt1) => {
|
||||
const res = await statisticsPpltnApi.getForeignPopulationList(statsYr, opt1);
|
||||
return { ...res, data: (res.data ?? []) as ForeignPopulationItem[] };
|
||||
},
|
||||
uploadExcel: statisticsPpltnApi.uploadForeignPopulationExcel,
|
||||
saveFinal: statisticsPpltnApi.saveForeignPopulationFinal,
|
||||
getUpperCodesByName: statisticsPpltnApi.getUpperCodesByName,
|
||||
|
||||
@@ -131,7 +131,7 @@ export function usePopulationMappingTab<TRow extends PopulationMappingRow>(
|
||||
statsYr,
|
||||
admdstCd: String(row.admdstCd ?? ""),
|
||||
admdstNm: String(row.admdstNm ?? ""),
|
||||
sbstAdmdstCd: String(row.sbstAdmdstCd ?? ""),
|
||||
subAdmdstCd: String(row.sbstAdmdstCd ?? ""),
|
||||
}));
|
||||
|
||||
const res = await config.saveFinal(statsYr, regList);
|
||||
|
||||
@@ -1,4 +1,7 @@
|
||||
import type { UpperCodeCandidateItem } from "@/entities/statistics/model/ppltn/statistics-domestic-population-interface";
|
||||
import type {
|
||||
DomesticPopulationMappingItem,
|
||||
UpperCodeCandidateItem,
|
||||
} from "@/entities/statistics/model/ppltn/statistics-domestic-population-interface";
|
||||
import type { ApiResponse } from "@/entities/statistics/model/statistics-interface";
|
||||
|
||||
/* ══════════════════════════════════════════════════
|
||||
@@ -84,12 +87,7 @@ export type PopulationStatusListResponse = ApiResponse<PopulationStatusItem[]>;
|
||||
export type MappingTabKind = "domestic" | "foreign";
|
||||
|
||||
/** 반영(최종 매핑 저장) 요청 시 서버로 보내는 단건 페이로드 - 내국인/외국인 공통 */
|
||||
export interface PopulationMappingRegItem {
|
||||
statsYr: string;
|
||||
admdstCd: string;
|
||||
admdstNm: string;
|
||||
sbstAdmdstCd: string;
|
||||
}
|
||||
export type PopulationMappingRegItem = DomesticPopulationMappingItem;
|
||||
|
||||
/** 좌/우 그리드 행이 공통으로 가져야 하는 최소 필드 */
|
||||
export interface PopulationMappingRow {
|
||||
|
||||
Reference in New Issue
Block a user