From 93e2ed6665d2c31ed1646b93746a518977126e2a Mon Sep 17 00:00:00 2001 From: Fabio-Ramirez Date: Wed, 7 Oct 2026 14:32:49 -0300 Subject: [PATCH] AM - Asignar turno para paciente familiar --- src/app/home/home.page.html | 2 +- .../pages/mis-familiares/mis-familiares.page.html | 4 ++-- .../turnos/prestaciones/turnos-prestaciones.ts | 13 ++++++++++++- src/theme/main.scss | 2 +- 4 files changed, 16 insertions(+), 5 deletions(-) diff --git a/src/app/home/home.page.html b/src/app/home/home.page.html index 4330b5dbe..8db51a212 100644 --- a/src/app/home/home.page.html +++ b/src/app/home/home.page.html @@ -14,7 +14,7 @@

- Hola {{ paciente?.alias || user.nombre }} + Hola {{ paciente?.alias || user.nombre || user.referencia?.nombre }}

Bienvenido

Principal

- {{relacion.nombre}} {{relacion.apellido}}
+ {{relacion.referencia.nombre}} {{relacion.referencia.apellido}}
@@ -41,7 +41,7 @@ -
+

No tienes familiares asociados a tu cuenta

diff --git a/src/app/pages/turnos/prestaciones/turnos-prestaciones.ts b/src/app/pages/turnos/prestaciones/turnos-prestaciones.ts index cf4567009..cb5330f2b 100644 --- a/src/app/pages/turnos/prestaciones/turnos-prestaciones.ts +++ b/src/app/pages/turnos/prestaciones/turnos-prestaciones.ts @@ -61,7 +61,9 @@ export class TurnosPrestacionesPage implements OnDestroy, OnInit { this.idPaciente = params.idPaciente; }); // Es un dispositivo? - if (this.platform.is('android') || this.platform.is('ios')) { + + if (this.platform.is('cordova')) { + // Fuerza el pedido de permiso de GPS antes de intentar geolocalizar this.checker.diagnostic.isLocationEnabled().then((enabled: boolean) => { if (enabled) { @@ -81,7 +83,16 @@ export class TurnosPrestacionesPage implements OnDestroy, OnInit { // Sin permiso para GPS, muestra mensaje "Activar por favor" en HTML this.solicitarUbicacion(); } + }).catch(err => { + console.error('Error al verificar ubicación:', err); + this.GPSAvailable = true; + this.ubicacionActual(); }); + } else { + // Entorno Web/Navegador + this.GPSAvailable = true; + this.loader = true; + this.ubicacionActual(); } } diff --git a/src/theme/main.scss b/src/theme/main.scss index 490011b12..ffca1cd3e 100644 --- a/src/theme/main.scss +++ b/src/theme/main.scss @@ -397,7 +397,7 @@ ion-content { // } } - .logo-home { +.logo-home { display: flex !important; margin-top: 120px;