Two additions on top of the existing JSN-bridge work — both surface
through to JSN's /account VolunteerHub without further coordination.
api/src/modules/volunteer-dashboard/volunteer-dashboard.service.ts:
- Add DashboardNotification interface (id, title, body?, kind?,
createdAt, href?) and `notifications: DashboardNotification[]` on
VolunteerDashboardPayload.
- getDashboard() now fans out an 8th parallel fetch to the existing
notificationService.listNotifications(userId, 1, 20, true), mapping
each row's metadata.href (if present) into the href field.
- JSN's NotificationsCard was shipped pre-emptively typed for this
field (loose-schema-now); it lights up automatically once cmlite is
redeployed with this commit.
admin/src/components/VolunteerLayout.tsx + VolunteerFooterNav.tsx:
- Suppress the "Welcome to the Volunteer Portal!" alert when
?layout=embedded — the supporter arriving via SSO already knows
where they are; the alert is noise.
- Add a "← Back to JSN" link in the drawer cross-nav section, visible
only when embedded. Reads VITE_JSN_HOME_URL (new env var, defaults
to http://localhost:8085 for dev).
- Preserve ?layout=embedded across in-cmlite navigation. Both the
drawer nav and the footer nav now route through a navigateInLayout
helper that appends the query when the supporter arrived embedded.
Without this fix, clicking the footer "Map" button (etc.) stripped
the query and re-showed PublicNavBar + the welcome alert.
admin/src/vite-env.d.ts:
- New VITE_JSN_HOME_URL slot in ImportMetaEnv. Default dev value baked
into VolunteerLayout's render; production overrides via .env.
Bunker Admin