2025-11-01 14:50:08 +01:00
|
|
|
import {UserWithAccounts} from "@/db/schema/02_user";
|
2025-08-02 11:14:51 +02:00
|
|
|
import {Card, CardContent, CardDescription, CardHeader, CardTitle} from "@/components/ui/card";
|
|
|
|
|
import {DataTable} from "@/components/wrappers/common/table/data-table";
|
2025-11-01 19:38:05 +01:00
|
|
|
import {usersColumnsAdmin} from "@/components/wrappers/dashboard/admin/tabs/admin-user-tab/columns-users";
|
2025-08-02 11:14:51 +02:00
|
|
|
|
|
|
|
|
export type AdminUsersTableProps = {
|
|
|
|
|
users: UserWithAccounts[];
|
|
|
|
|
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export const AdminUsersTable = (props: AdminUsersTableProps) => {
|
|
|
|
|
const {users} = props;
|
|
|
|
|
return (
|
|
|
|
|
<div className="flex flex-col gap-y-4 h-full py-4">
|
2025-11-08 20:07:49 +01:00
|
|
|
<Card className="h-full ">
|
2025-08-02 11:14:51 +02:00
|
|
|
<CardHeader>
|
|
|
|
|
<CardTitle>Active users</CardTitle>
|
|
|
|
|
<CardDescription>Manage your users</CardDescription>
|
|
|
|
|
</CardHeader>
|
2025-11-08 20:07:49 +01:00
|
|
|
<CardContent className="h-full">
|
2025-11-01 14:50:08 +01:00
|
|
|
<DataTable
|
|
|
|
|
enableSelect={false}
|
|
|
|
|
columns={usersColumnsAdmin}
|
|
|
|
|
data={users}/>
|
2025-08-02 11:14:51 +02:00
|
|
|
</CardContent>
|
|
|
|
|
</Card>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|