260318:1401 Fix UUID #05
Build and Deploy / deploy (push) Failing after 11m8s

This commit is contained in:
admin
2026-03-18 14:01:32 +07:00
parent ba642e7e42
commit e5769269a8
37 changed files with 460 additions and 328 deletions
+13 -13
View File
@@ -11,7 +11,7 @@ export const rfaKeys = {
lists: () => [...rfaKeys.all, 'list'] as const,
list: (params: SearchRfaDto) => [...rfaKeys.lists(), params] as const,
details: () => [...rfaKeys.all, 'detail'] as const,
detail: (id: number | string) => [...rfaKeys.details(), id] as const,
detail: (uuid: string) => [...rfaKeys.details(), uuid] as const,
};
// --- Queries ---
@@ -24,11 +24,11 @@ export function useRFAs(params: SearchRfaDto) {
});
}
export function useRFA(id: number | string) {
export function useRFA(uuid: string) {
return useQuery({
queryKey: rfaKeys.detail(id),
queryFn: () => rfaService.getById(id),
enabled: !!id,
queryKey: rfaKeys.detail(uuid),
queryFn: () => rfaService.getByUuid(uuid),
enabled: !!uuid,
});
}
@@ -55,11 +55,11 @@ export function useUpdateRFA() {
const queryClient = useQueryClient();
return useMutation({
mutationFn: ({ id, data }: { id: number | string; data: UpdateRfaDto }) =>
rfaService.update(id, data),
onSuccess: (_, { id }) => {
mutationFn: ({ uuid, data }: { uuid: string; data: UpdateRfaDto }) =>
rfaService.update(uuid, data),
onSuccess: (_, { uuid }) => {
toast.success('RFA updated successfully');
queryClient.invalidateQueries({ queryKey: rfaKeys.detail(id) });
queryClient.invalidateQueries({ queryKey: rfaKeys.detail(uuid) });
queryClient.invalidateQueries({ queryKey: rfaKeys.lists() });
},
onError: (error: unknown) => {
@@ -74,11 +74,11 @@ export function useProcessRFA() {
const queryClient = useQueryClient();
return useMutation({
mutationFn: ({ id, data }: { id: number | string; data: WorkflowActionDto }) =>
rfaService.processWorkflow(id, data),
onSuccess: (_, { id }) => {
mutationFn: ({ uuid, data }: { uuid: string; data: WorkflowActionDto }) =>
rfaService.processWorkflow(uuid, data),
onSuccess: (_, { uuid }) => {
toast.success('Workflow status updated successfully');
queryClient.invalidateQueries({ queryKey: rfaKeys.detail(id) });
queryClient.invalidateQueries({ queryKey: rfaKeys.detail(uuid) });
queryClient.invalidateQueries({ queryKey: rfaKeys.lists() });
},
onError: (error: unknown) => {