Fixed strange behaviour on opening and closing the Invoice detail on the clasification report from

featureBotClasifcacion
alfonso 1 year ago
parent 18b1428632
commit dfe741a194
  1. 25
      src/Components/Clientes/Amazon/Reportes/Clasification/Pending/RptAmazonPendingClasificationInvoices.tsx

@ -114,8 +114,7 @@ export default function RtpAmazonPendingInvoices(
}
const toggleExpandRow = (row: I2096Headers) => {
//if (!row.max)
check4Updates(row.id)
if (!row.max) check4Updates(row.id)
let Invoice: I2096Headers[] = mInvoices.filter((item) => item.id === row.id)
const Obj = { ...Invoice[0] }
Obj.max = !Obj.max
@ -309,10 +308,11 @@ export default function RtpAmazonPendingInvoices(
}
const RunBOT = (row: I2096Headers) => {
if (!BOTEnabled) {
if (!BOTEnabled || row.max) {
toggleExpandRow(row)
return false
}
if (BOTEnabled && !row.max) {
setWaitingMessage('BOT trabajando...')
setWaitingDialog(true)
DSAmazon.ClasificacionBOT(row.id)
@ -335,6 +335,7 @@ export default function RtpAmazonPendingInvoices(
return
})
}
}
return (
<div>
@ -350,9 +351,17 @@ export default function RtpAmazonPendingInvoices(
</Card.Title>
</Col>
<Col xs={3}></Col>
<Col xs={2} style={{ paddingTop: '20px' }}>
<Form>
<Form.Check // prettier-ignore
<Col xs={2}>
<Row style={{}}>
<Col xs={4} style={{ textAlign: 'right' }}>
<IconContext.Provider
value={{ color: 'green', size: '65px' }}
>
<VscHubot />
</IconContext.Provider>
</Col>
<Col xs={8} style={{ textAlign: 'left', paddingTop: '25px' }}>
<Form.Check
type="switch"
id="custom-switch"
label="¿Aplica BOT?"
@ -361,7 +370,9 @@ export default function RtpAmazonPendingInvoices(
setBOTEnabled(!BOTEnabled)
}}
/>
</Form>
</Col>
</Row>
<Form></Form>
</Col>
<Col xs={2}>
<Alert

Loading…
Cancel
Save