diff --git a/app/webpacker/components/RegistrationsV2/Register/CompetingStep.jsx b/app/webpacker/components/RegistrationsV2/Register/CompetingStep.jsx index 5f968a32d6..fe41997234 100644 --- a/app/webpacker/components/RegistrationsV2/Register/CompetingStep.jsx +++ b/app/webpacker/components/RegistrationsV2/Register/CompetingStep.jsx @@ -89,7 +89,7 @@ export default function CompetingStep({ const queryClient = useQueryClient(); const { mutate: updateRegistrationMutation, isPending: isUpdating } = useMutation({ - mutationFn: updateRegistration, + mutationFn: (body) => updateRegistration(competitionInfo, body), onError: (data) => { const { error } = data.json; dispatch(setMessage( @@ -117,7 +117,7 @@ export default function CompetingStep({ }); const { mutate: createRegistrationMutation, isLoading: isCreating } = useMutation({ - mutationFn: submitEventRegistration, + mutationFn: (body) => submitEventRegistration(competitionInfo, body), onError: (data) => { const { error } = data.json; dispatch(setMessage( diff --git a/app/webpacker/components/RegistrationsV2/Register/RegistrationOverview.jsx b/app/webpacker/components/RegistrationsV2/Register/RegistrationOverview.jsx index fa07b4a4c2..71ab6d7f86 100644 --- a/app/webpacker/components/RegistrationsV2/Register/RegistrationOverview.jsx +++ b/app/webpacker/components/RegistrationsV2/Register/RegistrationOverview.jsx @@ -44,7 +44,7 @@ export default function RegistrationOverview({ const queryClient = useQueryClient(); const { mutate: deleteRegistrationMutation, isPending: isDeleting } = useMutation({ - mutationFn: () => updateRegistration({ + mutationFn: () => updateRegistration(competitionInfo, { user_id: registration.user_id, competition_id: competitionInfo.id, competing: { diff --git a/app/webpacker/components/RegistrationsV2/Register/index.jsx b/app/webpacker/components/RegistrationsV2/Register/index.jsx index 41cbd808dd..49e9961fb0 100644 --- a/app/webpacker/components/RegistrationsV2/Register/index.jsx +++ b/app/webpacker/components/RegistrationsV2/Register/index.jsx @@ -56,7 +56,7 @@ function Register({ refetch, } = useQuery({ queryKey: ['registration', competitionInfo.id, userInfo.id], - queryFn: () => getSingleRegistration(userInfo.id, competitionInfo.id), + queryFn: () => getSingleRegistration(userInfo.id, competitionInfo), onError: (data) => { const { error } = data.json; dispatch(setMessage( diff --git a/app/webpacker/components/RegistrationsV2/RegistrationAdministration/RegistrationAdministrationList.jsx b/app/webpacker/components/RegistrationsV2/RegistrationAdministration/RegistrationAdministrationList.jsx index c35b11e32e..dea7f47202 100644 --- a/app/webpacker/components/RegistrationsV2/RegistrationAdministration/RegistrationAdministrationList.jsx +++ b/app/webpacker/components/RegistrationsV2/RegistrationAdministration/RegistrationAdministrationList.jsx @@ -144,7 +144,7 @@ export default function RegistrationAdministrationList({ competitionInfo }) { refetch, } = useQuery({ queryKey: ['registrations-admin', competitionInfo.id], - queryFn: () => getAllRegistrations(competitionInfo.id), + queryFn: () => getAllRegistrations(competitionInfo), refetchOnWindowFocus: false, refetchOnReconnect: false, staleTime: Infinity, diff --git a/app/webpacker/components/RegistrationsV2/RegistrationEdit/RegistrationEditor.jsx b/app/webpacker/components/RegistrationsV2/RegistrationEdit/RegistrationEditor.jsx index 327e60f6f5..3e4cd940ce 100644 --- a/app/webpacker/components/RegistrationsV2/RegistrationEdit/RegistrationEditor.jsx +++ b/app/webpacker/components/RegistrationsV2/RegistrationEdit/RegistrationEditor.jsx @@ -42,7 +42,7 @@ export default function RegistrationEditor({ competitor, competitionInfo }) { const { isLoading: isRegistrationLoading, data: serverRegistration, refetch } = useQuery({ queryKey: ['registration-admin', competitionInfo.id, competitor.id], - queryFn: () => getSingleRegistration(competitor.id, competitionInfo.id), + queryFn: () => getSingleRegistration(competitor.id, competitionInfo), refetchOnWindowFocus: false, refetchOnReconnect: false, staleTime: Infinity, @@ -56,7 +56,7 @@ export default function RegistrationEditor({ competitor, competitionInfo }) { }); const { mutate: updateRegistrationMutation, isPending: isUpdating } = useMutation({ - mutationFn: updateRegistration, + mutationFn: (body) => updateRegistration(competitionInfo, body), onError: (data) => { const { error } = data.json; dispatch(setMessage( diff --git a/app/webpacker/components/RegistrationsV2/Registrations/RegistrationList.jsx b/app/webpacker/components/RegistrationsV2/Registrations/RegistrationList.jsx index f375325603..937aa554c5 100644 --- a/app/webpacker/components/RegistrationsV2/Registrations/RegistrationList.jsx +++ b/app/webpacker/components/RegistrationsV2/Registrations/RegistrationList.jsx @@ -83,7 +83,7 @@ function FooterContent({ export default function RegistrationList({ competitionInfo }) { const { isLoading: registrationsLoading, data: registrations, isError } = useQuery({ queryKey: ['registrations', competitionInfo.id], - queryFn: () => getConfirmedRegistrations(competitionInfo.id), + queryFn: () => getConfirmedRegistrations(competitionInfo), retry: false, });