diff --git a/configuracion.html b/configuracion.html
index 19be8ef..5a3000f 100644
--- a/configuracion.html
+++ b/configuracion.html
@@ -1243,14 +1243,12 @@
} catch(e) { console.error("Error cargando ajustes del robot", e); }
}
- async function saveRobotConfig() {
- // Ponemos el botón en modo "Cargando..."
+ async function saveRobotConfig() {
const btn = document.querySelector('button[onclick="saveRobotConfig()"]');
const originalHtml = btn.innerHTML;
btn.innerHTML = ' Guardando...';
lucide.createIcons();
- // Construimos SOLO el objeto del robot (el servidor ya se encarga de no borrar el de WhatsApp)
const payload = {
robot_homeserve: {
assign: {
@@ -1263,7 +1261,7 @@
date: {
enabled: document.getElementById('hs_cfg_date_enabled').checked,
status: document.getElementById('hs_cfg_date_status').value,
- days_next: parseInt(document.getElementById('hs_cfg_date_days').value) || 0,
+ // Ya no guardamos "days_next" aquí, el servidor usará la fecha de la cita
check_inform: document.getElementById('hs_cfg_date_inform').checked,
obs: document.getElementById('hs_cfg_date_obs').value
},
@@ -1292,7 +1290,6 @@
} catch(e) {
showToast("❌ Error de conexión", true);
} finally {
- // Restauramos el botón
btn.innerHTML = originalHtml;
lucide.createIcons();
}