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)
return false
}
if (BOTEnabled && !row.max) {
setWaitingMessage('BOT trabajando...')
setWaitingDialog(true)
DSAmazon.ClasificacionBOT(row.id)
.then((response) => {
if (response.data) {
setIDFactura(0)
setFactura('')
setShowModalInvoiceFile(false)
if (BOTEnabled) {
// if (!row.max) {
setWaitingMessage('BOT trabajando...')
setWaitingDialog(true)
DSAmazon.ClasificacionBOT(row.id)
.then((response) => {
if (response.data) {
setIDFactura(0)
setFactura('')
setShowModalInvoiceFile(false)
setWaitingDialog(false)
//loadReport()
toggleExpandRow(row)
return
}
})
.catch((e: Error) => {
setHeader('Error')
setMsg('Ocurrio un error')
setShowModalDeleteInvoice(false)
setWaitingDialog(false)
//loadReport()
toggleExpandRow(row)
return
}
})
.catch((e: Error) => {
setHeader('Error')
setMsg('Ocurrio un error')
setShowModalDeleteInvoice(false)
setWaitingDialog(false)
return
})
})
/* } else {
toggleExpandRow(row)
} */
}
}

Loading…
Cancel
Save