mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
adding administration panel.
This commit is contained in:
@@ -0,0 +1,45 @@
|
||||
import {PageParams} from "@/types/next";
|
||||
|
||||
import {Page, PageContent, PageHeader, PageTitle} from "@/features/layout/page";
|
||||
import {requiredCurrentUser} from "@/auth/current-user";
|
||||
import {prisma} from "@/prisma";
|
||||
import {AdminTabs} from "@/components/wrappers/Dashboard/admin/admin-tabs";
|
||||
|
||||
|
||||
export default async function RoutePage(props: PageParams<{}>) {
|
||||
|
||||
|
||||
const user = await requiredCurrentUser()
|
||||
|
||||
const users = await prisma.user.findMany({
|
||||
where: {
|
||||
// id: {
|
||||
// not: user.id
|
||||
// },
|
||||
deleted: {not: true},
|
||||
|
||||
}
|
||||
})
|
||||
|
||||
console.log(users)
|
||||
|
||||
const settings = await prisma.settings.findUnique({
|
||||
where: {
|
||||
name: "system"
|
||||
}
|
||||
})
|
||||
|
||||
return (
|
||||
<Page>
|
||||
<PageHeader>
|
||||
<PageTitle>
|
||||
Administration Panel
|
||||
</PageTitle>
|
||||
</PageHeader>
|
||||
<PageContent className="mt-10">
|
||||
<AdminTabs settings={settings} currentUser={user} users={users}/>
|
||||
|
||||
</PageContent>
|
||||
</Page>
|
||||
)
|
||||
}
|
||||
Reference in New Issue
Block a user