handling changes to stripe account where owner needs to provide information
This commit is contained in:
@@ -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>
|
||||
|
||||
Reference in New Issue
Block a user