260716_02_ENH: 프로젝트에 발신 번호추가 및 리다이렉트 url, api 수정
This commit is contained in:
@@ -4,7 +4,7 @@ import {keepPreviousData, useQuery} from "@tanstack/react-query";
|
||||
import {qk} from "@/query/key/keys";
|
||||
import {nextApi} from "@/lib/http-client";
|
||||
import {ItrntUserInfo} from "@/types/user";
|
||||
import {IntranetProjectSearchResponse, KonKiwiProjectInfo} from "@/types/project";
|
||||
import {CallerTelNumInfo, IntranetProjectSearchResponse, KonKiwiProjectInfo} from "@/types/project";
|
||||
|
||||
export function useIntranetProjectListQuery(keyword: string, enabled: boolean) {
|
||||
const kw = keyword.trim();
|
||||
@@ -34,4 +34,13 @@ export function useIntranetUsersQuery(opts?: {
|
||||
staleTime: 10 * 60_000,
|
||||
initialData: opts?.initialData,
|
||||
});
|
||||
}
|
||||
|
||||
export function useCallerTelNumListQuery(enabled: boolean) {
|
||||
return useQuery({
|
||||
queryKey: qk.callerTelNumList(),
|
||||
queryFn: () => nextApi.get<CallerTelNumInfo[]>("/intranet/caller-tel-num"),
|
||||
enabled,
|
||||
staleTime: 60_000,
|
||||
});
|
||||
}
|
||||
@@ -46,6 +46,7 @@ export const qk = {
|
||||
/********** 인트라넷 관련 **********/
|
||||
intranetProjectList: (keyword: string) => ["intranet", "project-list", keyword] as const,
|
||||
intranetUsers: () => ["intranet", "user-list"] as const,
|
||||
callerTelNumList: () => ["intranet", "caller-tel-num"] as const,
|
||||
/********** 인트라넷 관련 **********/
|
||||
|
||||
/********** 리스트 관련 **********/
|
||||
|
||||
@@ -83,6 +83,8 @@ export function useListDetailQuery(prjctIdx: number, sid: string, enabled: boole
|
||||
enabled,
|
||||
staleTime: 0,
|
||||
refetchOnMount: "always",
|
||||
// 조사 시작으로 새 창이 뜬 뒤 응답을 마치고 이 탭으로 돌아왔을 때 최신 상태(설문 응답 등)를 바로 보여주기 위함.
|
||||
refetchOnWindowFocus: true,
|
||||
meta: { ignoreGlobalLoading: true },
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user