Compare commits

...

11 Commits

  1. 4
      .vscode/settings.json
  2. 4
      package.json
  3. 5
      src/Components/Clientes/Amazon/Components/ComboSelect/ComboDescripcion.tsx
  4. 2
      src/Components/Clientes/Amazon/Components/ComboSelect/ComboFraccion.tsx
  5. 200
      src/Components/Clientes/Amazon/Reportes/AmazonNoPartes.tsx
  6. 15
      src/Components/Clientes/Amazon/Reportes/Clasification/Finished/RptAmazonFinishedClasificationInvoices.tsx
  7. 96
      src/Components/Clientes/Amazon/Reportes/Clasification/Pending/RptAmazonPendingClasificationInvoices.tsx
  8. 44
      src/Components/Clientes/Amazon/Reportes/Clasification/Pending/RptAmazonPendingClasificationInvoicesDetail.tsx
  9. 2
      src/Components/Clientes/Amazon/Reportes/Clasification/WaitingAnswerFromAmazon/RptPendingAnswerFromAmazon.tsx
  10. 6
      src/Components/Clientes/Amazon/Services/Amazon.Services.ts
  11. 2
      src/Components/Login/login.tsx
  12. 4
      src/Components/Utils/Toast/msgInformativo.tsx

@ -1,3 +1,3 @@
{ {
"workbench.colorTheme": "Abyss" "workbench.colorTheme": "Infinity Dark Theme Eye Friendly Colors"
} }

