UX Pacientes: drawer de ficha clicable global, cumpleanos en dashboard/agenda, badges VIP/alergias/adeudo en ficha y POS

This commit is contained in:
2026-09-01 22:26:09 +00:00
parent 7261da3ab1
commit 2710d9d92d
9 changed files with 492 additions and 20 deletions

View File

@@ -778,6 +778,11 @@ class SkeenFrontendController(http.Controller):
'phone_confirmed_by': cita.phone_confirmed_by or None,
# 2da confirmación: timestamp del check-in (base del tiempo de espera)
'arrived_at': cita.arrived_at.strftime('%Y-%m-%d %H:%M:%S') if cita.arrived_at else None,
# Cumpleaños del paciente el día de la cita (para badge pastel en agenda)
'patient_birthday': bool(
cita.date and cita.partner_id.birth_date
and (cita.date.month, cita.date.day) == (cita.partner_id.birth_date.month, cita.partner_id.birth_date.day)
),
}
# ============================================================
@@ -1705,6 +1710,7 @@ class SkeenFrontendController(http.Controller):
'migraine': p.migraine,
'faints_with_needles': p.faints_with_needles,
'medical_notes': p.medical_notes or '',
'allergies': p.allergies or '',
# Completitud de expediente
'expediente_completion': p.expediente_completion,
'expediente_missing': p.expediente_missing.split('|') if p.expediente_missing else [],
@@ -3805,6 +3811,7 @@ class SkeenFrontendController(http.Controller):
'id': p.id,
'name': p.name,
'phone': p.phone or '',
'whatsapp': p.whatsapp or '',
'birth_date': p.birth_date.strftime('%Y-%m-%d'),
'occurs_on': occ.strftime('%Y-%m-%d'),
'turning_age': occ.year - p.birth_date.year,