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:
co-authored by
Claude Sonnet 4.6
parent
e1ba78edb8
commit
a592ddb30d
@@ -71,7 +71,7 @@ try {
|
|||||||
|
|
||||||
// Enviar SMS
|
// Enviar SMS
|
||||||
$numero = preg_replace('/\D/', '', $pac['telefono']);
|
$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);
|
$payload = json_encode(['numero' => $numero, 'mensaje' => $mensaje], JSON_UNESCAPED_UNICODE);
|
||||||
|
|
||||||
$ch = curl_init($smsUrl . '/api/sms/send');
|
$ch = curl_init($smsUrl . '/api/sms/send');
|
||||||
|
|||||||
@@ -29,7 +29,9 @@ $_trLinks = [];
|
|||||||
|
|
||||||
// ── Recepcionista: solo sus escritorios + pantalla TV ─────────
|
// ── Recepcionista: solo sus escritorios + pantalla TV ─────────
|
||||||
if ($_trIsRecep) {
|
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)) {
|
if (!empty($_trDesks)) {
|
||||||
foreach ($_trDesks as $_d) {
|
foreach ($_trDesks as $_d) {
|
||||||
$_trLinks[] = [
|
$_trLinks[] = [
|
||||||
|
|||||||
+4
-3
@@ -416,6 +416,7 @@ body::after { width: 400px; height: 400px; bottom: -100px; left: -100px; }
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
|
const BASE_URL = '<?= rtrim(BASE_URL, '/') ?>';
|
||||||
let _cedula = '';
|
let _cedula = '';
|
||||||
let _nombre = '';
|
let _nombre = '';
|
||||||
let _timer = null;
|
let _timer = null;
|
||||||
@@ -492,7 +493,7 @@ async function enviarOtp() {
|
|||||||
hideError();
|
hideError();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const r = await fetch('api/public/send_otp.php', {
|
const r = await fetch(BASE_URL + '/api/public/send_otp.php', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ cedula }),
|
body: JSON.stringify({ cedula }),
|
||||||
@@ -526,7 +527,7 @@ async function verificarOtp() {
|
|||||||
hideError();
|
hideError();
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const r = await fetch('api/public/verify_otp.php', {
|
const r = await fetch(BASE_URL + '/api/public/verify_otp.php', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ cedula: _cedula, codigo: getOtp() }),
|
body: JSON.stringify({ cedula: _cedula, codigo: getOtp() }),
|
||||||
@@ -558,7 +559,7 @@ async function reenviarOtp() {
|
|||||||
clearOtp();
|
clearOtp();
|
||||||
|
|
||||||
try {
|
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' },
|
method: 'POST', headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ cedula: _cedula }),
|
body: JSON.stringify({ cedula: _cedula }),
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user