`).join('');
@@ -275,14 +279,18 @@
function closeRescueModal() { document.getElementById('rescueModal').classList.add('hidden'); }
async function resetToManual() {
- if(!confirm("¿Deseas quitar este servicio de automatización y devolverlo al Buzón de Proveedores?")) return;
+ if(!confirm("¿Deseas devolver este servicio a Proveedores? (Desaparecerá de esta lista)")) return;
try {
const res = await fetch(`${API_URL}/providers/scraped/${currentRescueId}`, {
method: 'PUT',
headers: { "Content-Type": "application/json", "Authorization": `Bearer ${localStorage.getItem("token")}` },
body: JSON.stringify({ automation_status: 'manual' })
});
- if (res.ok) { closeRescueModal(); loadAutomations(); showToast("Enviado al Buzón de Proveedores"); }
+ if (res.ok) {
+ closeRescueModal();
+ loadAutomations(); // Esto recarga y aplica el filtro nuevo
+ showToast("Devuelto al Buzón de Proveedores");
+ }
} catch(e) { showToast("Error al resetear", true); }
}