feat: show identity match hint on registration success page

When a pending identity match is detected after volunteer registration,
the API now returns has_existing_account in the response. The success
page shows a login suggestion card so the volunteer can link their
registration to their existing account.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-04-14 08:56:25 +02:00
parent eb1a0ac666
commit d4004c798c
4 changed files with 87 additions and 2 deletions

View File

@@ -22,10 +22,15 @@ export function useRegistrationData(eventSlug: Ref<string>) {
})
}
export interface VolunteerRegistrationResponse {
person: Record<string, unknown>
has_existing_account: boolean
}
export function useSubmitRegistration() {
return useMutation({
mutationFn: async ({ eventId, form }: { eventId: string; form: VolunteerRegistrationForm }) => {
const { data } = await apiClient.post<ApiResponse<Record<string, unknown>>>(
const { data } = await apiClient.post<ApiResponse<VolunteerRegistrationResponse>>(
`/events/${eventId}/volunteer-register`,
form,
)