feat(member): account/profile polish + tier upgrade flow
- Timezone: curated USelectMenu dropdown (app/config/timezones.js), preserves unknown saved values
- Profile save now uses useToast() for success/error; remove inline save banner
- Nav onboarding dot nudged down 1px for optical alignment with lowercase text
- Onboarding: skip a suggestion with POST /api/onboarding/track {skip}; member.onboarding.skipped map; does not affect graduation
- CirclePicker takes :saved-value so 'Current' badge stays until save completes
- PrivacyToggle is binary (USwitch labeled Private); member schema enum reduced to ['members','private']; zod coerces legacy 'public'
- New /member/payment-setup page: HelcimPay $0 verify + update-contribution, wired from account.vue via requiresPaymentSetup redirect
- Helcim portal: NUXT_PUBLIC_HELCIM_PORTAL_URL env + account.vue 'Manage billing in Helcim' link
- Migration script: scripts/migrate-privacy-public-to-members.js
This commit is contained in:
parent
08fc3884da
commit
7292b11c0b
18 changed files with 604 additions and 122 deletions
|
|
@ -1,7 +1,12 @@
|
|||
import * as z from 'zod'
|
||||
import { ADMIN_ALERT_TYPES } from '../models/adminAlertDismissal.js'
|
||||
|
||||
const privacyEnum = z.enum(['public', 'members', 'private'])
|
||||
// Binary privacy: 'members' = visible to signed-in members, 'private' = hidden.
|
||||
// Legacy 'public' is accepted from old clients and coerced to 'members'.
|
||||
const privacyEnum = z.preprocess(
|
||||
(v) => (v === 'public' ? 'members' : v),
|
||||
z.enum(['members', 'private'])
|
||||
)
|
||||
|
||||
export const emailSchema = z.object({
|
||||
email: z.string().trim().toLowerCase().email()
|
||||
|
|
@ -367,7 +372,10 @@ export const inviteAcceptSchema = z.object({
|
|||
// --- Onboarding schemas ---
|
||||
|
||||
export const onboardingTrackSchema = z.object({
|
||||
goal: z.enum(['eventPageVisited', 'boardPageVisited', 'wikiClicked'])
|
||||
goal: z.enum(['eventPageVisited', 'boardPageVisited', 'wikiClicked']).optional(),
|
||||
skip: z.enum(['profileTags', 'visitEvent', 'board', 'wiki']).optional(),
|
||||
}).refine((v) => v.goal || v.skip, {
|
||||
message: 'Must provide goal or skip',
|
||||
})
|
||||
|
||||
// --- Tag schemas ---
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue