first commit

This commit is contained in:
nBiqoz
2025-10-05 16:10:35 +02:00
parent 201fca4e68
commit 13cd637391
70 changed files with 7287 additions and 130 deletions

View File

@@ -0,0 +1,55 @@
"use client";
import { CollectionTable } from "@/components/collections/collection-table";
import { Badge } from "@/components/ui/badge";
import { Agent } from "@/lib/types";
export function AgentsTable() {
const columns = [
{
key: "_id",
label: "ID",
render: (value: unknown) => (
<span className="font-mono text-xs">{String(value).slice(-8)}</span>
)
},
{
key: "name",
label: "Nom",
render: (value: unknown) => (
<span className="font-semibold">{String(value)}</span>
)
},
{
key: "description",
label: "Description",
render: (value: unknown) => (
<span className="max-w-xs truncate">{String(value) || '-'}</span>
)
},
{
key: "category",
label: "Catégorie",
render: (value: unknown) => (
<Badge variant="outline">{String(value)}</Badge>
)
},
{
key: "isActive",
label: "Statut",
render: (value: unknown) => (
<Badge variant={value ? 'default' : 'destructive'}>
{value ? 'Actif' : 'Inactif'}
</Badge>
)
}
];
return (
<CollectionTable<Agent>
collectionName="agents"
title="Liste des agents"
columns={columns}
/>
);
}