Allow dashboard access with active package

This commit is contained in:
Codex Agent
2026-01-16 13:44:58 +01:00
parent bc4142de4d
commit 3b3aee1703
2 changed files with 3 additions and 3 deletions

View File

@@ -57,7 +57,7 @@ describe('resolveOnboardingRedirect', () => {
expect(result).toBe(ADMIN_BILLING_PATH); expect(result).toBe(ADMIN_BILLING_PATH);
}); });
it('redirects to billing when no remaining events', () => { it('returns null when no remaining events but an active package exists', () => {
const result = resolveOnboardingRedirect({ const result = resolveOnboardingRedirect({
hasEvents: false, hasEvents: false,
hasActivePackage: true, hasActivePackage: true,
@@ -67,7 +67,7 @@ describe('resolveOnboardingRedirect', () => {
isOnboardingDismissed: false, isOnboardingDismissed: false,
isOnboardingCompleted: false, isOnboardingCompleted: false,
}); });
expect(result).toBe(ADMIN_BILLING_PATH); expect(result).toBeNull();
}); });
it('returns null when remaining events are available', () => { it('returns null when remaining events are available', () => {

View File

@@ -34,7 +34,7 @@ export function resolveOnboardingRedirect({
return null; return null;
} }
if (!hasEvents && (!hasActivePackage || (remainingEvents !== undefined && remainingEvents !== null && remainingEvents <= 0))) { if (!hasEvents && !hasActivePackage) {
return ADMIN_BILLING_PATH; return ADMIN_BILLING_PATH;
} }