handling changes to stripe account where owner needs to provide information

This commit is contained in:
jackiettran
2026-01-08 19:08:14 -05:00
parent 0ea35e9d6f
commit e2e32f7632
8 changed files with 586 additions and 16 deletions

View File

@@ -125,6 +125,11 @@ const EarningsDashboard: React.FC = () => {
const hasStripeAccount = !!userProfile?.stripeConnectedAccountId;
const isOnboardingComplete = accountStatus?.detailsSubmitted ?? false;
const payoutsEnabled = accountStatus?.payoutsEnabled ?? true;
// Show setup card if: no account, onboarding incomplete, or payouts disabled
const showSetupCard =
!hasStripeAccount || !isOnboardingComplete || !payoutsEnabled;
return (
<div className="container mt-4">
@@ -147,8 +152,8 @@ const EarningsDashboard: React.FC = () => {
</div>
)}
{/* Earnings Setup - only show if not fully set up */}
{(!hasStripeAccount || !isOnboardingComplete) && (
{/* Earnings Setup - show if not fully set up or payouts disabled */}
{showSetupCard && (
<div className="card mb-4">
<div className="card-header">
<h5 className="mb-0">Earnings Setup</h5>
@@ -157,6 +162,7 @@ const EarningsDashboard: React.FC = () => {
<EarningsStatus
hasStripeAccount={hasStripeAccount}
isOnboardingComplete={isOnboardingComplete}
payoutsEnabled={payoutsEnabled}
onSetupClick={() => setShowOnboarding(true)}
/>
</div>