fix: wire up 'Send Vote Email' button to POST /admin/orchestrate/email

- Add triggerOrchestrate() to API client calling POST /admin/orchestrate/{step}
- Replace dead <button> in Dashboard with VoteEmailButton component:
  onClick calls triggerOrchestrate('email'), shows toast spinner + success/error
This commit is contained in:
2026-05-14 13:59:29 -07:00
parent 6323eadc86
commit f61515beff
2 changed files with 33 additions and 4 deletions
+1
View File
@@ -64,6 +64,7 @@ export const mealPlannerApi = {
getMealPlans: (params?: any) => api.get('/admin/meal-plans', { params }),
getStats: () => api.get('/admin/stats'),
testEmail: (email: string) => api.post('/admin/test-email', null, { params: { email } }),
triggerOrchestrate: (step: string, weekStart?: string) => api.post(`/admin/orchestrate/${step}`, null, { params: { week_start: weekStart } }),
},
feedback: {