diff --git a/src/Components/Clientes/Amazon/Reportes/Clasification/WaitingAnswerFromAmazon/RptPendingAnswerFromAmazon.tsx b/src/Components/Clientes/Amazon/Reportes/Clasification/WaitingAnswerFromAmazon/RptPendingAnswerFromAmazon.tsx index 6de052d..3f4915c 100644 --- a/src/Components/Clientes/Amazon/Reportes/Clasification/WaitingAnswerFromAmazon/RptPendingAnswerFromAmazon.tsx +++ b/src/Components/Clientes/Amazon/Reportes/Clasification/WaitingAnswerFromAmazon/RptPendingAnswerFromAmazon.tsx @@ -110,13 +110,13 @@ export default function RptPendingAnswerFromAmazon( } const getExceptionCode = (id: number) => { - // console.log(mExceptionCode) + // console.log(mExceptionCode) let code = mExceptionCode.filter((a) => { if (a.id == id) { return a } }) - return (code.length) ? code[0].siglas : '' + return code.length ? code[0].siglas : '' } const loadExceptionCodeCatalog = () => { @@ -145,7 +145,11 @@ export default function RptPendingAnswerFromAmazon( }) } - const downloadExceptionsFile = (id: number, Factura: string, ExceptionCode: number) => { + const downloadExceptionsFile = ( + id: number, + Factura: string, + ExceptionCode: number + ) => { //setWaitingDialog(true) /* loadDistinctExceptionCode(id) generateResume(id) */ @@ -156,7 +160,14 @@ export default function RptPendingAnswerFromAmazon( const url = window.URL.createObjectURL(new Blob([response.data])) const link = document.createElement('a') link.href = url - link.setAttribute('download', 'Excepciones ' + Factura + '_'+getExceptionCode(ExceptionCode) + '.xlsx') + link.setAttribute( + 'download', + 'Excepciones ' + + Factura + + '_' + + getExceptionCode(ExceptionCode) + + '.xlsx' + ) document.body.appendChild(link) link.click() } @@ -237,9 +248,10 @@ export default function RptPendingAnswerFromAmazon( .map((element) => { let newElt = Object.assign({}, element) // copies element return newElt.detail.filter( - (child) => child.idHeader === IDMaster && !child.autorizado + (child) => child.idHeader === IDMaster && child.autorizado ) }) + return Exceptions.length ? Exceptions[0].length : 0 } @@ -428,7 +440,7 @@ export default function RptPendingAnswerFromAmazon( {existsExeptions(MasterData.id) > 0 ? (