Files
frontend/apps/sn/app/store/useStore.ts
T
swcho 792e38c0c5 feat:
- 운영정보 검색에 하수처리구역 컬럼 추가
- 기본정보 하수관로 검색에 시도, 시군구, 용도 컬럼 추가
- 공통 코드 시도, 시군구 API 원앤올 -> 알애스원으로 변경
2025-08-11 17:39:59 +09:00

35 lines
877 B
TypeScript

import { create } from "zustand";
import { fetchCtpv, fetchSgg, fetchBIZ_SE_CD, fetchBIZ_TY_CD } from "./index";
import { type SelectDataType } from "@common/business_components";
export type BIZ_CD_TYPE = {
lwpoCd: string,
upCd: string,
lwpoCdNm: string,
unit: string,
prntLwpoCd: null
};
interface SnStoreState {
ctpv: SelectDataType[];
sgg: SelectDataType[];
BIZ_SE_CD: BIZ_CD_TYPE[];
BIZ_TY_CD: BIZ_CD_TYPE[];
fetchCtpv: () => Promise<void>;
fetchSgg: () => Promise<void>;
fetchBIZ_SE_CD: () => Promise<void>;
fetchBIZ_TY_CD: () => Promise<void>;
}
const useStore = create<SnStoreState>((set) => ({
ctpv: [],
sgg: [],
BIZ_SE_CD: [],
BIZ_TY_CD: [],
fetchCtpv: () => fetchCtpv(set),
fetchSgg: () => fetchSgg(set),
fetchBIZ_SE_CD: () => fetchBIZ_SE_CD(set),
fetchBIZ_TY_CD: () => fetchBIZ_TY_CD(set),
}));
export default useStore;