Allow dashboard access with active package
Some checks failed
linter / quality (push) Has been cancelled
tests / ci (push) Has been cancelled
tests / ui (push) Has been cancelled

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

View File

@@ -57,7 +57,7 @@ describe('resolveOnboardingRedirect', () => {
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({
hasEvents: false,
hasActivePackage: true,
@@ -67,7 +67,7 @@ describe('resolveOnboardingRedirect', () => {
isOnboardingDismissed: false,
isOnboardingCompleted: false,
});
expect(result).toBe(ADMIN_BILLING_PATH);
expect(result).toBeNull();
});
it('returns null when remaining events are available', () => {

View File

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