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>
Backend:
- GET /services/admin/professional/:id (JWT-guarded) returns paginated
services for any professional with embedded user (client) info
Admin professional detail page:
- Replace broken all-services-then-filter with new endpoint
- Add month calendar with colored dots per day (click to filter table)
- Services table shows client name/phone, time, colored status badges
- Fix DAY_NAMES array (was 0=Domingo, now 0=Lunes per DB convention)
- Schedule row shows both ranges + continuous_day flag
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- DTO: add payment_methods field so whitelist pipe no longer strips it
- Service upsert(): extract payment_methods and write as Prisma nested upsert instead of passing flat object
- Admin detail page: fix image regex to handle Firebase URLs with query params; fix payment_methods display for 1:1 Prisma relation (object, not array)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Both flags are read by prosappweb from /settings to enable/disable
delivery service and rate display. Saves via the existing PATCH /settings.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Migration 0004: adds is_active column to users table
- Backend: DELETE /users/:id endpoint + is_active field in UpdateUserDto
- Admin UI: block/unblock toggle and delete with confirmation on user detail
- Users list: shows "Bloqueado" badge for inactive users
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- POST /settings/test-email: send test email to diagnose SMTP config
- Admin settings: test email form + last 20 email logs with status/error
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Backend: DELETE /professionals/me resets rejected state so user can retry
- Backend: findRejected/findPending now filter by pro_state
- Admin settings: rejection_wait_days field (default 7)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- deny() now marks is_active:false instead of deleting the record
- New GET /professionals/rejected endpoint (pro_state:3)
- findPendingApprovals now filters only pro_state:1
- Admin list: third tab 'No aprobados' with approve/review actions
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Backend: deactivate and set-pending endpoints for status control
- Admin detail: Aprobar/Rechazar/Desactivar/En revisión buttons based on current state
- Admin detail: Documentos section showing ID photo and certificate
- Admin detail: deny now confirms before deleting
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Backend: include email and phone in users select for professionals
- Admin detail page: RETHUS section shows cedula+code with copy buttons
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Detail page: use Number() before toFixed() since Prisma returns Decimal objects
- Service upsert: create professionals with is_active:false so they appear as pending
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
useParams() can return null during SSR — destructuring null throws TypeError.
Use optional chaining params?.id to prevent the crash.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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>
- Prisma schema: rethus_code y rethus_validated en tabla professionals
- Migración 0001: ALTER TABLE agrega ambas columnas
- DTO: rethus_code y rethus_validated en CreateProfessionalDto y UpdateProfessionalDto
- Service: nuevo método validateRethus, rethus_code incluido en requestProfessional
- Controller: endpoint POST /professionals/:id/validate-rethus (JWT protegido)
- Admin listado pendientes: columna RETHUS con ícono verde/amarillo y enlace al detalle
- Admin detalle profesional: card de validación RETHUS con botón consultar Minsalud y marcar como validado
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- GET /settings retorna {} en lugar de undefined cuando no hay configuracion
(evita error jsonDecode en Flutter que dejaba soporte en gris)
- Autocomplete: agrega components=country:co, radius 20km, remove types=address
para mostrar mas resultados cercanos al usuario
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- support_title, support_description, support_days, support_hours
(los que lee la app Flutter para la pantalla de soporte)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Proxy a Google Places Autocomplete API:
- Lee la API key de /settings/maps-key del backend
- Acepta params: input, location
- Devuelve { results: [{ formatted_address, place_id }] }
- Headers CORS para permitir acceso desde app.prosapp.co
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend: agrega PATCH /users/:id y PATCH /professionals/:id (protegidos).
Admin: pagina de usuario con edicion de nombre/telefono/ciudad/genero;
pagina de profesional con dos secciones editables independientes
(datos personales y perfil profesional).
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Backend: GET /settings/maps-key (public) + PATCH /settings/maps (protected)
- Admin: sección para guardar/ver estado de la Maps API key
- Flutter web carga la key dinámicamente desde el backend
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend:
- CRUD completo para countries, regions y cities
- GET /settings/policy/:key — página HTML pública para políticas
- GET/PATCH /settings/policies/:key — admin endpoints protegidos
Admin:
- /locations: árbol interactivo País → Región → Ciudad con add/edit/delete
- /settings: editor de Política de Privacidad y Términos con enlace público copiable
- Sidebar: Ciudades → Ubicaciones
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Login page: split layout with gradient panel (desktop) + form,
ProsApp logo mark, feature list, consistent blue brand colors
- Sidebar: replace plain text with logo mark + brand name
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Backend:
- Add SmsService + SmsModule: send OTP via u-site.app provider, 5-min TTL
- Auth endpoints: POST /auth/send-otp, POST /auth/phone (login by phone+code),
POST /auth/verify-phone (link), PATCH /auth/change-password
- is_phone_verified included in JWT token response
- GET /comments (admin, JWT-protected) with author/destination names
Admin:
- Users list: link to detail page per row
- User detail: inline edit form (name, city, phone) with PATCH /users/:id
- Services list: link to detail page per row
- Service detail: status change dropdown (PATCH /services/:id/status)
- New Comments page: summary stats + full table with star ratings
- New SMS settings page: configure API key + send test SMS
- Sidebar: added Comments and SMS entries
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>