show gender on admin professional detail page

Add gender: true to users select in findById() (both lookup paths)
and render it in the personal data card in the admin frontend.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-12 19:03:02 -05:00
co-authored by Claude Sonnet 4.6
parent 2180e0480c
commit afbf4d537e
2 changed files with 7 additions and 3 deletions
+5 -1
View File
@@ -15,7 +15,7 @@ import {
ExternalLink, Copy, ChevronLeft, ChevronRight, Calendar,
} from 'lucide-react';
interface User { id: string; name: string; email?: string; phone?: string; city?: string; picture?: string; }
interface User { id: string; name: string; email?: string; phone?: string; city?: string; picture?: string; gender?: string | null; }
// DB convention: day_of_week 0=Mon … 6=Sun
interface Schedule {
id: string; day_of_week: number; enabled: boolean; continuous_day?: boolean;
@@ -419,6 +419,10 @@ export default function ProfessionalDetailPage() {
? <Input value={userForm.city} onChange={(e) => setUserForm({ ...userForm, city: e.target.value })} />
: <p className="font-medium">{user?.city || '—'}</p>}
</div>
<div className="space-y-1">
<span className="text-muted-foreground">Género</span>
<p className="font-medium capitalize">{user?.gender || '—'}</p>
</div>
</CardContent>
</Card>
@@ -46,7 +46,7 @@ export class ProfessionalsService {
let prof = await this.prisma.professionals.findUnique({
where: { id },
include: {
users: { select: { id: true, name: true, email: true, phone: true, picture: true, city: true } },
users: { select: { id: true, name: true, email: true, phone: true, picture: true, city: true, gender: true } },
schedules: { orderBy: { day_of_week: 'asc' } },
specializations: true,
payment_methods: true,
@@ -56,7 +56,7 @@ export class ProfessionalsService {
prof = await this.prisma.professionals.findUnique({
where: { user_id: id },
include: {
users: { select: { id: true, name: true, email: true, phone: true, picture: true, city: true } },
users: { select: { id: true, name: true, email: true, phone: true, picture: true, city: true, gender: true } },
schedules: { orderBy: { day_of_week: 'asc' } },
specializations: true,
payment_methods: true,