Mega push vol2

This commit is contained in:
AlacrisDevs
2026-02-05 01:36:06 +02:00
parent 1534e1f0af
commit 9af0ef5307
17 changed files with 1056 additions and 189 deletions

View File

@@ -46,10 +46,30 @@ export const load: LayoutServerLoad = async ({ params, locals }) => {
.eq('org_id', org.id)
.limit(10);
// Fetch recent activity
const { data: recentActivity } = await locals.supabase
.from('activity_log')
.select(`
id,
action,
entity_type,
entity_id,
entity_name,
created_at,
profiles:user_id (
full_name,
email
)
`)
.eq('org_id', org.id)
.order('created_at', { ascending: false })
.limit(10);
return {
org,
role: membership.role,
userRole: membership.role,
members: members ?? []
members: members ?? [],
recentActivity: recentActivity ?? []
};
};