Add top-level members list, primary member on account, member move, combined create flows
- GET /v1/members with search across all members (includes account name) - POST /members/:id/move with optional accountId (creates new account if omitted) - primary_member_id on account table, auto-set when first member added - isMinor flag on member create (manual override when no DOB provided) - Account search now includes member names - New account form includes primary contact fields, auto-generates name - Members page in sidebar with global search
This commit is contained in:
@@ -337,40 +337,20 @@ export const themes: ThemePreset[] = [
|
||||
},
|
||||
]
|
||||
|
||||
const CSS_VAR_MAP: Record<keyof ThemeColors, string> = {
|
||||
background: '--color-background',
|
||||
foreground: '--color-foreground',
|
||||
card: '--color-card',
|
||||
cardForeground: '--color-card-foreground',
|
||||
popover: '--color-popover',
|
||||
popoverForeground: '--color-popover-foreground',
|
||||
primary: '--color-primary',
|
||||
primaryForeground: '--color-primary-foreground',
|
||||
secondary: '--color-secondary',
|
||||
secondaryForeground: '--color-secondary-foreground',
|
||||
muted: '--color-muted',
|
||||
mutedForeground: '--color-muted-foreground',
|
||||
accent: '--color-accent',
|
||||
accentForeground: '--color-accent-foreground',
|
||||
destructive: '--color-destructive',
|
||||
destructiveForeground: '--color-destructive-foreground',
|
||||
border: '--color-border',
|
||||
input: '--color-input',
|
||||
ring: '--color-ring',
|
||||
sidebar: '--sidebar',
|
||||
sidebarForeground: '--sidebar-foreground',
|
||||
sidebarPrimary: '--sidebar-primary',
|
||||
sidebarPrimaryForeground: '--sidebar-primary-foreground',
|
||||
sidebarAccent: '--sidebar-accent',
|
||||
sidebarAccentForeground: '--sidebar-accent-foreground',
|
||||
sidebarBorder: '--sidebar-border',
|
||||
function camelToKebab(str: string): string {
|
||||
return str.replace(/[A-Z]/g, (m) => '-' + m.toLowerCase())
|
||||
}
|
||||
|
||||
export function applyThemeColors(colors: ThemeColors) {
|
||||
const root = document.documentElement
|
||||
for (const [key, cssVar] of Object.entries(CSS_VAR_MAP)) {
|
||||
const value = colors[key as keyof ThemeColors]
|
||||
root.style.setProperty(cssVar, `hsl(${value})`)
|
||||
for (const [key, value] of Object.entries(colors)) {
|
||||
const prop = `--${camelToKebab(key)}`
|
||||
const hsl = `hsl(${value})`
|
||||
root.style.setProperty(prop, hsl)
|
||||
}
|
||||
// Also set on body for portaled components (dialogs, dropdowns, popovers)
|
||||
for (const [key, value] of Object.entries(colors)) {
|
||||
document.body.style.setProperty(`--${camelToKebab(key)}`, `hsl(${value})`)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user