feat(usuarios): gestión de firma por profesional desde perfil de usuario

Botón firma en tabla de usuarios (verde si ya tiene, gris si no).
Modal con canvas para dibujar o subir imagen, vista previa de firma
actual y opción de eliminar. APIs get/save_firma_usuario.php para admins.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-07 23:16:26 -05:00
co-authored by Claude Sonnet 4.6
parent bad3d42a92
commit 233144c017
4 changed files with 237 additions and 0 deletions
+2
View File
@@ -21,6 +21,7 @@ $users = $db->fetchAll("
u.enfermera_id,
u.last_login,
u.created_at,
(u.firma_svg IS NOT NULL) AS tiene_firma,
r.name AS role_name,
r.color AS role_color,
r.slug AS role_slug,
@@ -33,6 +34,7 @@ $users = $db->fetchAll("
foreach ($users as &$u) {
$u['is_active'] = (bool)$u['is_active'];
$u['tiene_firma'] = (bool)$u['tiene_firma'];
$u['role_name'] = $u['role_name'] ?? ucfirst($u['role'] ?? 'admin');
$u['role_color'] = $u['role_color'] ?? '#0d6efd';
}