Skip to content

Feat/nps survey#1312

Merged
yusuftomilola merged 2 commits into
DistinctCodes:mainfrom
feyishola:feat/nps-survey
Jun 29, 2026
Merged

Feat/nps survey#1312
yusuftomilola merged 2 commits into
DistinctCodes:mainfrom
feyishola:feat/nps-survey

Conversation

@feyishola

Copy link
Copy Markdown
Contributor

closes #1233
closes #1231

Summary

  1. NPS Survey — Frontend prompt & admin display
    After a booking completes, members see a dismissible banner on /dashboard asking them to rate their experience (0–10) with an optional comment. Submitting calls POST /nps/respond; dismissing hides it for 24 hours via localStorage. The admin analytics page gains an NPS summary section showing the aggregate score, a promoter/passive/detractor donut chart (Recharts), and the last 5 recent comments with colour-coded score badges.

New files: components/nps/NpsBanner.tsx, lib/react-query/hooks/nps/ (3 hooks)

Modified: DashboardContent.tsx, admin/analytics/page.tsx, queryKeys.ts, mutationKeys.ts

  1. White-labeling — Custom branding per hub
    Hub operators can now set their own logo, hub name, primary colour, and favicon. On app load, BrandingProvider fetches GET /hub-settings/branding and applies --color-primary as a CSS custom property and swaps the favicon — silently falling back to ManageHub defaults on failure. The sidebar and public navbar read from useBranding() and render the custom logo/name. A new admin page at /admin/settings/branding provides logo + favicon upload (via Cloudinary), a colour picker, and a hub name input. On the backend, primaryColorHex and faviconUrl were added to the existing HubSettings entity, and new /hub-settings/branding GET/PATCH/upload routes were added.

New files: lib/branding/BrandingContext.tsx, lib/react-query/hooks/branding/ (3 hooks), app/admin/settings/branding/page.tsx

Modified: hub-settings entity/DTO/controller/service/module, DashboardSidebar.tsx, Navbar.tsx, Providers.tsx, globals.css, queryKeys.ts, mutationKeys.ts

@vercel

vercel Bot commented Jun 29, 2026

Copy link
Copy Markdown

@feyishola is attempting to deploy a commit to the naijabuz's projects Team on Vercel.

A member of the Team first needs to authorize it.

@drips-wave

drips-wave Bot commented Jun 29, 2026

Copy link
Copy Markdown

@feyishola Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@yusuftomilola yusuftomilola merged commit 4f6a428 into DistinctCodes:main Jun 29, 2026
4 of 7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FE-38] White-labeling: frontend custom branding per hub [FE-37] NPS survey: frontend prompt and admin display

2 participants