@ -1,6 +1,6 @@
{ {
"name": "gemco", "name": "gemco",
"version": "0.1.0", "version": "3.1.0",
"homepage": ".", "homepage": ".",
"private": true, "private": true,
"dependencies": { "dependencies": {
@ -69,7 +69,7 @@
"start-dev": "env-cmd -f .env.development react-scripts start", "start-dev": "env-cmd -f .env.development react-scripts start",
"start-qa": "env-cmd -f .env.qa react-scripts start", "start-qa": "env-cmd -f .env.qa react-scripts start",
"start-prod": "env-cmd -f .env.production react-scripts start", "start-prod": "env-cmd -f .env.production react-scripts start",
"build-qa": "env-cmd -f .env.qa react-scripts build", "build-qa": "env-cmd -f .env.qa react-scripts build version --patch",
"build-prod": "env-cmd -f .env.production react-scripts build", "build-prod": "env-cmd -f .env.production react-scripts build",
"test": "react-scripts test", "test": "react-scripts test",
"eject": "react-scripts eject" "eject": "react-scripts eject"

@ -177,6 +177,11 @@ export function ComboDescripcion(props: IComboDescripcionProps) {
) : ( ) : (
'' ''
)} )}
{props.Detail.validaFraccionOriginal === 5 ? (
<option value="5">BOT</option>
) : (
''
)}
</Form.Control> </Form.Control>
<Modal <Modal
show={showModal} show={showModal}

@ -209,6 +209,7 @@ export function ComboFraccion(props: IComboFraccionProps) {
<option value="0"> </option> <option value="0"> </option>
<option value="1"> = </option> <option value="1"> = </option>
<option value="2"> != </option> <option value="2"> != </option>
{/* <option value="5">BOT</option> */}
</> </>
) : ( ) : (
'' ''
@ -222,7 +223,6 @@ export function ComboFraccion(props: IComboFraccionProps) {
) : ( ) : (
'' ''
)} )}
{/* <option value="2"> != </option> */}
{props.Detail.validaFraccionOriginal === 3 ? ( {props.Detail.validaFraccionOriginal === 3 ? (
<option value="3"> Ok </option> <option value="3"> Ok </option>
) : ( ) : (

@ -4,6 +4,7 @@ import DataTable from 'react-data-table-component'
import I2096NoParte from '../Interfaces/I2096NoParte' import I2096NoParte from '../Interfaces/I2096NoParte'
import AmazonDS from '../Services/Amazon.Services' import AmazonDS from '../Services/Amazon.Services'
import { import {
deleteNoPartes,
populateNoPartes, populateNoPartes,
updateNoPartes updateNoPartes
} from '../../../../store/features/Clientes/2096/AmazonNoPartes' } from '../../../../store/features/Clientes/2096/AmazonNoPartes'
@ -12,7 +13,7 @@ import { useDispatch, useSelector } from 'react-redux'
import { useEffect, useState } from 'react' import { useEffect, useState } from 'react'
import { MsgInformativo } from '../../../Utils/Toast/msgInformativo' import { MsgInformativo } from '../../../Utils/Toast/msgInformativo'
import { IconContext } from 'react-icons' import { IconContext } from 'react-icons'
import { BsFillPencilFill } from 'react-icons/bs' import { BsFillPencilFill, BsFillXCircleFill } from 'react-icons/bs'
import I2096PaisClave from '../Interfaces/I2096PaisClave' import I2096PaisClave from '../Interfaces/I2096PaisClave'
import DTO2096PerfilesParecidos from '../DTO/DTO2096PerfilesParecidos' import DTO2096PerfilesParecidos from '../DTO/DTO2096PerfilesParecidos'
@ -35,10 +36,14 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
const [NoParteLOG, setNoParteLOG] = useState<I2096NoParteLog[]>([]) const [NoParteLOG, setNoParteLOG] = useState<I2096NoParteLog[]>([])
const [PaisClaves, setPaisClaves] = useState<I2096PaisClave[]>([]) const [PaisClaves, setPaisClaves] = useState<I2096PaisClave[]>([])
const [Data, setData] = useState<DTO2096PerfilesParecidos[]>([]) const [Data, setData] = useState<DTO2096PerfilesParecidos[]>([])
const [DataNoParteVerificacion, setDataNoParteVeriifcacion] = useState<DTO2096NoParteVerificacion[]>([]) const [DataNoParteVerificacion, setDataNoParteVeriifcacion] = useState<
DTO2096NoParteVerificacion[]
>([])
const [ShowModal, setShowModal] = useState(false) const [ShowModal, setShowModal] = useState(false)
const [ShowModalLog, setShowModalLog] = useState(false) const [ShowModalLog, setShowModalLog] = useState(false)
const [ShowModalNoParteVerificacion, setShowModalNoParteVerificacion] = useState(false) const [ShowModalNoParteVerificacion, setShowModalNoParteVerificacion] =
useState(false)
const [ShowModalDelete, setShowModalDelete] = useState(false)
const [header, setHeader] = useState('') const [header, setHeader] = useState('')
const [msgColor, setMsgColor] = useState('primary') const [msgColor, setMsgColor] = useState('primary')
const [show, setShowMsg] = useState(false) const [show, setShowMsg] = useState(false)
@ -81,12 +86,35 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
<Col> <Col>
<div <div
style={{ style={{
cursor: 'pointer', cursor: 'pointer'
}}
onClick={() => {
setIDParte(row.id)
setShowModalDelete(true)
}}
>
<IconContext.Provider value={{ color: 'red', size: '25px' }}>
<BsFillXCircleFill />
</IconContext.Provider>
</div>
</Col>
</Row>
),
sortable: true
},
{
name: '',
width: '60px',
cell: (row: I2096NoParte) => (
<Row>
<Col>
<div
style={{
cursor: 'pointer'
}} }}
onClick={() => { onClick={() => {
loadDataNoParteVerificacion(row) loadDataNoParteVerificacion(row)
setShowModalNoParteVerificacion(true) setShowModalNoParteVerificacion(true)
}} }}
> >
<IconContext.Provider value={{ color: '#60DD0E', size: '30px' }}> <IconContext.Provider value={{ color: '#60DD0E', size: '30px' }}>
@ -166,13 +194,15 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
{ {
name: 'UMF', name: 'UMF',
width: '80px', width: '80px',
selector: (row: I2096NoParte) => row.unidadMedidaFactura ? row.unidadMedidaFactura : '', selector: (row: I2096NoParte) =>
row.unidadMedidaFactura ? row.unidadMedidaFactura : '',
sortable: true sortable: true
}, },
{ {
name: 'UMC', name: 'UMC',
width: '80px', width: '80px',
selector: (row: I2096NoParte) => row.unidadMedidaCOVE ? row.unidadMedidaCOVE : '', selector: (row: I2096NoParte) =>
row.unidadMedidaCOVE ? row.unidadMedidaCOVE : '',
sortable: true sortable: true
}, },
{ {
@ -215,7 +245,8 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
{ {
name: 'Fracc Original', name: 'Fracc Original',
width: '130px', width: '130px',
cell: (row: I2096NoParteLog) => row.fraccionOriginal ? row.fraccionOriginal : '', cell: (row: I2096NoParteLog) =>
row.fraccionOriginal ? row.fraccionOriginal : '',
sortable: true sortable: true
}, },
{ {
@ -228,7 +259,8 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
{ {
name: 'NICO Original', name: 'NICO Original',
width: '130px', width: '130px',
cell: (row: I2096NoParteLog) => row.subdivisionOriginal ? row.subdivisionOriginal : '', cell: (row: I2096NoParteLog) =>
row.subdivisionOriginal ? row.subdivisionOriginal : '',
sortable: true, sortable: true,
center: true center: true
}, },
@ -237,7 +269,7 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
width: '250px', width: '250px',
cell: (row: I2096NoParteLog) => row.descripcionAgenteAduanal, cell: (row: I2096NoParteLog) => row.descripcionAgenteAduanal,
wrap: true, wrap: true,
sortable: true, sortable: true
}, },
{ {
name: 'Desc Original', name: 'Desc Original',
@ -246,7 +278,7 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
wrap: true, wrap: true,
sorteable: true sorteable: true
}, },
{ {
name: 'Fecha / Hora', name: 'Fecha / Hora',
width: '200px', width: '200px',
@ -256,7 +288,7 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
{ {
name: 'Usuario', name: 'Usuario',
width: '300px', width: '300px',
cell: (row: I2096NoParteLog) => row.sUsuario ? row.sUsuario : '', cell: (row: I2096NoParteLog) => (row.sUsuario ? row.sUsuario : ''),
wrap: true, wrap: true,
sortable: true sortable: true
} }
@ -294,7 +326,7 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
width: '100px', width: '100px',
cell: (row: DTO2096NoParteVerificacion) => row.aduana, cell: (row: DTO2096NoParteVerificacion) => row.aduana,
wrap: true, wrap: true,
sortable: true, sortable: true
}, },
{ {
name: 'Pedimento', name: 'Pedimento',
@ -305,7 +337,6 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
} }
] ]
const openLink = (item: string) => { const openLink = (item: string) => {
window.open('https://www.amazon.com/dp/' + item) window.open('https://www.amazon.com/dp/' + item)
} }
@ -315,7 +346,7 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
if (Id === 0) return NoAsignado if (Id === 0) return NoAsignado
else if (Data.length) { else if (Data.length) {
const Usuario = Data.filter((item) => item.idUsuario === Id) const Usuario = Data.filter((item) => item.idUsuario === Id)
return Usuario ? Usuario[0].nombre : NoAsignado return Usuario.length ? Usuario[0].nombre : NoAsignado
} }
return NoAsignado return NoAsignado
} }
@ -396,6 +427,7 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
} }
AmazonDS.NoPartesGet(Search) AmazonDS.NoPartesGet(Search)
.then((response) => { .then((response) => {
console.log(response.data)
dispatch(populateNoPartes(response.data)) dispatch(populateNoPartes(response.data))
}) })
.catch((e: Error) => { .catch((e: Error) => {
@ -417,11 +449,36 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
AmazonDS.NoPartesUpdate(data) AmazonDS.NoPartesUpdate(data)
.then((response) => { .then((response) => {
dispatch(updateNoPartes(response.data)) dispatch(updateNoPartes(response.data))
setHeader('Informativo')
setMsg('La informacion se guardo correctamente')
setShowMsg(true)
}) })
.catch((e: Error) => { .catch(function (error) {
setHeader('Error') console.log(error.toJSON())
setMsg('Ocurrio un error: ' + e) if (error.message == 'Request failed with status code 400') {
setHeader('Error')
setMsg('Fraccion no valida!')
setShowMsg(true)
}
return
})
}
const deleteNoParte = () => {
AmazonDS.DeleteNoParte(IDParte)
.then((response) => {
dispatch(deleteNoPartes(IDParte))
setHeader('Informativo')
setMsg('La informacion se guardo correctamente')
setShowMsg(true) setShowMsg(true)
})
.catch(function (error) {
console.log(error.toJSON())
if (error.message == 'Request failed with status code 400') {
setHeader('Error')
setMsg('Fraccion no valida!')
setShowMsg(true)
}
return return
}) })
} }
@ -616,26 +673,26 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
<Modal.Title>No Parte: {Parte}</Modal.Title> <Modal.Title>No Parte: {Parte}</Modal.Title>
</Modal.Header> </Modal.Header>
<Modal.Body> <Modal.Body>
{/* <div style={{ height: '400px', overflow: 'scroll' }}> */} {/* <div style={{ height: '400px', overflow: 'scroll' }}> */}
<Row style={{ paddingTop: '15px' }}> <Row style={{ paddingTop: '15px' }}>
<Col xs={12}> <Col xs={12}>
<DataTable <DataTable
noHeader noHeader
fixedHeaderScrollHeight="400px" fixedHeaderScrollHeight="400px"
defaultSortFieldId={'id'} defaultSortFieldId={'id'}
defaultSortAsc={true} defaultSortAsc={true}
pagination pagination
highlightOnHover highlightOnHover
striped={true} striped={true}
dense={true} dense={true}
columns={colsNoPartesLOG} columns={colsNoPartesLOG}
data={NoParteLOG.filter(function (el) { data={NoParteLOG.filter(function (el) {
return el.id > 0 return el.id > 0
})} })}
/> />
</Col> </Col>
</Row> </Row>
{/* </div> */} {/* </div> */}
</Modal.Body> </Modal.Body>
</Modal> </Modal>
@ -651,27 +708,62 @@ export default function AmazonNoPartes(props: IAmazonNoPartesProps) {
<Modal.Title>No Parte: {Search}</Modal.Title> <Modal.Title>No Parte: {Search}</Modal.Title>
</Modal.Header> </Modal.Header>
<Modal.Body> <Modal.Body>
<Row style={{ paddingTop: '15px' }}> <Row style={{ paddingTop: '15px' }}>
<Col xs={12}>
<DataTable
noHeader
fixedHeaderScrollHeight="400px"
defaultSortFieldId={'id'}
defaultSortAsc={true}
pagination
highlightOnHover
striped={true}
dense={true}
columns={colsNoPartesVerificacion}
data={DataNoParteVerificacion.filter(function (el) {
return el
})}
/>
</Col>
</Row>
{/* </div> */}
</Modal.Body>
</Modal>
<Modal
show={ShowModalDelete}
onHide={() => {
setShowModalDelete(false)
}}
size={'sm'}
dialogClassName={'modal-50w'}
>
<Modal.Header>
<Modal.Title>
<Row>
<Col xs={12}> <Col xs={12}>
<DataTable <Alert variant="warning">
noHeader <h3>¿Esta seguro de eliminar el no parte: {Parte}</h3>
fixedHeaderScrollHeight="400px" </Alert>
defaultSortFieldId={'id'}
defaultSortAsc={true}
pagination
highlightOnHover
striped={true}
dense={true}
columns={colsNoPartesVerificacion}
data={DataNoParteVerificacion.filter(function (el) {
return el
})}
/>
</Col> </Col>
</Row> </Row>
{/* </div> */} </Modal.Title>
</Modal.Header>
<Modal.Body>
<Row style={{ paddingTop: '15px' }}>
<Col></Col>
<Col xs={5}>
<Button variant={'danger'} onClick={()=>{deleteNoParte()}}>Elimina</Button>
</Col>
<Col xs={5}>
<Button variant={'secondary'} onClick={()=>{setShowModalDelete(false)}}>Salir</Button>
</Col>
<Col></Col>
</Row>
{/* </div> */}
</Modal.Body> </Modal.Body>
</Modal> </Modal>
<MsgInformativo <MsgInformativo
show={show} show={show}
msg={msg} msg={msg}

@ -161,6 +161,13 @@ export default function RptAmazonFinishedClasificationInvoices(
}) })
} }
function getReceiver(Cadena: string, char1: string[1], char2: string[1]) {
return Cadena.slice(
Cadena.indexOf(char1) + 1,
Cadena.lastIndexOf(char2),
);
}
return ( return (
<div> <div>
<Card> <Card>
@ -195,6 +202,7 @@ export default function RptAmazonFinishedClasificationInvoices(
<th style={{ width: '50px' }}></th> <th style={{ width: '50px' }}></th>
<th style={{ width: '80px' }}>Commercial Invoice Date</th> <th style={{ width: '80px' }}>Commercial Invoice Date</th>
<th style={{ width: '300px' }}>Invoice Number</th> <th style={{ width: '300px' }}>Invoice Number</th>
<th style={{ width: '80px' }}>Receiver</th>
<th style={{ width: '100px' }}>Incoterms</th> <th style={{ width: '100px' }}>Incoterms</th>
<th style={{ textAlign: 'center' }}>HAWB</th> <th style={{ textAlign: 'center' }}>HAWB</th>
<th>Qty Unit of measure</th> <th>Qty Unit of measure</th>
@ -300,6 +308,13 @@ export default function RptAmazonFinishedClasificationInvoices(
<td style={{ width: '300px' }}> <td style={{ width: '300px' }}>
{MasterData.invoiceNumber} {MasterData.invoiceNumber}
</td> </td>
<td style={{ width: '80px', textAlign:'center' }}>
{mInvoices
.filter((value) => value.id === MasterData.id)
.map((row) => {
return getReceiver(row.detail[0].amazonShipmentReferenceId,'_','_')
})}
</td>
<td style={{ width: '100px', textAlign: 'center' }}> <td style={{ width: '100px', textAlign: 'center' }}>
{MasterData.incoterms} {MasterData.incoterms}
</td> </td>

@ -4,6 +4,7 @@ import {
Button, Button,
Card, Card,
Col, Col,
Form,
FormCheck, FormCheck,
Modal, Modal,
Row, Row,
@ -35,6 +36,7 @@ import { MFileManager } from '../../../../../Utils/MFileManager/MFileManager'
import { AiFillWarning } from 'react-icons/ai' import { AiFillWarning } from 'react-icons/ai'
import { PrioritySelector } from '../PrioritySelector/PrioritySelector' import { PrioritySelector } from '../PrioritySelector/PrioritySelector'
import IFileManager from '../../../../../../Interfaces/Utils/IFileManager' import IFileManager from '../../../../../../Interfaces/Utils/IFileManager'
import { VscHubot } from 'react-icons/vsc'
export interface IRtpAmazonPendingInvoicesProps {} export interface IRtpAmazonPendingInvoicesProps {}
@ -64,6 +66,7 @@ export default function RtpAmazonPendingInvoices(
const [WaitingMessage, setWaitingMessage] = useState('Generado...') const [WaitingMessage, setWaitingMessage] = useState('Generado...')
const [ShowModal, setShowModal] = useState(false) const [ShowModal, setShowModal] = useState(false)
const [ShowModalW, setShowModalW] = useState(false) const [ShowModalW, setShowModalW] = useState(false)
const [BOTEnabled, setBOTEnabled] = useState(false)
const [msg, setMsg] = useState('') const [msg, setMsg] = useState('')
const msgColor = 'primary' const msgColor = 'primary'
@ -303,7 +306,37 @@ export default function RtpAmazonPendingInvoices(
return return
}) })
} }
const RunBOT = (row: I2096Headers) => {
if (!BOTEnabled || row.max) {
toggleExpandRow(row)
return false
}
if (BOTEnabled) {
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)
return
})
}
}
return ( return (
<div> <div>
<Card> <Card>
@ -317,7 +350,30 @@ export default function RtpAmazonPendingInvoices(
CLASIFICACION : facturas pendientes CLASIFICACION : facturas pendientes
</Card.Title> </Card.Title>
</Col> </Col>
<Col xs={5}></Col> <Col xs={3}></Col>
<Col xs={2}>
{/* <Row>
<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?"
checked={BOTEnabled}
onChange={() => {
setBOTEnabled(!BOTEnabled)
}}
/>
</Col>
</Row> */}
<Form></Form>
</Col>
<Col xs={2}> <Col xs={2}>
<Alert <Alert
variant="primary" variant="primary"
@ -379,7 +435,7 @@ export default function RtpAmazonPendingInvoices(
<tr> <tr>
<th style={{ width: '50px' }}></th> <th style={{ width: '50px' }}></th>
<th style={{ width: '50px' }}>id</th> <th style={{ width: '50px' }}>id</th>
<th style={{ width: '50px', paddingRight:'20px' }}> <th style={{ width: '50px', paddingRight: '20px' }}>
<IconContext.Provider <IconContext.Provider
value={{ color: 'yellow', size: '20px' }} value={{ color: 'yellow', size: '20px' }}
> >
@ -389,7 +445,7 @@ export default function RtpAmazonPendingInvoices(
<th style={{ width: '50px' }}></th> <th style={{ width: '50px' }}></th>
<th style={{ width: '80px' }}>Commercial Invoice Date</th> <th style={{ width: '80px' }}>Commercial Invoice Date</th>
<th style={{ width: '300px' }}>Invoice Number</th> <th style={{ width: '300px' }}>Invoice Number</th>
<th style={{ width: '50px' }}>Name</th> <th style={{ width: '50px' }}>Receiver</th>
<th style={{ width: '100px' }}>Incoterms</th> <th style={{ width: '100px' }}>Incoterms</th>
<th style={{ width: '100px' }}>Qty Unit of measure</th> <th style={{ width: '100px' }}>Qty Unit of measure</th>
<th style={{ width: '100px' }}>Tot Qty</th> <th style={{ width: '100px' }}>Tot Qty</th>
@ -441,7 +497,8 @@ export default function RtpAmazonPendingInvoices(
} }
key={MasterData.id} key={MasterData.id}
onClick={() => { onClick={() => {
toggleExpandRow(MasterData) //toggleExpandRow(MasterData)
RunBOT(MasterData)
}} }}
> >
{MasterData.max === true ? ( {MasterData.max === true ? (
@ -459,10 +516,15 @@ export default function RtpAmazonPendingInvoices(
)} )}
</td> </td>
<td>{MasterData.id}</td> <td>{MasterData.id}</td>
<td style={{textAlign:'left'}}> <td style={{ textAlign: 'left' }}>
<PrioritySelector IDInvoice={MasterData.id} Priority={MasterData.urgente} canChange={['Clasificador lider', 'Administrador'].includes( <PrioritySelector
Perfil IDInvoice={MasterData.id}
)}/> Priority={MasterData.urgente}
canChange={[
'Clasificador lider',
'Administrador'
].includes(Perfil)}
/>
</td> </td>
<td> <td>
<FormCheck <FormCheck
@ -800,7 +862,9 @@ export default function RtpAmazonPendingInvoices(
return ( return (
<RtpAmazonPendingClasificationInvoicesDetail <RtpAmazonPendingClasificationInvoicesDetail
IDMaster={MasterData.id} IDMaster={MasterData.id}
Prioridad={MasterData.urgente} Prioridad={
MasterData.urgente
}
detail={detail} detail={detail}
Deshabilitado={ Deshabilitado={
detail.destinationHTSCode detail.destinationHTSCode
@ -937,6 +1001,13 @@ export default function RtpAmazonPendingInvoices(
</Modal.Header> </Modal.Header>
<Modal.Body> <Modal.Body>
<img src={loadingImg} style={{ height: '150px' }} alt="proccessing" /> <img src={loadingImg} style={{ height: '150px' }} alt="proccessing" />
{WaitingMessage.includes('BOT') ? (
<IconContext.Provider value={{ color: 'green', size: '65px' }}>
<VscHubot />
</IconContext.Provider>
) : (
''
)}
{WaitingMessage} {WaitingMessage}
</Modal.Body> </Modal.Body>
<Modal.Footer></Modal.Footer> <Modal.Footer></Modal.Footer>
@ -1017,8 +1088,9 @@ export default function RtpAmazonPendingInvoices(
Proceso={IDProcess} Proceso={IDProcess}
showPreview={0} showPreview={0}
canEdit={true} canEdit={true}
Leyenda="Seleccione las facturas de Amazon" onAppendMFM={function (Files: IFileManager[]): void { Leyenda="Seleccione las facturas de Amazon"
} } /> onAppendMFM={function (Files: IFileManager[]): void {}}
/>
</Col> </Col>
<Col></Col> <Col></Col>
</Row> </Row>

@ -186,7 +186,7 @@ export default function RtpAmazonPendingInvoivesDetail(
style={{ style={{
textAlign: 'center', textAlign: 'center',
cursor: 'pointer', cursor: 'pointer',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
onClick={() => openLink(props.detail.itemId)} onClick={() => openLink(props.detail.itemId)}
@ -196,7 +196,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'right', textAlign: 'right',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -205,7 +205,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'right', textAlign: 'right',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
> >
{props.detail.pedimentoDescription} {props.detail.pedimentoDescription}
@ -214,7 +214,7 @@ export default function RtpAmazonPendingInvoivesDetail(
style={{ style={{
textAlign: 'center', textAlign: 'center',
fontSize: '18px', fontSize: '18px',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
> >
&nbsp;&nbsp;{props.detail.destinationHTSCode} &nbsp;&nbsp;{props.detail.destinationHTSCode}
@ -222,7 +222,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -230,7 +230,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -247,7 +247,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -270,7 +270,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -287,7 +287,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -296,7 +296,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -305,7 +305,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'right', textAlign: 'right',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -314,7 +314,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'right', textAlign: 'right',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -323,7 +323,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'right', textAlign: 'right',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -332,7 +332,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -341,7 +341,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -350,7 +350,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -359,7 +359,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -369,7 +369,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -378,7 +378,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
className="DetailData" className="DetailData"
> >
@ -386,7 +386,7 @@ export default function RtpAmazonPendingInvoivesDetail(
</td> </td>
<td <td
style={{ style={{
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
> >
<OverlayTrigger <OverlayTrigger
@ -423,7 +423,7 @@ export default function RtpAmazonPendingInvoivesDetail(
</td> </td>
<td <td
style={{ style={{
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
> >
<OverlayTrigger <OverlayTrigger
@ -455,7 +455,7 @@ export default function RtpAmazonPendingInvoivesDetail(
<td <td
style={{ style={{
textAlign: 'center', textAlign: 'center',
backgroundColor: props.detail.checked ? '#E6EEF5' : '#ffffff' backgroundColor: props.detail.checked ? props.detail.confirmaFraccion==5 ? '#F7E2D2' : '#E6EEF5' : '#ffffff'
}} }}
> >
<Form> <Form>

@ -305,7 +305,7 @@ export default function RptPendingAnswerFromAmazon(
<th style={{ width: '50px' }}></th> <th style={{ width: '50px' }}></th>
<th style={{ width: '80px' }}>Commercial Invoice Date</th> <th style={{ width: '80px' }}>Commercial Invoice Date</th>
<th style={{ width: '300px' }}>Invoice Number</th> <th style={{ width: '300px' }}>Invoice Number</th>
<th style={{ width: '50px' }}>Name</th> <th style={{ width: '50px' }}>Receiver</th>
<th style={{ width: '100px' }}>Incoterms</th> <th style={{ width: '100px' }}>Incoterms</th>
<th style={{ width: '100px' }}>Qty Unit of measure</th> <th style={{ width: '100px' }}>Qty Unit of measure</th>
<th style={{ width: '100px' }}>Tot Qty</th> <th style={{ width: '100px' }}>Tot Qty</th>

@ -264,5 +264,11 @@ class AmazonDataService {
TraficoConsultasAmazonById(id: number) { TraficoConsultasAmazonById(id: number) {
return http.get<DTO2096TraficoConsultaAmazonHeader>(`/AmazonInvoice/TraficoConsultasAmazonById?id=${id}`) return http.get<DTO2096TraficoConsultaAmazonHeader>(`/AmazonInvoice/TraficoConsultasAmazonById?id=${id}`)
} }
ClasificacionBOT(id: number) {
return http.get<DTO2096TraficoConsultaAmazonHeader>(`/AmazonInvoice/Bot/Clasificacion?id=${id}`)
}
DeleteNoParte(id: number) {
return http.delete<Boolean>(`/AmazonInvoice/DeleteNoParte?id=${id}`)
}
} }
export default new AmazonDataService() export default new AmazonDataService()

@ -14,6 +14,7 @@ import { MsgInformativo } from '../Utils/Toast/msgInformativo'
import logo from '../../images/GEMCO_mini.png' import logo from '../../images/GEMCO_mini.png'
import Dashboard from '../Dashboard/Dashboard' import Dashboard from '../Dashboard/Dashboard'
import { Nav } from 'react-bootstrap' import { Nav } from 'react-bootstrap'
import Info from '../../../package.json'
export const Login: React.FC<{}> = () => { export const Login: React.FC<{}> = () => {
const dispatch = useDispatch() const dispatch = useDispatch()
@ -132,6 +133,7 @@ export const Login: React.FC<{}> = () => {
login login
</button> </button>
</div> </div>
<div style={{textAlign:'right'}}>v{Info.version}</div>
</Form> </Form>
</Formik> </Formik>
</div> </div>

@ -15,8 +15,8 @@ interface IProps {
export const MsgInformativo: FC<IProps> = (props) => { export const MsgInformativo: FC<IProps> = (props) => {
return ( return (
<div> <div>
<ToastContainer position={'middle-center'}> <ToastContainer position={'middle-center'} style={{zIndex:'99999 !important'}} >
<Toast <Toast
show={props.show} show={props.show}
delay={props.time} delay={props.time}
bg={props.msgColor} bg={props.msgColor}

Loading…
Cancel
Save