feat: add approvals workflow and unified member invitation management across projects, workspaces, and videos

This commit is contained in:
Yusuf İpek
2026-02-25 16:24:45 +03:00
parent 0ae1becc1b
commit a2b07b3e19
36 changed files with 3122 additions and 982 deletions
+11
View File
@@ -49,6 +49,16 @@ export default async function DashboardPage({
distinct: ['workspaceId']
});
const creatableWorkspaces = await db.workspace.count({
where: {
OR: [
{ ownerId: session.user.id },
{ members: { some: { userId: session.user.id, role: 'ADMIN' } } },
],
},
});
const canCreateProjects = creatableWorkspaces > 0;
const workspaceMap = new Map<string, string>();
for (const project of accessibleProjects) {
if (project.workspace) {
@@ -105,6 +115,7 @@ export default async function DashboardPage({
serializedProjects={serializedProjects}
workspaces={workspaces}
totalPages={totalPages}
canCreateProjects={canCreateProjects}
/>
);
}