Add Ver button to active professionals in admin list
Active professionals now have a link to the detail page where they can be edited, RETHUS validated, etc. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
d551739d0c
commit
d1f93d6d13
@@ -9,7 +9,7 @@ import { Badge } from '@/components/ui/badge';
|
||||
import { toast } from 'sonner';
|
||||
import { Tabs, TabsContent, TabsList, TabsTrigger } from '@/components/ui/tabs';
|
||||
import Link from 'next/link';
|
||||
import { ShieldCheck, ShieldAlert } from 'lucide-react';
|
||||
import { ShieldCheck, ShieldAlert, Eye } from 'lucide-react';
|
||||
|
||||
interface Professional {
|
||||
id: string;
|
||||
@@ -83,21 +83,29 @@ export default function ProfessionalsPage() {
|
||||
<TableHead>Identificación</TableHead>
|
||||
<TableHead>Tarifa</TableHead>
|
||||
<TableHead>Estado</TableHead>
|
||||
<TableHead className="text-right">Acción</TableHead>
|
||||
</TableRow>
|
||||
</TableHeader>
|
||||
<TableBody>
|
||||
{loading ? (
|
||||
<TableRow><TableCell colSpan={5} className="text-center">Cargando...</TableCell></TableRow>
|
||||
<TableRow><TableCell colSpan={6} className="text-center">Cargando...</TableCell></TableRow>
|
||||
) : approved.length === 0 ? (
|
||||
<TableRow><TableCell colSpan={5} className="text-center">Sin resultados</TableCell></TableRow>
|
||||
<TableRow><TableCell colSpan={6} className="text-center">Sin resultados</TableCell></TableRow>
|
||||
) : (
|
||||
approved.map((p) => (
|
||||
<TableRow key={p.id}>
|
||||
<TableCell className="font-medium">{p.users?.name}</TableCell>
|
||||
<TableCell>{p.profession || '—'}</TableCell>
|
||||
<TableCell>{p.identification || '—'}</TableCell>
|
||||
<TableCell>${p.rate}</TableCell>
|
||||
<TableCell>{p.rate != null ? `$${p.rate}` : '—'}</TableCell>
|
||||
<TableCell><Badge variant="default">Activo</Badge></TableCell>
|
||||
<TableCell className="text-right">
|
||||
<Link href={`/professionals/${p.id}`}>
|
||||
<Button size="sm" variant="outline">
|
||||
<Eye className="mr-1 h-4 w-4" /> Ver
|
||||
</Button>
|
||||
</Link>
|
||||
</TableCell>
|
||||
</TableRow>
|
||||
))
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user