Merge remote-tracking branch 'origin/feature/sein' into iipbs/st/dev
This commit is contained in:
@@ -88,6 +88,23 @@ export function useDashboardEcptReqCount(params: DashboardSearchParams | null) {
|
||||
});
|
||||
}
|
||||
|
||||
// 지자체/광역시도/공단 3단계 처리상태 조회
|
||||
export function useDashboardThreeStageStatus(
|
||||
params: DashboardSearchParams | null,
|
||||
) {
|
||||
return useQuery({
|
||||
queryKey: createDashboardQueryKey("three-stage-status", params),
|
||||
queryFn: async () => {
|
||||
if (!params)
|
||||
throw new Error("Dashboard search params are required.");
|
||||
const response = await dashboardApi.getThreeStageStatus(params);
|
||||
return response.data;
|
||||
},
|
||||
enabled: hasRequiredDashboardParams(params),
|
||||
refetchOnWindowFocus: false,
|
||||
});
|
||||
}
|
||||
|
||||
function createDashboardQueryKey(
|
||||
name: string,
|
||||
params: DashboardSearchParams | null,
|
||||
|
||||
@@ -6,6 +6,7 @@ import type {
|
||||
DashboardSearchParams,
|
||||
DashboardService,
|
||||
EcptReqCountResponse,
|
||||
ThreeStageStatusResponse,
|
||||
StatsSubmissionResponse,
|
||||
UnSubmitCountResponse,
|
||||
VrfcErrCountResponse,
|
||||
@@ -57,10 +58,22 @@ async function getEcptReqCount(
|
||||
return response.data;
|
||||
}
|
||||
|
||||
async function getThreeStageStatus(
|
||||
params: DashboardSearchParams,
|
||||
): Promise<DashboardApiResponse<ThreeStageStatusResponse>> {
|
||||
const response = await stClient.get<DashboardApiResponse<ThreeStageStatusResponse>>(
|
||||
`${ENDPOINT.ST_SERVICE.DASHBOARD}/three-stage-status`,
|
||||
{ params },
|
||||
);
|
||||
return response.data;
|
||||
}
|
||||
|
||||
|
||||
export const dashboardApi: DashboardService = {
|
||||
getVrfcReport,
|
||||
getVrfcErrCount,
|
||||
getUnSubmitCount,
|
||||
getStatsSubmissionRate,
|
||||
getEcptReqCount,
|
||||
getThreeStageStatus,
|
||||
};
|
||||
|
||||
@@ -65,6 +65,16 @@ export interface EcptReqCountResponse {
|
||||
ecptReqCount: number;
|
||||
}
|
||||
|
||||
export interface ThreeStageStatusResponse {
|
||||
statsYr: string;
|
||||
laeStatusCd: string;
|
||||
laeStatusNm: string;
|
||||
ctpvStatusCd: string;
|
||||
ctpvStatusNm: string;
|
||||
pbcpStatusCd: string;
|
||||
pbcpStatusNm: string;
|
||||
}
|
||||
|
||||
export interface DashboardService {
|
||||
getVrfcReport(
|
||||
params: DashboardSearchParams,
|
||||
@@ -81,4 +91,7 @@ export interface DashboardService {
|
||||
getEcptReqCount(
|
||||
params: DashboardSearchParams,
|
||||
): Promise<DashboardApiResponse<EcptReqCountResponse>>;
|
||||
getThreeStageStatus(
|
||||
params: DashboardSearchParams,
|
||||
): Promise<DashboardApiResponse<ThreeStageStatusResponse>>;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user