From afbf4d537eba117ef836f204e4d4c0430ef359c9 Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Sun, 12 Jul 2026 19:03:02 -0500 Subject: [PATCH] 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 --- admin/src/app/professionals/[id]/page.tsx | 6 +++++- backend/src/professionals/professionals.service.ts | 4 ++-- 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/admin/src/app/professionals/[id]/page.tsx b/admin/src/app/professionals/[id]/page.tsx index 3046a28..40dcc24 100644 --- a/admin/src/app/professionals/[id]/page.tsx +++ b/admin/src/app/professionals/[id]/page.tsx @@ -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() { ? setUserForm({ ...userForm, city: e.target.value })} /> :

{user?.city || '—'}

} +
+ Género +

{user?.gender || '—'}

+
diff --git a/backend/src/professionals/professionals.service.ts b/backend/src/professionals/professionals.service.ts index 57914a3..c6c51db 100644 --- a/backend/src/professionals/professionals.service.ts +++ b/backend/src/professionals/professionals.service.ts @@ -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,