diff --git a/package-lock.json b/package-lock.json index d3af4f0..1a4e9be 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,12 +19,13 @@ "@types/react": "^18.2.6", "@types/react-dom": "^18.2.4", "axios": "^1.4.0", - "bootstrap": "^5.2.3", + "bootstrap": "^5.3.0", "buffer": "^6.0.3", "jsonwebtoken": "^9.0.0", "jwt-decode": "^3.1.2", "react": "^18.2.0", "react-bootstrap": "^2.7.4", + "react-bootstrap-table-next": "^4.0.3", "react-dom": "^18.2.0", "react-router-dom": "^6.11.2", "react-scripts": "5.0.1", @@ -3532,9 +3533,9 @@ } }, "node_modules/@restart/ui": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.6.5.tgz", - "integrity": "sha512-kDjhH8lk+aVGc+dPb8wEBXRDx4B1WX6/pqyWi22R3Oim6KQokeLGO2g8MYzwd2/UdjsrDt+HyYFpKihLIN7+/A==", + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.6.6.tgz", + "integrity": "sha512-eC3puKuWE1SRYbojWHXnvCNHGgf3uzHCb6JOhnF4OXPibOIPEkR1sqDSkL643ydigxwh+ruCa1CmYHlzk7ikKA==", "dependencies": { "@babel/runtime": "^7.21.0", "@popperjs/core": "^2.11.6", @@ -5779,9 +5780,9 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, "node_modules/bootstrap": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz", - "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.0.tgz", + "integrity": "sha512-UnBV3E3v4STVNQdms6jSGO2CvOkjUMdDAVR2V5N4uCMdaIkaQjbcEAMqRimDHIs4uqBYzDAKCQwCB+97tJgHQw==", "funding": [ { "type": "github", @@ -5793,7 +5794,7 @@ } ], "peerDependencies": { - "@popperjs/core": "^2.11.6" + "@popperjs/core": "^2.11.7" } }, "node_modules/brace-expansion": { @@ -14726,6 +14727,22 @@ } } }, + "node_modules/react-bootstrap-table-next": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/react-bootstrap-table-next/-/react-bootstrap-table-next-4.0.3.tgz", + "integrity": "sha512-uKxC73qUdUfusRf2uzDfMiF9LvTG5vuhTZa0lbAgHWSLLLaKTsI0iHf1e4+c7gP71q8dFsp7StvkP65SxC1JRg==", + "dependencies": { + "classnames": "^2.2.5", + "react-transition-group": "^4.2.0", + "underscore": "1.9.1" + }, + "peerDependencies": { + "classnames": "^2.2.5", + "prop-types": "^15.0.0", + "react": "^16.3.0", + "react-dom": "^16.3.0" + } + }, "node_modules/react-dev-utils": { "version": "12.0.1", "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz", @@ -16761,6 +16778,11 @@ "react": ">=15.0.0" } }, + "node_modules/underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + }, "node_modules/unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", @@ -20225,9 +20247,9 @@ } }, "@restart/ui": { - "version": "1.6.5", - "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.6.5.tgz", - "integrity": "sha512-kDjhH8lk+aVGc+dPb8wEBXRDx4B1WX6/pqyWi22R3Oim6KQokeLGO2g8MYzwd2/UdjsrDt+HyYFpKihLIN7+/A==", + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/@restart/ui/-/ui-1.6.6.tgz", + "integrity": "sha512-eC3puKuWE1SRYbojWHXnvCNHGgf3uzHCb6JOhnF4OXPibOIPEkR1sqDSkL643ydigxwh+ruCa1CmYHlzk7ikKA==", "requires": { "@babel/runtime": "^7.21.0", "@popperjs/core": "^2.11.6", @@ -21929,9 +21951,9 @@ "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==" }, "bootstrap": { - "version": "5.2.3", - "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.2.3.tgz", - "integrity": "sha512-cEKPM+fwb3cT8NzQZYEu4HilJ3anCrWqh3CHAok1p9jXqMPsPTBhU25fBckEJHJ/p+tTxTFTsFQGM+gaHpi3QQ==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/bootstrap/-/bootstrap-5.3.0.tgz", + "integrity": "sha512-UnBV3E3v4STVNQdms6jSGO2CvOkjUMdDAVR2V5N4uCMdaIkaQjbcEAMqRimDHIs4uqBYzDAKCQwCB+97tJgHQw==", "requires": {} }, "brace-expansion": { @@ -28197,6 +28219,16 @@ "warning": "^4.0.3" } }, + "react-bootstrap-table-next": { + "version": "4.0.3", + "resolved": "https://registry.npmjs.org/react-bootstrap-table-next/-/react-bootstrap-table-next-4.0.3.tgz", + "integrity": "sha512-uKxC73qUdUfusRf2uzDfMiF9LvTG5vuhTZa0lbAgHWSLLLaKTsI0iHf1e4+c7gP71q8dFsp7StvkP65SxC1JRg==", + "requires": { + "classnames": "^2.2.5", + "react-transition-group": "^4.2.0", + "underscore": "1.9.1" + } + }, "react-dev-utils": { "version": "12.0.1", "resolved": "https://registry.npmjs.org/react-dev-utils/-/react-dev-utils-12.0.1.tgz", @@ -29700,6 +29732,11 @@ "react-lifecycles-compat": "^3.0.4" } }, + "underscore": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.9.1.tgz", + "integrity": "sha512-5/4etnCkd9c8gwgowi5/om/mYO5ajCaOgdzj/oW+0eQV9WxKBDZw5+ycmKmeaTXjInS/W0BzpGLo2xR2aBwZdg==" + }, "unicode-canonical-property-names-ecmascript": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/unicode-canonical-property-names-ecmascript/-/unicode-canonical-property-names-ecmascript-2.0.0.tgz", diff --git a/package.json b/package.json index 85fdf64..bc4e484 100644 --- a/package.json +++ b/package.json @@ -14,12 +14,13 @@ "@types/react": "^18.2.6", "@types/react-dom": "^18.2.4", "axios": "^1.4.0", - "bootstrap": "^5.2.3", + "bootstrap": "^5.3.0", "buffer": "^6.0.3", "jsonwebtoken": "^9.0.0", "jwt-decode": "^3.1.2", "react": "^18.2.0", "react-bootstrap": "^2.7.4", + "react-bootstrap-table-next": "^4.0.3", "react-dom": "^18.2.0", "react-router-dom": "^6.11.2", "react-scripts": "5.0.1", diff --git a/src/App.tsx b/src/App.tsx index 5498509..213320f 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -47,7 +47,8 @@ const App: React.FC = () => { localStorage.setItem('jwtToken', response.data.token); } } catch (error) { - console.log(error); + console.log(error) + alert("Credenciales erroneas"); } finally { setIsLoading(false); } @@ -73,7 +74,7 @@ const App: React.FC = () => { } }; - checkTokenValidity(); + checkTokenValidity(); }, []); const handleLogout = () => { diff --git a/src/Componentes/AmazonInvoice.tsx b/src/Componentes/AmazonInvoice.tsx index 4e47244..b61bea0 100644 --- a/src/Componentes/AmazonInvoice.tsx +++ b/src/Componentes/AmazonInvoice.tsx @@ -2,6 +2,16 @@ import React, { useState } from 'react'; import axios from 'axios'; import '../Interfaces/InvoiceDetail' import '../Interfaces/Invoice' +import '../HojasDeEstilo/AmazonInovice.css' + + + +// import 'bootstrap/dist/css/bootstrap.min.css'; + + + // + + const AmazonInvoice: React.FC = () => { @@ -29,6 +39,8 @@ const AmazonInvoice: React.FC = () => { }; return ( + +
ID: {invoice.id}
-Referencia: {invoice.referencia}
-Fecha de la factura: {invoice.commercialInvoiceDate}
-Fecha de creación: {invoice.fCreacion}
-Clasificador: {invoice.clasificador}
-Estatus: {invoice.estatus}
-Trailer ID: {invoice.trailerId || 'N/A'}
- -Id | +Referencia | +FechaFactura | +FechaCreacion | +Clasificador | +Estatus | +Trailer Id | +
---|---|---|---|---|---|---|
ID: {invoice.id} | +Referencia: {invoice.referencia} | +Fecha de la factura: {invoice.commercialInvoiceDate} | +Fecha de creación: {invoice.fCreacion} | +Clasificador: {invoice.clasificador} | +Estatus: {invoice.estatus} | +Trailer ID: {invoice.trailerId || 'N/A'} | +
Id Header | @@ -70,10 +103,18 @@ const AmazonInvoice: React.FC = () => { ))}
---|