mirror of
https://github.com/Portabase/portabase.git
synced 2026-07-14 11:16:13 +02:00
Starting working on settings Page.
This commit is contained in:
@@ -0,0 +1,36 @@
|
||||
"use client"
|
||||
import {Tabs, TabsContent, TabsList, TabsTrigger} from "@/components/ui/tabs";
|
||||
import {DataTableWithPagination} from "@/components/wrappers/table/data-table-with-pagination";
|
||||
import {usersColumns} from "@/components/wrappers/Dashboard/Settings/SettingsTabs/columns-users";
|
||||
import {User} from "@prisma/client";
|
||||
import {backupColumns} from "@/features/backup/columns";
|
||||
|
||||
|
||||
export type SettingsTabsProps = {
|
||||
users: User[];
|
||||
}
|
||||
|
||||
export const SettingsTabs = (props: SettingsTabsProps) => {
|
||||
|
||||
|
||||
|
||||
|
||||
return(
|
||||
<Tabs defaultValue="informations" >
|
||||
<TabsList className="w-full" >
|
||||
<TabsTrigger className="w-full" value="informations">Informations</TabsTrigger>
|
||||
<TabsTrigger className="w-full" value="users">Users</TabsTrigger>
|
||||
<TabsTrigger className="w-full" value="email">Email</TabsTrigger>
|
||||
<TabsTrigger className="w-full" value="storage">Storage</TabsTrigger>
|
||||
</TabsList>
|
||||
<TabsContent value="informations">
|
||||
ok
|
||||
</TabsContent>
|
||||
<TabsContent value="users" className="h-full justify-between">
|
||||
<DataTableWithPagination columns={usersColumns} data={props.users}/>
|
||||
</TabsContent>
|
||||
<TabsContent value="email">Change your password here.</TabsContent>
|
||||
<TabsContent value="storage">Change your password here.</TabsContent>
|
||||
</Tabs>
|
||||
)
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
"use client"
|
||||
|
||||
import {ColumnDef} from "@tanstack/react-table"
|
||||
import {Badge} from "@/components/ui/badge";
|
||||
import {User} from "@prisma/client";
|
||||
|
||||
export const usersColumns: ColumnDef<User>[] = [
|
||||
{
|
||||
accessorKey: "id",
|
||||
header: "Id",
|
||||
},
|
||||
{
|
||||
accessorKey: "name",
|
||||
header: "Name"
|
||||
},
|
||||
{
|
||||
accessorKey: "email",
|
||||
header: "Email"
|
||||
},
|
||||
{
|
||||
accessorKey: "createdAt",
|
||||
header: "Created At",
|
||||
cell: ({row}) => {
|
||||
return new Date(row.getValue("createdAt")).toLocaleString("fr-FR");
|
||||
},
|
||||
},
|
||||
{
|
||||
accessorKey: "authMethod",
|
||||
header: "Method",
|
||||
cell: ({row}) => {
|
||||
return <Badge variant="outline">{row.getValue("authMethod")}</Badge>
|
||||
},
|
||||
}
|
||||
]
|
||||
Reference in New Issue
Block a user