fix: restaurar cambios revertidos por rebase del servidor

- verificar.php: BASE_URL absoluta en fetch, fix paste multi-dígito
- send_otp.php: mensaje SMS correcto sin dos puntos ni expiración
- module.php: Chat Turnero y Verificar Paciente para recepcionistas

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
Lizandro Guarnizo
2026-07-03 00:13:39 -05:00
co-authored by Claude Sonnet 4.6
parent e1ba78edb8
commit a592ddb30d
3 changed files with 8 additions and 5 deletions
+1 -1
View File
@@ -71,7 +71,7 @@ try {
// Enviar SMS
$numero = preg_replace('/\D/', '', $pac['telefono']);
$mensaje = "Tu código de verificación de Laboratorio es: {$codigo}. Válido por 5 minutos.";
$mensaje = "{$codigo} es tu codigo de verificacion, Laboratorio Ximena Caicedo";
$payload = json_encode(['numero' => $numero, 'mensaje' => $mensaje], JSON_UNESCAPED_UNICODE);
$ch = curl_init($smsUrl . '/api/sms/send');
+3 -1
View File
@@ -29,7 +29,9 @@ $_trLinks = [];
// ── Recepcionista: solo sus escritorios + pantalla TV ─────────
if ($_trIsRecep) {
$_trLinks[] = ['name' => 'Pantalla TV', 'icon' => 'fas fa-tv', 'route' => '/erp.php?m=turnero&v=display_global'];
$_trLinks[] = ['name' => 'Chat Turnero', 'icon' => 'fab fa-whatsapp', 'route' => '/erp.php?m=turnero&v=chat'];
$_trLinks[] = ['name' => 'Verificar Paciente', 'icon' => 'fas fa-id-card', 'route' => '/verificar.php', 'target' => '_blank'];
$_trLinks[] = ['name' => 'Pantalla TV', 'icon' => 'fas fa-tv', 'route' => '/erp.php?m=turnero&v=display_global'];
if (!empty($_trDesks)) {
foreach ($_trDesks as $_d) {
$_trLinks[] = [
+4 -3
View File
@@ -416,6 +416,7 @@ body::after { width: 400px; height: 400px; bottom: -100px; left: -100px; }
</div>
<script>
const BASE_URL = '<?= rtrim(BASE_URL, '/') ?>';
let _cedula = '';
let _nombre = '';
let _timer = null;
@@ -492,7 +493,7 @@ async function enviarOtp() {
hideError();
try {
const r = await fetch('api/public/send_otp.php', {
const r = await fetch(BASE_URL + '/api/public/send_otp.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ cedula }),
@@ -526,7 +527,7 @@ async function verificarOtp() {
hideError();
try {
const r = await fetch('api/public/verify_otp.php', {
const r = await fetch(BASE_URL + '/api/public/verify_otp.php', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ cedula: _cedula, codigo: getOtp() }),
@@ -558,7 +559,7 @@ async function reenviarOtp() {
clearOtp();
try {
const r = await fetch('api/public/send_otp.php', {
const r = await fetch(BASE_URL + '/api/public/send_otp.php', {
method: 'POST', headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({ cedula: _cedula }),
});