Fixed bot mechanism

featureBotClasifcacion
alfonso 1 year ago
parent dfe741a194
commit d4a7d92473
  1. 44
      src/Components/Clientes/Amazon/Reportes/Clasification/Pending/RptAmazonPendingClasificationInvoices.tsx

@ -312,28 +312,32 @@ export default function RtpAmazonPendingInvoices(
toggleExpandRow(row) toggleExpandRow(row)
return false return false
} }
if (BOTEnabled && !row.max) { if (BOTEnabled) {
setWaitingMessage('BOT trabajando...') // if (!row.max) {
setWaitingDialog(true) setWaitingMessage('BOT trabajando...')
DSAmazon.ClasificacionBOT(row.id) setWaitingDialog(true)
.then((response) => { DSAmazon.ClasificacionBOT(row.id)
if (response.data) { .then((response) => {
setIDFactura(0) if (response.data) {
setFactura('') setIDFactura(0)
setShowModalInvoiceFile(false) setFactura('')
setShowModalInvoiceFile(false)
setWaitingDialog(false)
//loadReport()
toggleExpandRow(row)
return
}
})
.catch((e: Error) => {
setHeader('Error')
setMsg('Ocurrio un error')
setShowModalDeleteInvoice(false)
setWaitingDialog(false) setWaitingDialog(false)
//loadReport()
toggleExpandRow(row)
return return
} })
}) /* } else {
.catch((e: Error) => { toggleExpandRow(row)
setHeader('Error') } */
setMsg('Ocurrio un error')
setShowModalDeleteInvoice(false)
setWaitingDialog(false)
return
})
} }
} }

Loading…
Cancel
Save