Working on add/delete users to workspace. Edit workspaces and some permissions.

This commit is contained in:
charles-gauthereau
2024-12-30 21:10:49 +01:00
parent 379271501d
commit e1a7ca8558
19 changed files with 466 additions and 58 deletions
@@ -2,9 +2,17 @@ import {PageParams} from "@/types/next";
import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
import {prisma} from "@/prisma";
import {ProjectForm} from "@/components/wrappers/dashboard/projects/ProjectsForm/ProjectForm";
import {notFound} from "next/navigation";
import {getCurrentOrganizationSlug} from "@/features/dashboard/organization-cookie";
export default async function RoutePage(props: PageParams<{}>) {
export default async function RoutePage(props: PageParams<{slug: string}>) {
const {slug: organizationSlug} = await props.params
const currentOrganizationSlug = await getCurrentOrganizationSlug()
if(currentOrganizationSlug != organizationSlug) {
notFound()
}
const availableDatabases = await prisma.database.findMany({
where: {
@@ -20,7 +28,7 @@ export default async function RoutePage(props: PageParams<{}>) {
const organization = await prisma.organization.findFirst({
where: {
slug: 'default',
slug: currentOrganizationSlug,
}
})