fix(automation): quitar filtro por convenio del panel de control
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c584097426
commit
31c0b71c90
@@ -11,7 +11,7 @@
|
|||||||
<i class="fas fa-paper-plane mr-2 text-blue-500"></i>Envío automático por fecha
|
<i class="fas fa-paper-plane mr-2 text-blue-500"></i>Envío automático por fecha
|
||||||
</h3>
|
</h3>
|
||||||
<p class="text-xs text-gray-500 mt-1">
|
<p class="text-xs text-gray-500 mt-1">
|
||||||
Selecciona fecha, pasos activos y convenio (opcional) para enviar a TNS.
|
Selecciona fecha y pasos activos para enviar a TNS.
|
||||||
</p>
|
</p>
|
||||||
</div>
|
</div>
|
||||||
<div class="p-6 space-y-4">
|
<div class="p-6 space-y-4">
|
||||||
@@ -22,11 +22,6 @@
|
|||||||
<input type="date" id="fecha-input" value="{{ today }}"
|
<input type="date" id="fecha-input" value="{{ today }}"
|
||||||
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
class="w-full px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
||||||
</div>
|
</div>
|
||||||
<div>
|
|
||||||
<label class="block text-sm font-medium text-gray-700 mb-1">Convenio <span class="text-xs text-gray-400">(vacío=todos)</span></label>
|
|
||||||
<input type="text" id="contrato-input" placeholder="ej: 011"
|
|
||||||
class="w-28 px-3 py-2 border border-gray-300 rounded-lg text-sm focus:ring-2 focus:ring-blue-500 focus:border-blue-500">
|
|
||||||
</div>
|
|
||||||
<button onclick="previewAutomation()" id="btn-preview"
|
<button onclick="previewAutomation()" id="btn-preview"
|
||||||
class="px-5 py-2 bg-gray-600 hover:bg-gray-700 text-white font-medium rounded-lg transition-colors flex items-center gap-2 whitespace-nowrap">
|
class="px-5 py-2 bg-gray-600 hover:bg-gray-700 text-white font-medium rounded-lg transition-colors flex items-center gap-2 whitespace-nowrap">
|
||||||
<i class="fas fa-eye"></i> Vista previa
|
<i class="fas fa-eye"></i> Vista previa
|
||||||
@@ -260,10 +255,8 @@ async function previewAutomation() {
|
|||||||
_previewData = null;
|
_previewData = null;
|
||||||
_rdaJsonStore = {};
|
_rdaJsonStore = {};
|
||||||
|
|
||||||
const contrato = document.getElementById('contrato-input').value.trim();
|
|
||||||
const form = new FormData();
|
const form = new FormData();
|
||||||
form.append('fecha', fecha);
|
form.append('fecha', fecha);
|
||||||
if (contrato) form.append('contrato', contrato);
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const resp = await fetch('/automation/preview', { method: 'POST', body: form, credentials: 'include' });
|
const resp = await fetch('/automation/preview', { method: 'POST', body: form, credentials: 'include' });
|
||||||
@@ -438,7 +431,6 @@ function cerrarModalConfirmar() {
|
|||||||
async function confirmarEnvio() {
|
async function confirmarEnvio() {
|
||||||
cerrarModalConfirmar();
|
cerrarModalConfirmar();
|
||||||
const fecha = document.getElementById('fecha-input').value;
|
const fecha = document.getElementById('fecha-input').value;
|
||||||
const contrato = document.getElementById('contrato-input').value.trim();
|
|
||||||
const btn = document.getElementById('btn-run');
|
const btn = document.getElementById('btn-run');
|
||||||
showLoading(btn);
|
showLoading(btn);
|
||||||
document.getElementById('btn-preview').disabled = true;
|
document.getElementById('btn-preview').disabled = true;
|
||||||
@@ -446,7 +438,6 @@ async function confirmarEnvio() {
|
|||||||
|
|
||||||
const form = new FormData();
|
const form = new FormData();
|
||||||
form.append('fecha', fecha);
|
form.append('fecha', fecha);
|
||||||
if (contrato) form.append('contrato', contrato);
|
|
||||||
form.append('pasos', [..._pasos].join(','));
|
form.append('pasos', [..._pasos].join(','));
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|||||||
Reference in New Issue
Block a user