[as] WIP: 하수도기본계획 신청 페이지(이전기본계획조회)

This commit is contained in:
2026-07-30 11:23:44 +09:00
parent b8b0b24b0e
commit e56938f7ff
17 changed files with 612 additions and 164 deletions
+24 -5
View File
@@ -2,16 +2,35 @@ import { useQuery } from "@tanstack/react-query";
import { ENDPOINT } from "@/shared/config";
import type { NowDmgMtncGnsvySearchDto } from "../model/dc-interface";
import type {
ClsfSystmRequestDto,
LvNowDmgMtncGnsvySearchDto,
NowDmgMtncGnsvySearchDto,
} from "../model/dc-interface";
import { getNowDmgMtncGnsvy } from "./dc-service";
import { dcService } from "./dc-service";
export const nowDmgMtncGnsvyBaseKey = [ENDPOINT.DC_SERVICE.NOW_DMG_MTNC_GNSVY] as const;
export const baseKey = [ENDPOINT.DC_SERVICE] as const;
export function useNowDmgMtncGnsvy(params: NowDmgMtncGnsvySearchDto) {
return useQuery({
queryKey: [...nowDmgMtncGnsvyBaseKey, params],
queryFn: () => getNowDmgMtncGnsvy(params),
queryKey: [...baseKey, "nowDmgMtncGnsvy", params],
queryFn: () => dcService.getNowDmgMtncGnsvy(params),
enabled: Boolean(params.swtrmtFcltCd && params.ctpvNm),
});
}
export function useLvNowDmgMtncGnsvy(params: LvNowDmgMtncGnsvySearchDto) {
return useQuery({
queryKey: [...baseKey, "lvNowDmgMtncGnsvy", params],
queryFn: () => dcService.getLvNowDmgMtncGnsvy(params),
enabled: Boolean(params.level && params.ctpvNm && params.sggNm && params.gnsvyYr),
});
}
export function useClsfSystm(params: ClsfSystmRequestDto) {
return useQuery({
queryKey: [...baseKey, "clsfSystm", params],
queryFn: () => dcService.getClsfSystm(params),
});
}