feat(billing): P1f Stripe UI — admin config panel + member dues card
Settings: StripeBillingPanel (admin) — mode, publishable key, write-only secret/webhook secret, per-tier price ids, grace days; shows the per-space webhook URL + which events to subscribe + Portal-activation reminder. /me: DuesCard — status from getMyBilling, 'Pay dues' (startDuesCheckout redirect) when not active, 'Manage billing' (startBillingPortal) when a customer exists. Self-contained client components; settings page composes the panel after SettingsClient.
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
import { createClient } from '@/lib/supabase/server'
|
||||
import SettingsClient from './settings-client'
|
||||
import { StripeBillingPanel } from '@/components/settings/stripe-billing-panel'
|
||||
import { redirect } from 'next/navigation'
|
||||
|
||||
export default async function SettingsPage() {
|
||||
@@ -25,11 +26,14 @@ export default async function SettingsPage() {
|
||||
.from('integrations').select('*').eq('space_id', member.space_id)
|
||||
|
||||
return (
|
||||
<SettingsClient
|
||||
space={space}
|
||||
isAdmin={isAdmin}
|
||||
integrations={integrations ?? []}
|
||||
currentRole={member.role}
|
||||
/>
|
||||
<>
|
||||
<SettingsClient
|
||||
space={space}
|
||||
isAdmin={isAdmin}
|
||||
integrations={integrations ?? []}
|
||||
currentRole={member.role}
|
||||
/>
|
||||
<StripeBillingPanel spaceId={member.space_id} />
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user