feat: add admin survey invites page with create and list
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,18 @@ import type {
|
||||
AdminUserCreateResponse,
|
||||
} from '@/types/admin'
|
||||
|
||||
export interface SurveyInviteResponse {
|
||||
id: string
|
||||
token: string
|
||||
recipient_name: string
|
||||
recipient_email: string | null
|
||||
status: string
|
||||
email_sent: boolean
|
||||
created_at: string
|
||||
completed_at: string | null
|
||||
survey_url: string
|
||||
}
|
||||
|
||||
export const adminApi = {
|
||||
// Dashboard
|
||||
getDashboardMetrics: () =>
|
||||
@@ -140,6 +152,12 @@ export const adminApi = {
|
||||
api.put<AdminCategory>(`/admin/categories/global/${id}`, data).then(r => r.data),
|
||||
deleteGlobalCategory: (id: string) =>
|
||||
api.delete(`/admin/categories/global/${id}`),
|
||||
|
||||
// Survey Invites
|
||||
listSurveyInvites: () =>
|
||||
api.get<SurveyInviteResponse[]>('/admin/survey-invites').then(r => r.data),
|
||||
createSurveyInvite: (data: { recipient_name: string; recipient_email?: string; send_email?: boolean }) =>
|
||||
api.post<SurveyInviteResponse>('/admin/survey-invites', data).then(r => r.data),
|
||||
}
|
||||
|
||||
export default adminApi
|
||||
|
||||
Reference in New Issue
Block a user