diff --git a/Aplicacion/public/favicon.ico b/Aplicacion/public/favicon.ico new file mode 100644 index 0000000..c0bcf8c Binary files /dev/null and b/Aplicacion/public/favicon.ico differ diff --git a/Aplicacion/public/images/background.jpg b/Aplicacion/public/images/background.jpg new file mode 100644 index 0000000..18ead79 Binary files /dev/null and b/Aplicacion/public/images/background.jpg differ diff --git a/Aplicacion/public/images/ventas.jpg b/Aplicacion/public/images/ventas.jpg new file mode 100644 index 0000000..bb3b0e3 Binary files /dev/null and b/Aplicacion/public/images/ventas.jpg differ diff --git a/Aplicacion/public/images/webtic.png b/Aplicacion/public/images/webtic.png new file mode 100644 index 0000000..75b3f1d Binary files /dev/null and b/Aplicacion/public/images/webtic.png differ diff --git a/Aplicacion/public/index.html b/Aplicacion/public/index.html new file mode 100644 index 0000000..15ef0c3 --- /dev/null +++ b/Aplicacion/public/index.html @@ -0,0 +1,17 @@ + + + + + + + + + WebTicKers + + + + +
+ + + diff --git a/Aplicacion/src/App.css b/Aplicacion/src/App.css new file mode 100644 index 0000000..c62aea5 --- /dev/null +++ b/Aplicacion/src/App.css @@ -0,0 +1,124 @@ + +.App { + margin: 0; + padding: 0; + background-color: rgba(224, 224, 224, 0.755); + position: absolute; + height: 100%; + width: 100%; + +} + +h1{ + text-align: center; + color: grey; + padding: 0%; + +} +h2{ + text-align: center; + color: rgb(37, 37, 37); + margin: 100px auto; +} + +.login{ + margin: 90px auto 0 auto; + width: 300px; + height: 400px; + background-color: rgb(145, 145, 145); + padding: 0; + border-radius: 10px; + +} + +.login .Login{ + + size: auto; + border-radius: 5px; + background-color: rgb(54, 41, 150); + color: aliceblue; + box-shadow: 2px; + margin: 50px auto auto 120px; + +} + +.div-log{ + margin: 90px auto 0 auto; + width: 300px; + height: 400px; + background-color: rgb(123, 121, 121); + padding: 0; + border-radius: 10px; +} + + +.logout{ + border-radius: 5px; + background-color: rgb(106, 32, 32); + color: aliceblue; + box-shadow: 2px; +} + + + +.logo{ + align-items: center; + border-radius: 20px; + margin: 20px auto 0 75px; + +} + +img{ + box-shadow: 100px; +} + +.NavbarItems{ + background: linear-gradient(90deg, rgb(110,94,254) 50%, rgba(73,63,252,70%) 100%); + height: 80px; + display: flex; + justify-content: center; + align-items: center; + font-size: 1.2rem; +} +.nav-menu{ + display: grid; + grid-template-columns: repeat(5, auto); + grid-gap: 10px; + list-style: none; + text-align: center; + width: 70vw; + justify-content: end; + margin-right: 2rem ; +} + +.nav-links{ + color:white; + text-decoration: none; + padding: 0.5 rem 1 rem; + } +.nav-links:hover{ + background-color: #6d76f7; + border-radius: 4px; + transition: all 0.2s ease-out; +} + +.fa-bars{ + color:#fff; + } +.nav-links-mobile{ + display: none; +} +.menu-icon{ + display: none; +} + +.cName{ + font-size: 1.1rem; + border: solid; + border-color: white; + background-color:whitesmoke; + color:darkblue; + text-align: center; + +} + diff --git a/Aplicacion/src/App.js b/Aplicacion/src/App.js new file mode 100644 index 0000000..937cf86 --- /dev/null +++ b/Aplicacion/src/App.js @@ -0,0 +1,36 @@ +import React, { Component } from 'react'; +import './App.css'; +import './Components/Productos/RegistroProductos.css'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import Rutas from './Components/Rutas/Rutas'; +import { BrowserRouter as Router } from 'react-router-dom' + + + + + +class App extends Component { + constructor() { + super(); + this.state = { + name: 'React' + }; + } + + +render() { + + return ( + + +
+ +

Aplicación Registro de Ventas

+ + +
+
+ ); +} +} +export default App; diff --git a/Aplicacion/src/Components/Login/Login.js b/Aplicacion/src/Components/Login/Login.js new file mode 100644 index 0000000..fc463d4 --- /dev/null +++ b/Aplicacion/src/Components/Login/Login.js @@ -0,0 +1,22 @@ +import React from "react"; +import { useAuth0 } from "@auth0/auth0-react"; +import 'bootstrap/dist/css/bootstrap.min.css'; + + +export const LoginButton = () => { + const { loginWithRedirect } = useAuth0(); + + return ( +
+

Autenticación de Usuarios

+
+ + + Webtickrs +
+ + + +
+ ) +}; \ No newline at end of file diff --git a/Aplicacion/src/Components/Login/Logout.js b/Aplicacion/src/Components/Login/Logout.js new file mode 100644 index 0000000..b44f20a --- /dev/null +++ b/Aplicacion/src/Components/Login/Logout.js @@ -0,0 +1,9 @@ +import React from "react"; +import { useAuth0 } from "@auth0/auth0-react"; + +export const LogoutButton = () =>{ + const {logout}=useAuth0(); + return ( + + ); +} \ No newline at end of file diff --git a/Aplicacion/src/Components/Login/Privateroute.js b/Aplicacion/src/Components/Login/Privateroute.js new file mode 100644 index 0000000..5bd1a82 --- /dev/null +++ b/Aplicacion/src/Components/Login/Privateroute.js @@ -0,0 +1,11 @@ +import React from 'react' +import { Route, Redirect } from 'react-router-dom' + +//const user =null; +const user ={id:1, usuario: "j76gonzalez@gmail.com"}; + +export default function Privateroute({component:Component, ...rest}) { + return ( + {user ? : } + ); +} diff --git a/Aplicacion/src/Components/Login/Profile.js b/Aplicacion/src/Components/Login/Profile.js new file mode 100644 index 0000000..bc2481a --- /dev/null +++ b/Aplicacion/src/Components/Login/Profile.js @@ -0,0 +1,30 @@ +import React from "react"; +import { useAuth0 } from "@auth0/auth0-react"; +import JSONPretty from 'react-json-pretty'; +import "react-json-pretty/themes/monikai.css" + +export const Profile = () => { + const { user, isAuthenticated, isLoading } = useAuth0(); + if (isLoading) { + return
Cargando...
; + } + else + return ( + isAuthenticated && ( +
+
+ {user.name} +

{user.name}

+

Email:{user.email}

+

{user.profile}

+ + +
+
+ ; +
+
+ ) + ); + +} \ No newline at end of file diff --git a/Aplicacion/src/Components/Navbar.js b/Aplicacion/src/Components/Navbar.js new file mode 100644 index 0000000..0e90de6 --- /dev/null +++ b/Aplicacion/src/Components/Navbar.js @@ -0,0 +1,35 @@ +import React, { Component } from 'react' +import { Link } from 'react-router-dom' +import '../App.css'; + +//export default function Navbar() { + +class Navbar extends Component{ + state={clicked: false} + + handleClick=() =>{ this.setStated({clicked: !this.state.clicked}) + } +render(){ + return ( + + ) +} +} +export default Navbar; diff --git a/Aplicacion/src/Components/Productos/RegistroProductos.css b/Aplicacion/src/Components/Productos/RegistroProductos.css new file mode 100644 index 0000000..fe8fa33 --- /dev/null +++ b/Aplicacion/src/Components/Productos/RegistroProductos.css @@ -0,0 +1,26 @@ + +.CProductos{ + + margin: 50px auto; +} + +.Lfind{ + left: 0%; + font-family: 'Lucida Sans', 'Lucida Sans Regular', 'Lucida Grande', 'Lucida Sans Unicode', Geneva, Verdana, sans-serif; + color: darkcyan; +} + +.find{ + border-radius: 5px; + display: block; +} + +.insertar{ + + margin: 0% 10% auto auto; + +} + +.thead-dark{ + background-color: thead-dark; +} \ No newline at end of file diff --git a/Aplicacion/src/Components/Productos/RegistroProductos.js b/Aplicacion/src/Components/Productos/RegistroProductos.js new file mode 100644 index 0000000..d073b4c --- /dev/null +++ b/Aplicacion/src/Components/Productos/RegistroProductos.js @@ -0,0 +1,253 @@ +import React, { Component, Fragment } from 'react'; +import 'bootstrap/dist/css/bootstrap.min.css'; +import axios from "axios"; +import { Table, Button, Container, Modal, ModalBody, ModalFooter, ModalHeader, FormGroup } from 'reactstrap' + + +const url = "http://localhost:3001/api"; +/*const data = [ + { Id: '1', Descripción: "Producto de Prueba", Valor_Unitario: "200", Estado: "Disponible" }, +];*/ + +class Productos extends Component { + + state = { + data: [], + form: { + Id: '', + Description: '', + Estado: '', + Valor_Unitario: '', + + }, + modalInsertar: false, + modalEliminar: false, + tipoModal: '', + buscar: '', + product: [], + }; + + peticionGet = () => { + axios.get(url).then(response => { + this.setState({ data: response.data }); + }).catch(error => { + console.log(error.message); + }) + } + + peticionPost = async () => { + delete this.state.form.Id; + await axios.post(url, this.state.form).then(response => { + this.modalInsertar(); + this.peticionGet(); + }).catch(error => { + console.log(error.message); + }) + } + + peticionPut = () => { + axios.put(url + this.state.form.Id, this.state.form).then(response => { + this.modalInsertar(); + this.peticionGet(); + }).catch(error => { + console.log(error.message); + }) + } + + peticionDelete = () => { + axios.delete(url + this.state.form.Id).then(response => { + this.setState({ modalEliminar: false }); + this.peticionGet(); + }).catch(error => { + console.log(error.message); + }) + } + + modalInsertar = () => { + this.setState({ modalInsertar: !this.state.modalInsertar }); + } + + + seleccionarDescription = (Description) => { + this.setState({ + tipoModal: 'actualizar', + form: { + Id: Description.Id, + Valor_Unitario: Description, + Estado: Description.Estado + } + }) + } + + + handleChange = async e => { + e.persist(); + await this.setState({ + + form: { + ...this.state.form, + [e.target.name]: e.target.value, + } + }); + } + + componentDidMount() { + this.peticionGet(); + } + + + + onChange = async e => { + e.persist(); + await this.setState({ buscar: e.target.value }); + console.log(this.state.buscar); + this.filtrarDescriptions(); + } + + /* + editar = (dato) => { + var contador = 0; + var lista = this.state.data; + lista.map((registro) => { + if (dato.Id === registro.Id) { + lista[contador].Descripción = dato.Descripción; + lista[contador].Valor_Unitario = dato.Valor_Unitario; + lista[contador].Estado = dato.Estado; + } + contador++; + }); + this.setState({ data: lista, modalEditar: false }); + } + + eliminar = (dato) => { + var opcion = window.confirm("Esta seguro de eliminar el registro? " + dato.Id); + if (opcion) { + var contador = 0; + var lista = this.state.data; + lista.map((registro) => { + if (registro.Id === dato.Id) { + lista.splice(contador, 1); + } + contador++; + }); + this.setState({ data: lista }); + } + } + */ + + + filtrarDescriptions = () => { + var search = this.state.data.filter((Description) => { + if (Description.Descripción.includes(this.state.buscar) || + Description.Estado.includes(this.state.buscar) || + Description.Id.toString().includes(this.state.buscar) || + Description.Valor_Unitario.toString().includes(this.state.buscar)) { + return Description; + } + }); + this.setState({ product: search }); + } + + render() { + const { form } = this.state; + return ( + + +

