ui: show ventas generation errors as toast in preview
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
c463c6ecc3
commit
8747ff950e
@@ -364,6 +364,14 @@ async function previewAutomation() {
|
|||||||
psSection.classList.add('hidden');
|
psSection.classList.add('hidden');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Ventas - errores de generación
|
||||||
|
if (data.ventas_gen_errors && data.ventas_gen_errors.length > 0) {
|
||||||
|
data.ventas_gen_errors.forEach(e => {
|
||||||
|
showToast(`Error generando venta ${e.factura}: ${e.error}`, 'error');
|
||||||
|
console.error('ventas_gen_error', e);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
// Ventas
|
// Ventas
|
||||||
const vtaSection = document.getElementById('ventas-section');
|
const vtaSection = document.getElementById('ventas-section');
|
||||||
if (_pasos.has('ventas') && data.ventas_preview && data.ventas_preview.length > 0) {
|
if (_pasos.has('ventas') && data.ventas_preview && data.ventas_preview.length > 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user