260707_01_ENH: 모니터링 출발/도착 버튼은 모니터링 일자 이후로 부터 노출되게 수정 및 관리자는 출발 도착 삭제 가능하게 수정
This commit is contained in:
@@ -56,3 +56,17 @@ export function useDownloadEvidenceZipMutation() {
|
||||
),
|
||||
});
|
||||
}
|
||||
|
||||
export function useResetMonitoringVisitMutation() {
|
||||
const qc = useQueryClient();
|
||||
|
||||
return useMutation({
|
||||
mutationFn: ({performanceId, userId}: {performanceId: number; userId: string}) =>
|
||||
nextApi.del<void>(`/monitoring/visit/reset/${performanceId}/${encodeURIComponent(userId)}`),
|
||||
onSuccess: (_res, {performanceId, userId}) => {
|
||||
qc.invalidateQueries({ queryKey: qk.performance(performanceId) });
|
||||
qc.invalidateQueries({ queryKey: qk.performanceList() });
|
||||
qc.invalidateQueries({ queryKey: qk.monitoringEvidence(performanceId, userId) });
|
||||
},
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user