Módulo administrador de productos

+
+ + + +
+ +

+ + + + + + + + + + + + {this.state.product.map(Description => { + return ( + + + + + + + {""} + + + ) + })} + +
IdDescripciónEstadoValor_UnitarioAcciones
{Description.Id}{Description.Descripción}{Description.Estado}{Description.Valor_Unitario}
+ + {/* REVIAR CIERRE DEL CONTAINER*/} + + +
+

Insertar Registro

+ this.modalInsertar()}> +
+
+ + + + + + + + + + + + + + + + + + + + + + + {this.state.tipoModal === 'insertar' ? + : + } + + +
+ + + +
+

Editar Registro

+
+
+ + + Esta seguro que desea elminar el producto {form && form.Description} + + + + + + +
+
+
+ ); + } + +} +export default Productos \ No newline at end of file diff --git a/Aplicacion/src/Components/Register/Users.js b/Aplicacion/src/Components/Register/Users.js new file mode 100644 index 0000000..fc05126 --- /dev/null +++ b/Aplicacion/src/Components/Register/Users.js @@ -0,0 +1,16 @@ +import React from "react"; + + +class Users extends React.Component{ + + render(){ +
+

Gestión de Usuarios

+
+ +
+ +
+ + } +} \ No newline at end of file diff --git a/Aplicacion/src/Components/Rutas/Rutas.js b/Aplicacion/src/Components/Rutas/Rutas.js new file mode 100644 index 0000000..6a71157 --- /dev/null +++ b/Aplicacion/src/Components/Rutas/Rutas.js @@ -0,0 +1,31 @@ +import { Route, BrowserRouter as Router, Switch } from 'react-router-dom' +import React from 'react' +import { LoginButton } from '../Login/Login' +import { LogoutButton } from '../Login/Logout' +import Productos from '../Productos/RegistroProductos' +import Navbar from '../Navbar' +import Privateroute from '../Login/Privateroute' +import { Profile } from '../Login/Profile' + +export default function Rutas() { + return ( + + + + + + + + + + + + +

404 Not found

+
+
+ + +
+ ) +} diff --git a/Aplicacion/src/index.css b/Aplicacion/src/index.css new file mode 100644 index 0000000..da4847a --- /dev/null +++ b/Aplicacion/src/index.css @@ -0,0 +1,16 @@ +body { + margin: 0; + font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen', + 'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue', + sans-serif; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + +} + +code { + font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New', + monospace; +} + + diff --git a/Aplicacion/src/index.js b/Aplicacion/src/index.js new file mode 100644 index 0000000..6484afa --- /dev/null +++ b/Aplicacion/src/index.js @@ -0,0 +1,20 @@ +import React from 'react'; +import ReactDOM from 'react-dom'; +import './index.css'; +import App from './App'; +import { Auth0Provider } from '@auth0/auth0-react'; +import 'bootstrap/dist/css/bootstrap.css' ; + + +ReactDOM.render( + + + , + + , + document.getElementById('root'), + +); \ No newline at end of file diff --git a/Prueba.py b/Prueba.py deleted file mode 100644 index 57ea3c7..0000000 --- a/Prueba.py +++ /dev/null @@ -1 +0,0 @@ -"Esto es una rchivo de prueba" diff --git a/Spring3.zip b/Spring3.zip new file mode 100644 index 0000000..b096a45 Binary files /dev/null and b/Spring3.zip differ diff --git a/integral.m b/integral.m new file mode 100644 index 0000000..9eb6927 --- /dev/null +++ b/integral.m @@ -0,0 +1,8 @@ +clear; +clc; +syms x +f=input('ingrse la funcion: '); +F=inline(char(f)); +a=input('desde: '); +b=input('hasta: '); +F=int(f,a,b) \ No newline at end of file