Add account hierarchy framework with migrations, RLS policies, and UI components

This commit is contained in:
T. Zehetbauer
2026-03-31 22:18:04 +02:00
parent 7e7da0b465
commit 59546ad6d2
262 changed files with 11671 additions and 3927 deletions

View File

@@ -1,6 +1,8 @@
import 'server-only';
import { SupabaseClient } from '@supabase/supabase-js';
import { getLogger } from '@kit/shared/logger';
import { loadTeamWorkspace } from '~/home/[account]/_lib/server/team-account-workspace.loader';
import { Database } from '~/lib/database.types';
@@ -49,7 +51,11 @@ async function loadAccountMembers(
});
if (error) {
console.error(error);
const logger = await getLogger();
logger.error(
{ error, context: 'load-account-members' },
'Failed to load account members',
);
throw error;
}
@@ -70,7 +76,11 @@ async function loadInvitations(
});
if (error) {
console.error(error);
const logger = await getLogger();
logger.error(
{ error, context: 'load-invitations' },
'Failed to load account invitations',
);
throw error;
}