Refactor to generic ERP base
Remove influencer-specific features (campaigns, TikTok, gifts, shadow ledger, contracts, briefings) and consolidate into a clean ERP foundation with core bookkeeping, invoicing, receipts, tax reporting, and calendar functionality. Reorganize database migrations into a clean numbered sequence. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
a25d10a528
commit
0aecf5b41c
@@ -86,7 +86,7 @@ export async function updateSession(request: NextRequest) {
|
||||
// Dashboard routes - require completed onboarding
|
||||
const { data: settings } = await supabase
|
||||
.from('company_settings')
|
||||
.select('onboarding_complete, entity_type')
|
||||
.select('onboarding_complete')
|
||||
.eq('user_id', user.id)
|
||||
.single()
|
||||
|
||||
@@ -95,14 +95,5 @@ export async function updateSession(request: NextRequest) {
|
||||
return NextResponse.redirect(new URL('/onboarding', request.url))
|
||||
}
|
||||
|
||||
// Block light users from EF/AB-only routes
|
||||
if (settings.entity_type === 'light') {
|
||||
const lightBlockedPaths = ['/invoices', '/customers', '/bookkeeping', '/import', '/reports', '/deductions']
|
||||
const isBlocked = lightBlockedPaths.some(p => pathname.startsWith(p))
|
||||
if (isBlocked) {
|
||||
return NextResponse.redirect(new URL('/', request.url))
|
||||
}
|
||||
}
|
||||
|
||||
return supabaseResponse
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user