feat(me): inline profile editing in the Profile tab (P3b)

Wires existing updateMyProfile + discloseAffiliations into an editable
form (name, handle, phone, bio, skills, interests, willing-to,
affiliations). Affiliations re-disclosed only when changed so the COI
timestamp is not reset on every save. Added bio to the updateMyProfile
param type (schema + column already supported it). 521 tests; build
clean (UI not browser-tested from here).
This commit is contained in:
Moheeb Zara
2026-05-18 15:46:15 -07:00
parent 5a7283266c
commit ef210c9fe5
4 changed files with 146 additions and 1 deletions
+8
View File
@@ -11,6 +11,7 @@ import { SIGNUP_STATUS_LABEL, SESSION_STATUS_LABEL } from '@/lib/classes-logic'
import { RESERVATION_STATUS_LABEL } from '@/lib/equipment-logic'
import { presenceStatus } from '@/lib/presence-logic'
import { DuesCard } from '@/components/billing/dues-card'
import { ProfileForm, type ProfileInitial } from './profile-form'
const STATUS_VARIANT: Record<CertStatus, 'default' | 'outline'> = {
active: 'default',
@@ -53,6 +54,7 @@ export type HeldPermission = { code: string; label: string }
export type Billing = { status: string | null; currentPeriodEnd: string | null; hasCustomer: boolean } | null
type Props = {
profile: ProfileInitial
grants: Grant[]
held: HeldPermission[]
billing: Billing
@@ -66,6 +68,7 @@ type Props = {
const sectionH = 'font-mono text-[10px] uppercase tracking-widest text-muted-foreground mb-3'
export function MePortalClient({
profile,
grants,
held,
billing,
@@ -94,6 +97,11 @@ export function MePortalClient({
</TabsList>
<TabsContent value="profile" className="space-y-8">
<section>
<h2 className={sectionH}>Profile</h2>
<ProfileForm initial={profile} />
</section>
<section>
<h2 className={sectionH}>My permissions</h2>
{held.length === 0 ? (