Add member identifiers UI, member detail page, kebab menus

- Member detail page at /members/:id with edit form and identity documents
- Expandable identity documents on account members tab
- Kebab menu on both members list and account members tab (Edit, View IDs, View Account, Delete)
- Identifier form with image upload (base64), ID type select, dates
- Wiki article for identity documents
This commit is contained in:
Ryan Moon
2026-03-28 13:22:44 -05:00
parent c7e2c141ec
commit 95bf9472e0
8 changed files with 698 additions and 90 deletions

View File

@@ -0,0 +1,25 @@
import { queryOptions } from '@tanstack/react-query'
import { api } from '@/lib/api-client'
import type { MemberIdentifier } from '@/types/account'
export const identifierKeys = {
all: (memberId: string) => ['members', memberId, 'identifiers'] as const,
}
export function identifierListOptions(memberId: string) {
return queryOptions({
queryKey: identifierKeys.all(memberId),
queryFn: () => api.get<{ data: MemberIdentifier[] }>(`/v1/members/${memberId}/identifiers`),
})
}
export const identifierMutations = {
create: (memberId: string, data: Record<string, unknown>) =>
api.post<MemberIdentifier>(`/v1/members/${memberId}/identifiers`, data),
update: (id: string, data: Record<string, unknown>) =>
api.patch<MemberIdentifier>(`/v1/identifiers/${id}`, data),
delete: (id: string) =>
api.del<MemberIdentifier>(`/v1/identifiers/${id}`),
}