From 3a866b416ba509d45dad43719e77a1e6a9f83f4e Mon Sep 17 00:00:00 2001 From: Felix Morales Date: Fri, 22 Mar 2024 16:53:53 -0500 Subject: [PATCH] Agregar filtro de busqueda y tab para descargar los archivos de facturacion a la vista del cliente --- .../Clientes/Traficos/RptClientesTraficos.tsx | 25 ++++- .../Clientes/Traficos/TraficoCliente.tsx | 98 +++++++++++++++++++ ...ProgressBar.tsx => ClienteProgressBar.tsx} | 2 +- .../DTOFiltrosTraficosClientes.ts | 1 + src/Services/Catalogos/Clientes.Services.ts | 2 +- 5 files changed, 123 insertions(+), 5 deletions(-) rename src/Components/Reportes/customCells/{AlenProgressBar.tsx => ClienteProgressBar.tsx} (92%) diff --git a/src/Components/Clientes/Traficos/RptClientesTraficos.tsx b/src/Components/Clientes/Traficos/RptClientesTraficos.tsx index ad83396..4bd1703 100644 --- a/src/Components/Clientes/Traficos/RptClientesTraficos.tsx +++ b/src/Components/Clientes/Traficos/RptClientesTraficos.tsx @@ -32,7 +32,7 @@ import ClientesServices from '../../../Services/Catalogos/Clientes.Services' import reportesServices from '../../../Services/Reportes/reportes.services' import DTOFiltrosTraficosClientes from '../../../DTO/Corresponsales/DTOFiltrosTraficosClientes' import TraficoCliente from './TraficoCliente' -import { AlenProgressBar } from '../../Reportes/customCells/AlenProgressBar' +import { ClienteProgressBar } from '../../Reportes/customCells/ClienteProgressBar' /* import '../../css/generic01.css' */ interface IProps {} @@ -77,6 +77,7 @@ export default function RptClientesTraficos(props: IProps) { const [Patente, setPatente] = useState(0); const [Aduana, setAduana] = useState('0'); const [Referencia, setReferencia] = useState('') + const [Estado, setEstado] = useState(0) const [Clientes, setClientes] = useState>() const [filtro, setFiltro] = useState('') const gridRef = React.useRef(null) @@ -93,7 +94,7 @@ export default function RptClientesTraficos(props: IProps) { center: true, sortable: true, filter: true, - cellRenderer: AlenProgressBar, + cellRenderer: ClienteProgressBar, }, { field: 'folioGemco', @@ -264,7 +265,8 @@ export default function RptClientesTraficos(props: IProps) { Aduana: Aduana, Patente: Patente, Referencia: Referencia, - IdUsuario: UserId + IdUsuario: UserId, + Estado: Estado } ClientesServices .GetTraficos(data) @@ -454,6 +456,23 @@ export default function RptClientesTraficos(props: IProps) { + + + Estado + { + setEstado(parseInt(e.target.value)) + }} + className='form-select form-select-sm' + > + + + + + + + {(Perfil !== "Corresponsales" && Perfil !== "Clientes")? <> diff --git a/src/Components/Clientes/Traficos/TraficoCliente.tsx b/src/Components/Clientes/Traficos/TraficoCliente.tsx index 131f677..8958523 100644 --- a/src/Components/Clientes/Traficos/TraficoCliente.tsx +++ b/src/Components/Clientes/Traficos/TraficoCliente.tsx @@ -3114,6 +3114,104 @@ export default function TraficoCliente(props:IProps){ + = 3 && Depto === 'Facturacion'? '' : 'd-none'} + > + + + + + PDF Cuenta Mexicana + + + XML Cuenta Mexicana + + + + + + + + + + + + + PDF de Notas de Cargos + + + Archivos Adicionales + + + + + + + + + + + + + diff --git a/src/Components/Reportes/customCells/AlenProgressBar.tsx b/src/Components/Reportes/customCells/ClienteProgressBar.tsx similarity index 92% rename from src/Components/Reportes/customCells/AlenProgressBar.tsx rename to src/Components/Reportes/customCells/ClienteProgressBar.tsx index f97ce9d..edbf71a 100644 --- a/src/Components/Reportes/customCells/AlenProgressBar.tsx +++ b/src/Components/Reportes/customCells/ClienteProgressBar.tsx @@ -1,7 +1,7 @@ import { ICellRendererParams } from "ag-grid-community"; import { FC, useState, useEffect } from "react"; -export const AlenProgressBar: FC = (props: ICellRendererParams) => { +export const ClienteProgressBar: FC = (props: ICellRendererParams) => { const [Color, setColor] = useState('progress-bar bg-CORRESPONSAL_NORMAL') useEffect(() => { diff --git a/src/DTO/Corresponsales/DTOFiltrosTraficosClientes.ts b/src/DTO/Corresponsales/DTOFiltrosTraficosClientes.ts index a5e42f7..2a28376 100644 --- a/src/DTO/Corresponsales/DTOFiltrosTraficosClientes.ts +++ b/src/DTO/Corresponsales/DTOFiltrosTraficosClientes.ts @@ -9,4 +9,5 @@ export default interface DTOFiltrosTraficosClientes { Patente: number; Referencia: string; IdUsuario: number; + Estado: number; } \ No newline at end of file diff --git a/src/Services/Catalogos/Clientes.Services.ts b/src/Services/Catalogos/Clientes.Services.ts index bfc6f55..808a092 100644 --- a/src/Services/Catalogos/Clientes.Services.ts +++ b/src/Services/Catalogos/Clientes.Services.ts @@ -35,7 +35,7 @@ class ClientesDataService { } GetTraficos(data: DTOFiltrosTraficosClientes){ - return http.get(`/Clientes/Traficos?Inicio=${data.Inicio}&Fin=${data.Fin}&TipoOperacion=${data.TipoOperacion}&NoCliente=${data.NoCliente}&IdCorresponsal=${data.IdCorresponsal}&Pedimento=${data.Pedimento}&Aduana=${data.Aduana}&Patente=${data.Patente}&Referencia=${data.Referencia}&IdUsuario=${data.IdUsuario}`) + return http.get(`/Clientes/Traficos?Inicio=${data.Inicio}&Fin=${data.Fin}&TipoOperacion=${data.TipoOperacion}&NoCliente=${data.NoCliente}&IdCorresponsal=${data.IdCorresponsal}&Pedimento=${data.Pedimento}&Aduana=${data.Aduana}&Patente=${data.Patente}&Referencia=${data.Referencia}&IdUsuario=${data.IdUsuario}&Estado=${data.Estado}`) } } export default new ClientesDataService(); \ No newline at end of file