Overview
After a booking completes, surface the NPS survey in the dashboard so members can rate their experience without leaving the platform, and show aggregated NPS results in the admin analytics.
Context
- Dashboard page:
frontend/app/dashboard/page.tsx
- Admin analytics page:
frontend/app/admin/analytics/page.tsx
- Depends on BE-43 being implemented first
Tasks
Files to Modify / Create
frontend/app/dashboard/page.tsx
frontend/app/admin/analytics/page.tsx
- New:
frontend/components/nps/NpsBanner.tsx
- New:
frontend/lib/react-query/hooks/nps/
Overview
After a booking completes, surface the NPS survey in the dashboard so members can rate their experience without leaving the platform, and show aggregated NPS results in the admin analytics.
Context
frontend/app/dashboard/page.tsxfrontend/app/admin/analytics/page.tsxTasks
useGetPendingNpsSurveyhook that checks if the current user has an unanswered NPS survey/dashboard—How was your experience at [Workspace Name]? Rate us 0–10Not at all likely/Extremely likelylabels; optional comment textarea belowPOST /nps/respond; on success dismiss the prompt and show thank-you toastDismiss for nowhides the banner for 24 hours (store inlocalStorage)Files to Modify / Create
frontend/app/dashboard/page.tsxfrontend/app/admin/analytics/page.tsxfrontend/components/nps/NpsBanner.tsxfrontend/lib/react-query/hooks/nps/