From bad70d7217e53a298a1284cf099b651bb15a022a Mon Sep 17 00:00:00 2001 From: Maria Sanchez Date: Fri, 22 Jul 2022 15:16:54 -0600 Subject: [PATCH 01/16] login web component --- web-ui/web-react/src/components/LogIn.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/web-ui/web-react/src/components/LogIn.js b/web-ui/web-react/src/components/LogIn.js index 10c58bd6..4d0531e1 100644 --- a/web-ui/web-react/src/components/LogIn.js +++ b/web-ui/web-react/src/components/LogIn.js @@ -3,6 +3,8 @@ import { InputText } from 'primereact/inputtext'; const LogIn = () => { + + return (
From 75c463b1626329100ff2377c514bea325b18bd69 Mon Sep 17 00:00:00 2001 From: Maria Sanchez Date: Tue, 2 Aug 2022 23:01:58 -0600 Subject: [PATCH 02/16] log in --- web-ui/web-react/src/components/LogIn.js | 24 ++++++++++++++---------- 1 file changed, 14 insertions(+), 10 deletions(-) diff --git a/web-ui/web-react/src/components/LogIn.js b/web-ui/web-react/src/components/LogIn.js index 4d0531e1..e4e09d8f 100644 --- a/web-ui/web-react/src/components/LogIn.js +++ b/web-ui/web-react/src/components/LogIn.js @@ -1,8 +1,16 @@ -import React from 'react'; +import React, { useState } from 'react'; import { InputText } from 'primereact/inputtext'; const LogIn = () => { + const [email, setEmail] = useState(""); + const [password, setPassword] = useState(""); + + + const iniciarSesion = () =>{ + + } + return ( @@ -12,12 +20,12 @@ const LogIn = () => {
Iniciar Sesión
- - + +
- - + +
{/* */} @@ -28,8 +36,4 @@ const LogIn = () => { ) } -export default LogIn - -/* image 1 */ - - +export default LogIn \ No newline at end of file From d52b47a2c19df40d9659d285f1a2d2f59d2d1267 Mon Sep 17 00:00:00 2001 From: Maria Sanchez Date: Fri, 5 Aug 2022 23:16:04 -0600 Subject: [PATCH 03/16] mobile home component --- .expo/README.md | 15 ++++++++ .expo/settings.json | 8 +++++ mobile-ui/App.js | 34 +++++------------- .../{Logo_Katoikia.png => logo-katoikia.png} | Bin mobile-ui/components/Home.js | 28 +++++++++++++++ 5 files changed, 59 insertions(+), 26 deletions(-) create mode 100644 .expo/README.md create mode 100644 .expo/settings.json rename mobile-ui/assets/{Logo_Katoikia.png => logo-katoikia.png} (100%) create mode 100644 mobile-ui/components/Home.js diff --git a/.expo/README.md b/.expo/README.md new file mode 100644 index 00000000..fd146b4d --- /dev/null +++ b/.expo/README.md @@ -0,0 +1,15 @@ +> Why do I have a folder named ".expo" in my project? + +The ".expo" folder is created when an Expo project is started using "expo start" command. + +> What do the files contain? + +- "devices.json": contains information about devices that have recently opened this project. This is used to populate the "Development sessions" list in your development builds. +- "packager-info.json": contains port numbers and process PIDs that are used to serve the application to the mobile device/simulator. +- "settings.json": contains the server configuration that is used to serve the application manifest. + +> Should I commit the ".expo" folder? + +No, you should not share the ".expo" folder. It does not contain any information that is relevant for other developers working on the project, it is specific to your machine. + +Upon project creation, the ".expo" folder is already added to your ".gitignore" file. diff --git a/.expo/settings.json b/.expo/settings.json new file mode 100644 index 00000000..92bc513b --- /dev/null +++ b/.expo/settings.json @@ -0,0 +1,8 @@ +{ + "hostType": "lan", + "lanType": "ip", + "dev": true, + "minify": false, + "urlRandomness": null, + "https": false +} diff --git a/mobile-ui/App.js b/mobile-ui/App.js index 0b181475..169933a1 100644 --- a/mobile-ui/App.js +++ b/mobile-ui/App.js @@ -18,6 +18,7 @@ import { } from "native-base"; import NativeBaseIcon from "./components/NativeBaseIcon"; import { Platform } from "react-native"; +import logo from "./assets/logo-katoikia.png" // Define the config const config = { @@ -31,17 +32,18 @@ colors: { brown: "#D7A86E" } }); -//const logo = require('./assets/') +// const logo = require('./assets/logo-katoikia.png') + export default function App() { return (
- {/* Katoikia logo */} + Katoikia logo Continuar - - {/* - I'm a new user. - */} - - Regístrese aquí - - +
diff --git a/mobile-ui/assets/Logo_Katoikia.png b/mobile-ui/assets/logo-katoikia.png similarity index 100% rename from mobile-ui/assets/Logo_Katoikia.png rename to mobile-ui/assets/logo-katoikia.png diff --git a/mobile-ui/components/Home.js b/mobile-ui/components/Home.js new file mode 100644 index 00000000..cce81831 --- /dev/null +++ b/mobile-ui/components/Home.js @@ -0,0 +1,28 @@ +import React from "react"; +import { + Text, + Link, + HStack, + Center, + Heading, + Switch, + useColorMode, + NativeBaseProvider, + extendTheme, + VStack, + Box, + FormControl, + Input, + Button, + Image + } from "native-base"; + +export default function Home(){ + + return ( + + + + + ) +} \ No newline at end of file From 8e98739f99f481087db6f6ab8171f6eee80a83e8 Mon Sep 17 00:00:00 2001 From: Mariela Date: Tue, 9 Aug 2022 11:56:36 -0600 Subject: [PATCH 04/16] Nueva prueba de inicio de sesion --- web-ui/web-react/src/App.js | 76 +--- .../src/components/DashboardAdmin.js | 360 ++++++++++++++++++ .../web-react/src/components/LocalStorage.js | 17 + .../src/components/LoginLocalStorage.js | 104 +++++ web-ui/web-react/src/index.js | 3 +- web-ui/web-react/src/pages/Menu.js | 35 ++ web-ui/web-react/src/routes/Routes.js | 17 + 7 files changed, 554 insertions(+), 58 deletions(-) create mode 100644 web-ui/web-react/src/components/DashboardAdmin.js create mode 100644 web-ui/web-react/src/components/LocalStorage.js create mode 100644 web-ui/web-react/src/components/LoginLocalStorage.js create mode 100644 web-ui/web-react/src/pages/Menu.js create mode 100644 web-ui/web-react/src/routes/Routes.js diff --git a/web-ui/web-react/src/App.js b/web-ui/web-react/src/App.js index 4f7d2c96..d6fa404a 100644 --- a/web-ui/web-react/src/App.js +++ b/web-ui/web-react/src/App.js @@ -1,7 +1,8 @@ import React, { useState, useEffect, useRef } from 'react'; import classNames from 'classnames'; -import { Route, useLocation } from 'react-router-dom'; +import { Route, useLocation, BrowserRouter} from 'react-router-dom'; import { CSSTransition } from 'react-transition-group'; +import Routes from './routes/Routes' import { AppTopbar } from './AppTopbar'; import { AppFooter } from './AppFooter'; @@ -50,6 +51,7 @@ import './assets/demo/Demos.scss'; import './assets/layout/layout.scss'; import './App.scss'; import LogIn from './components/LogIn'; +import LoginLocalStorage from './components/LoginLocalStorage'; const App = () => { const [layoutMode, setLayoutMode] = useState('static'); @@ -63,6 +65,15 @@ const App = () => { const copyTooltipRef = useRef(); const location = useLocation(); + const handleLogout=()=>{ + localStorage.clear(); + window.location.reload(); + } + + + + + PrimeReact.ripple = true; let menuClick = false; @@ -171,7 +182,8 @@ const App = () => { {label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad'}, {label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas'}, {label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos'}, - {label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn'} + {label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn'}, + {label: 'Log out', icon: 'pi pi-fw pi-id-card', to: '/logOut'} ] }, { @@ -289,61 +301,11 @@ const App = () => { }); return ( -
- - - - -
- -
- -
-
- } /> - - - - - - - - - - - - - - - - - } /> - - - - - - - - - - - -
- - -
- - - - -
-
- - -
+
+ + + +
); } diff --git a/web-ui/web-react/src/components/DashboardAdmin.js b/web-ui/web-react/src/components/DashboardAdmin.js new file mode 100644 index 00000000..0911d706 --- /dev/null +++ b/web-ui/web-react/src/components/DashboardAdmin.js @@ -0,0 +1,360 @@ +import React, { useState, useEffect, useRef } from 'react'; +import classNames from 'classnames'; +import { Route, useLocation } from 'react-router-dom'; +import { CSSTransition } from 'react-transition-group'; + +import { AppTopbar } from '../AppTopbar'; +import { AppFooter } from '../AppFooter'; +import { AppMenu } from '../AppMenu'; +import { AppConfig } from '../AppConfig'; + +import Dashboard from '../templates/Dashboard'; +import ButtonDemo from '../templates/ButtonDemo'; +import ChartDemo from '../templates/ChartDemo'; +import Documentation from '../templates/Documentation'; +import FileDemo from '../templates/FileDemo'; +import FloatLabelDemo from '../templates/FloatLabelDemo'; +import FormLayoutDemo from '../templates/FormLayoutDemo'; +import InputDemo from '../templates/InputDemo'; +import ListDemo from '../templates/ListDemo'; +import MenuDemo from '../templates/MenuDemo'; +import MessagesDemo from '../templates/MessagesDemo'; +import MiscDemo from '../templates/MiscDemo'; +import OverlayDemo from '../templates/OverlayDemo'; +import MediaDemo from '../templates/MediaDemo'; +import PanelDemo from '../templates/PanelDemo'; +import TableDemo from '../templates/TableDemo'; +import TreeDemo from '../templates/TreeDemo'; +import InvalidStateDemo from '../templates/InvalidStateDemo'; +import BlocksDemo from '../templates/BlocksDemo'; +import IconsDemo from '../templates/IconsDemo'; +import AdministradoresSistema from '../components/AdministradoresSistema'; +import AdministradoresComunidad from '../components/AdministradoresComunidad'; +import GuardasSeguridad from '../components/GuardasSeguridad'; +import Communities from '../components/ComunidadViviendas'; +import Inquilinos from '../components/Inquilinos'; + +import Crud from '../pages/Crud'; +import EmptyPage from '../pages/EmptyPage'; +import TimelineDemo from '../pages/TimelineDemo'; + +import PrimeReact from 'primereact/api'; +import { Tooltip } from 'primereact/tooltip'; + +import 'primereact/resources/primereact.css'; +import 'primeicons/primeicons.css'; +import 'primeflex/primeflex.css'; +import 'prismjs/themes/prism-coy.css'; +import '../assets/demo/flags/flags.css'; +import '../assets/demo/Demos.scss'; +import '../assets/layout/layout.scss'; +import '../App.scss'; +import LogIn from '../components/LogIn'; +import LoginLocalStorage from '../components/LoginLocalStorage'; + +const DashboardAdmin = () => { + const [layoutMode, setLayoutMode] = useState('static'); + const [layoutColorMode, setLayoutColorMode] = useState('light') + const [inputStyle, setInputStyle] = useState('outlined'); + const [ripple, setRipple] = useState(true); + const [staticMenuInactive, setStaticMenuInactive] = useState(false); + const [overlayMenuActive, setOverlayMenuActive] = useState(false); + const [mobileMenuActive, setMobileMenuActive] = useState(false); + const [mobileTopbarMenuActive, setMobileTopbarMenuActive] = useState(false); + const copyTooltipRef = useRef(); + const location = useLocation(); + + const handleLogout=()=>{ + localStorage.clear(); + window.location.reload(); + } + + PrimeReact.ripple = true; + + let menuClick = false; + let mobileTopbarMenuClick = false; + + useEffect(() => { + if (mobileMenuActive) { + addClass(document.body, "body-overflow-hidden"); + } else { + removeClass(document.body, "body-overflow-hidden"); + } + }, [mobileMenuActive]); + + useEffect(() => { + copyTooltipRef && copyTooltipRef.current && copyTooltipRef.current.updateTargetEvents(); + }, [location]); + + const onInputStyleChange = (inputStyle) => { + setInputStyle(inputStyle); + } + + const onRipple = (e) => { + PrimeReact.ripple = e.value; + setRipple(e.value) + } + + const onLayoutModeChange = (mode) => { + setLayoutMode(mode) + } + + const onColorModeChange = (mode) => { + setLayoutColorMode(mode) + } + + const onWrapperClick = (event) => { + if (!menuClick) { + setOverlayMenuActive(false); + setMobileMenuActive(false); + } + + if (!mobileTopbarMenuClick) { + setMobileTopbarMenuActive(false); + } + + mobileTopbarMenuClick = false; + menuClick = false; + } + + const onToggleMenuClick = (event) => { + menuClick = true; + + if (isDesktop()) { + if (layoutMode === 'overlay') { + if (mobileMenuActive === true) { + setOverlayMenuActive(true); + } + + setOverlayMenuActive((prevState) => !prevState); + setMobileMenuActive(false); + } + else if (layoutMode === 'static') { + setStaticMenuInactive((prevState) => !prevState); + } + } + else { + setMobileMenuActive((prevState) => !prevState); + } + + event.preventDefault(); + } + + const onSidebarClick = () => { + menuClick = true; + } + + const onMobileTopbarMenuClick = (event) => { + mobileTopbarMenuClick = true; + + setMobileTopbarMenuActive((prevState) => !prevState); + event.preventDefault(); + } + + const onMobileSubTopbarMenuClick = (event) => { + mobileTopbarMenuClick = true; + + event.preventDefault(); + } + + const onMenuItemClick = (event) => { + if (!event.item.items) { + setOverlayMenuActive(false); + setMobileMenuActive(false); + } + } + const isDesktop = () => { + return window.innerWidth >= 992; + } + + const menu = [ + { + label: 'Home', + items: [ + {label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/'}, + {label: 'Administradores del sistema', icon: 'pi pi-fw pi-id-card', to: '/administradoresSistema'}, + {label: 'Administradores de comunidad', icon: 'pi pi-fw pi-id-card', to: '/administradoresComunidad'}, + {label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad'}, + {label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas'}, + {label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos'}, + {label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn'}, + {label: 'Log out', icon: 'pi pi-fw pi-id-card', to: '/logOut'} + ] + }, + { + label: 'UI Components', icon: 'pi pi-fw pi-sitemap', + items: [ + { label: 'Form Layout', icon: 'pi pi-fw pi-id-card', to: '/formlayout' }, + { label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' }, + { label: "Float Label", icon: "pi pi-fw pi-bookmark", to: "/floatlabel" }, + { label: "Invalid State", icon: "pi pi-fw pi-exclamation-circle", to: "invalidstate" }, + { label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' }, + { label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' }, + { label: 'List', icon: 'pi pi-fw pi-list', to: '/list' }, + { label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' }, + { label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' }, + { label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' }, + { label: "Media", icon: "pi pi-fw pi-image", to: "/media" }, + { label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' }, + { label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' }, + { label: 'File', icon: 'pi pi-fw pi-file', to: '/file' }, + { label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' }, + { label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' }, + ] + }, + { + label: 'UI Blocks', + items: [ + { label: 'Free Blocks', icon: 'pi pi-fw pi-eye', to: '/blocks', badge: "NEW" }, + { label: 'All Blocks', icon: 'pi pi-fw pi-globe', url: 'https://www.primefaces.org/primeblocks-react' } + ] + }, + { + label: 'Icons', + items: [ + { label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' } + ] + }, + { + label: 'Pages', icon: 'pi pi-fw pi-clone', + items: [ + { label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' }, + { label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' }, + { label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' } + ] + }, + { + label: 'Menu Hierarchy', icon: 'pi pi-fw pi-search', + items: [ + { + label: 'Submenu 1', icon: 'pi pi-fw pi-bookmark', + items: [ + { + label: 'Submenu 1.1', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' }, + ] + }, + { + label: 'Submenu 1.2', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' } + ] + }, + ] + }, + { + label: 'Submenu 2', icon: 'pi pi-fw pi-bookmark', + items: [ + { + label: 'Submenu 2.1', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' }, + ] + }, + { + label: 'Submenu 2.2', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' } + ] + } + ] + } + ] + } + ]; + + const addClass = (element, className) => { + if (element.classList) + element.classList.add(className); + else + element.className += ' ' + className; + } + + const removeClass = (element, className) => { + if (element.classList) + element.classList.remove(className); + else + element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); + } + + const wrapperClass = classNames('layout-wrapper', { + 'layout-overlay': layoutMode === 'overlay', + 'layout-static': layoutMode === 'static', + 'layout-static-sidebar-inactive': staticMenuInactive && layoutMode === 'static', + 'layout-overlay-sidebar-active': overlayMenuActive && layoutMode === 'overlay', + 'layout-mobile-sidebar-active': mobileMenuActive, + 'p-input-filled': inputStyle === 'filled', + 'p-ripple-disabled': ripple === false, + 'layout-theme-light': layoutColorMode === 'light' + }); + + return ( +
+ + + + +
+ +
+ +
+
+ } /> + + + + + + + + + + + + + + + + + } /> + + + + + + + + + + + + +
+ + +
+ + + + +
+
+ + +
+ + ); + +} + +export default DashboardAdmin; diff --git a/web-ui/web-react/src/components/LocalStorage.js b/web-ui/web-react/src/components/LocalStorage.js new file mode 100644 index 00000000..37edbadb --- /dev/null +++ b/web-ui/web-react/src/components/LocalStorage.js @@ -0,0 +1,17 @@ +import React, { useRef } from "react"; + +function LocalStorage(){ + const data=useRef(); + const handleClick=()=>{ + console.log(data.current.value,"initial value") + localStorage.setItem("inputValue",data.current.value) + } + console.log(localStorage.getItem("inputValue"),"****") + return( + <> + + + + ); +} +export default LocalStorage; \ No newline at end of file diff --git a/web-ui/web-react/src/components/LoginLocalStorage.js b/web-ui/web-react/src/components/LoginLocalStorage.js new file mode 100644 index 00000000..206a7ab1 --- /dev/null +++ b/web-ui/web-react/src/components/LoginLocalStorage.js @@ -0,0 +1,104 @@ +import DashboardAdmin from "./DashboardAdmin"; +import React, { Component, Fragment } from 'react'; +import Cookies from 'universal-cookie'; +import { InputText } from 'primereact/inputtext'; + +const baseUrl = "http://localhost:4000/user/loginUser"; +const cookies = new Cookies(); + + +class LoginLocalStorage extends Component { + state = { + form: { + username: '', + password: '' + } + } + + handleChange = async e => { + await this.setState({ + form: { + ...this.state.form, + [e.target.name]: e.target.value + } + }); + } + + iniciarSesion = async () => { + const data = { + email: this.state.form.email, + password: this.state.form.password + } + + await fetch(baseUrl, { + cache: 'no-cache', + method: 'POST', + body: JSON.stringify(data), + headers: { + 'Content-Type': 'application/json' + } + }) + .then(response => { + return response.json(); + }) + .then(response => { + console.log(response.message); + if (response.message) { + const user = response.message; + cookies.set('id', user._id, { path: "/" }); + cookies.set('name', user.name, { path: "/" }); + cookies.set('email', user.username, { path: "/" }); + alert(`Bienvenido ${user.name}`); + window.location.href = "./menu"; + } else { + alert('El usuario o la contraseña no son correctos'); + } + }) + .catch(error => { + console.log(error); + }) + + + + } + + componentDidMount() { + if (cookies.get('email')) { + window.location.href = "./menu"; + } + } + + + render() { + return ( + + +
+
+
+
Iniciar Sesión
+
+
+ + +
+
+ + +
+ + +
+
+
+
+ +
+ + + + ); + } +} + +export default LoginLocalStorage; \ No newline at end of file diff --git a/web-ui/web-react/src/index.js b/web-ui/web-react/src/index.js index fb5e7a3f..991c96b9 100644 --- a/web-ui/web-react/src/index.js +++ b/web-ui/web-react/src/index.js @@ -9,7 +9,8 @@ import ScrollToTop from './ScrollToTop'; ReactDOM.render( - + + , document.getElementById('root') diff --git a/web-ui/web-react/src/pages/Menu.js b/web-ui/web-react/src/pages/Menu.js new file mode 100644 index 00000000..379eb986 --- /dev/null +++ b/web-ui/web-react/src/pages/Menu.js @@ -0,0 +1,35 @@ +import React, { Component } from 'react'; +import Cookies from 'universal-cookie'; + +const cookies = new Cookies(); + +class Menu extends Component { + cerrarSesion=()=>{ + cookies.remove('id', {path: "/"}); + cookies.remove('name', {path: "/"}); + cookies.remove('email', {path: "/"}); + window.location.href='/'; + } + + componentDidMount() { + if(!cookies.get('email')){ + window.location.href="./"; + } + } + + render() { + console.log('id: '+ cookies.get('id')); + console.log('name: '+cookies.get('name')); + console.log('email: '+cookies.get('email')); + return ( +
+ Menu Principal + +
+ +
+ ); + } +} + +export default Menu; \ No newline at end of file diff --git a/web-ui/web-react/src/routes/Routes.js b/web-ui/web-react/src/routes/Routes.js new file mode 100644 index 00000000..a9d8860a --- /dev/null +++ b/web-ui/web-react/src/routes/Routes.js @@ -0,0 +1,17 @@ +import React from 'react'; +import {BrowserRouter, Switch, Route} from 'react-router-dom'; +import LoginLocalStorage from '../components/LoginLocalStorage'; +import Menu from '../pages/Menu'; + +function Routes() { + return ( + + + + + + + ); +} + +export default Routes; \ No newline at end of file From 770bbfed430207e8d5162b4a8494f8445d9a01e0 Mon Sep 17 00:00:00 2001 From: Mariela Date: Tue, 9 Aug 2022 13:42:47 -0600 Subject: [PATCH 05/16] iniciar sesion funcionalidad frontend --- .../public/assets/themes/khaki/theme.css | 7 + web-ui/web-react/src/App.js | 67 +++- .../src/components/LoginLocalStorage.js | 63 +++- web-ui/web-react/src/components/MenuAdmin.js | 308 ++++++++++++++++++ web-ui/web-react/src/index.js | 8 +- web-ui/web-react/src/pages/Menu.js | 2 +- web-ui/web-react/src/routes/Routes.js | 4 +- 7 files changed, 424 insertions(+), 35 deletions(-) create mode 100644 web-ui/web-react/src/components/MenuAdmin.js diff --git a/web-ui/web-react/public/assets/themes/khaki/theme.css b/web-ui/web-react/public/assets/themes/khaki/theme.css index 08d350a6..259307db 100644 --- a/web-ui/web-react/public/assets/themes/khaki/theme.css +++ b/web-ui/web-react/public/assets/themes/khaki/theme.css @@ -7117,4 +7117,11 @@ .p-button.p-button-danger:enabled:focus { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px #f7a2a2, 0 1px 2px 0 black; +} + + +.login-wrapper { + display: flex; + flex-direction: column; + align-items: center; } \ No newline at end of file diff --git a/web-ui/web-react/src/App.js b/web-ui/web-react/src/App.js index d6fa404a..349d6c11 100644 --- a/web-ui/web-react/src/App.js +++ b/web-ui/web-react/src/App.js @@ -1,8 +1,7 @@ import React, { useState, useEffect, useRef } from 'react'; import classNames from 'classnames'; -import { Route, useLocation, BrowserRouter} from 'react-router-dom'; +import { Route, useLocation } from 'react-router-dom'; import { CSSTransition } from 'react-transition-group'; -import Routes from './routes/Routes' import { AppTopbar } from './AppTopbar'; import { AppFooter } from './AppFooter'; @@ -51,7 +50,6 @@ import './assets/demo/Demos.scss'; import './assets/layout/layout.scss'; import './App.scss'; import LogIn from './components/LogIn'; -import LoginLocalStorage from './components/LoginLocalStorage'; const App = () => { const [layoutMode, setLayoutMode] = useState('static'); @@ -70,10 +68,6 @@ const App = () => { window.location.reload(); } - - - - PrimeReact.ripple = true; let menuClick = false; @@ -301,11 +295,60 @@ const App = () => { }); return ( -
- - - -
+
+ + + + +
+ +
+ +
+
+ } /> + + + + + + + + + + + + + + + + + } /> + + + + + + + + + + + + +
+ + +
+ + + + +
+
+
); } diff --git a/web-ui/web-react/src/components/LoginLocalStorage.js b/web-ui/web-react/src/components/LoginLocalStorage.js index 206a7ab1..6f01c4bc 100644 --- a/web-ui/web-react/src/components/LoginLocalStorage.js +++ b/web-ui/web-react/src/components/LoginLocalStorage.js @@ -2,6 +2,7 @@ import DashboardAdmin from "./DashboardAdmin"; import React, { Component, Fragment } from 'react'; import Cookies from 'universal-cookie'; import { InputText } from 'primereact/inputtext'; +import { Button } from 'primereact/button'; const baseUrl = "http://localhost:4000/user/loginUser"; const cookies = new Cookies(); @@ -10,9 +11,10 @@ const cookies = new Cookies(); class LoginLocalStorage extends Component { state = { form: { - username: '', + email: '', password: '' - } + }, + errorMessages:{} } handleChange = async e => { @@ -30,6 +32,8 @@ class LoginLocalStorage extends Component { password: this.state.form.password } + console.log(data); + await fetch(baseUrl, { cache: 'no-cache', method: 'POST', @@ -47,7 +51,7 @@ class LoginLocalStorage extends Component { const user = response.message; cookies.set('id', user._id, { path: "/" }); cookies.set('name', user.name, { path: "/" }); - cookies.set('email', user.username, { path: "/" }); + cookies.set('email', user.email, { path: "/" }); alert(`Bienvenido ${user.name}`); window.location.href = "./menu"; } else { @@ -68,31 +72,54 @@ class LoginLocalStorage extends Component { } } + renderErrorMessage = (name) => + name === this.state.errorMessages.name && ( +
{this.state.errorMessages.message}
+ ); + + errors = { + email: "Correo requerido", + pass: "Contraseña requerida" + }; render() { return ( -
-
-
-
Iniciar Sesión
-
-
- - -
-
- - -
+ +
- +
+
+
+
Iniciar Sesión
+
+
+ + + {this.renderErrorMessage("email")} +
+
+ + + {this.renderErrorMessage("password")} +
+ + +
- diff --git a/web-ui/web-react/src/components/MenuAdmin.js b/web-ui/web-react/src/components/MenuAdmin.js new file mode 100644 index 00000000..5cca9efe --- /dev/null +++ b/web-ui/web-react/src/components/MenuAdmin.js @@ -0,0 +1,308 @@ +import React, { Component } from 'react'; +import Cookies from 'universal-cookie'; +import AdministradoresComunidad from './AdministradoresComunidad'; +import AdministradoresSistema from './AdministradoresSistema'; +import Communities from './components/ComunidadViviendas'; + +class MenuAdmin extends Component { + state = { + layoutMode + } + + + +} + +const [layoutMode, setLayoutMode] = useState('static'); +const [layoutColorMode, setLayoutColorMode] = useState('light') +const [inputStyle, setInputStyle] = useState('outlined'); +const [ripple, setRipple] = useState(true); +const [staticMenuInactive, setStaticMenuInactive] = useState(false); +const [overlayMenuActive, setOverlayMenuActive] = useState(false); +const [mobileMenuActive, setMobileMenuActive] = useState(false); +const [mobileTopbarMenuActive, setMobileTopbarMenuActive] = useState(false); +const copyTooltipRef = useRef(); +const location = useLocation(); + +const [cookies, setCookies] = useRef(); + +const handleLogout = () => { + cookies.remove('id', {path: "/"}); + cookies.remove('email', {path: "/"}); + cookies.remove('name', {path: "/"}); + window.location.href='/'; +} + +useEffect(() => { + if(!cookies.get('email')){ + window.location.href="./"; + } +}, []) + + + +PrimeReact.ripple = true; + +let menuClick = false; +let mobileTopbarMenuClick = false; + +useEffect(() => { + if (mobileMenuActive) { + addClass(document.body, "body-overflow-hidden"); + } else { + removeClass(document.body, "body-overflow-hidden"); + } +}, [mobileMenuActive]); + +useEffect(() => { + copyTooltipRef && copyTooltipRef.current && copyTooltipRef.current.updateTargetEvents(); +}, [location]); + +const onInputStyleChange = (inputStyle) => { + setInputStyle(inputStyle); +} + +const onRipple = (e) => { + PrimeReact.ripple = e.value; + setRipple(e.value) +} + +const onLayoutModeChange = (mode) => { + setLayoutMode(mode) +} + +const onColorModeChange = (mode) => { + setLayoutColorMode(mode) +} + +const onWrapperClick = (event) => { + if (!menuClick) { + setOverlayMenuActive(false); + setMobileMenuActive(false); + } + + if (!mobileTopbarMenuClick) { + setMobileTopbarMenuActive(false); + } + + mobileTopbarMenuClick = false; + menuClick = false; +} + +const onToggleMenuClick = (event) => { + menuClick = true; + + if (isDesktop()) { + if (layoutMode === 'overlay') { + if (mobileMenuActive === true) { + setOverlayMenuActive(true); + } + + setOverlayMenuActive((prevState) => !prevState); + setMobileMenuActive(false); + } + else if (layoutMode === 'static') { + setStaticMenuInactive((prevState) => !prevState); + } + } + else { + setMobileMenuActive((prevState) => !prevState); + } + + event.preventDefault(); +} + +const onSidebarClick = () => { + menuClick = true; +} + +const onMobileTopbarMenuClick = (event) => { + mobileTopbarMenuClick = true; + + setMobileTopbarMenuActive((prevState) => !prevState); + event.preventDefault(); +} + +const onMobileSubTopbarMenuClick = (event) => { + mobileTopbarMenuClick = true; + + event.preventDefault(); +} + +const onMenuItemClick = (event) => { + if (!event.item.items) { + setOverlayMenuActive(false); + setMobileMenuActive(false); + } +} +const isDesktop = () => { + return window.innerWidth >= 992; +} + +const menu = [ + { + label: 'Home', + items: [ + { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, + { label: 'Administradores del sistema', icon: 'pi pi-fw pi-id-card', to: '/administradoresSistema' }, + { label: 'Administradores de comunidad', icon: 'pi pi-fw pi-id-card', to: '/administradoresComunidad' }, + { label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad' }, + { label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas' }, + { label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos' }, + { label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn' }, + { label: 'Log out', icon: 'pi pi-fw pi-id-card', to: '/logOut' } + ] + }, + { + label: 'UI Components', icon: 'pi pi-fw pi-sitemap', + items: [ + { label: 'Form Layout', icon: 'pi pi-fw pi-id-card', to: '/formlayout' }, + { label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' }, + { label: "Float Label", icon: "pi pi-fw pi-bookmark", to: "/floatlabel" }, + { label: "Invalid State", icon: "pi pi-fw pi-exclamation-circle", to: "invalidstate" }, + { label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' }, + { label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' }, + { label: 'List', icon: 'pi pi-fw pi-list', to: '/list' }, + { label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' }, + { label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' }, + { label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' }, + { label: "Media", icon: "pi pi-fw pi-image", to: "/media" }, + { label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' }, + { label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' }, + { label: 'File', icon: 'pi pi-fw pi-file', to: '/file' }, + { label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' }, + { label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' }, + ] + }, + { + label: 'UI Blocks', + items: [ + { label: 'Free Blocks', icon: 'pi pi-fw pi-eye', to: '/blocks', badge: "NEW" }, + { label: 'All Blocks', icon: 'pi pi-fw pi-globe', url: 'https://www.primefaces.org/primeblocks-react' } + ] + }, + { + label: 'Icons', + items: [ + { label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' } + ] + }, + { + label: 'Pages', icon: 'pi pi-fw pi-clone', + items: [ + { label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' }, + { label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' }, + { label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' } + ] + }, + { + label: 'Menu Hierarchy', icon: 'pi pi-fw pi-search', + items: [ + { + label: 'Submenu 1', icon: 'pi pi-fw pi-bookmark', + items: [ + { + label: 'Submenu 1.1', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' }, + ] + }, + { + label: 'Submenu 1.2', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' } + ] + }, + ] + }, + { + label: 'Submenu 2', icon: 'pi pi-fw pi-bookmark', + items: [ + { + label: 'Submenu 2.1', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' }, + ] + }, + { + label: 'Submenu 2.2', icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' } + ] + } + ] + } + ] + } +]; + +const addClass = (element, className) => { + if (element.classList) + element.classList.add(className); + else + element.className += ' ' + className; +} + +const removeClass = (element, className) => { + if (element.classList) + element.classList.remove(className); + else + element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); +} + +const wrapperClass = classNames('layout-wrapper', { + 'layout-overlay': layoutMode === 'overlay', + 'layout-static': layoutMode === 'static', + 'layout-static-sidebar-inactive': staticMenuInactive && layoutMode === 'static', + 'layout-overlay-sidebar-active': overlayMenuActive && layoutMode === 'overlay', + 'layout-mobile-sidebar-active': mobileMenuActive, + 'p-input-filled': inputStyle === 'filled', + 'p-ripple-disabled': ripple === false, + 'layout-theme-light': layoutColorMode === 'light' +}); + +class Menu extends Component { + cerrarSesion=()=>{ + cookies.remove('id', {path: "/"}); + cookies.remove('email', {path: "/"}); + cookies.remove('name', {path: "/"}); + window.location.href='/'; + } + + componentDidMount() { + if(!cookies.get('email')){ + window.location.href="./app"; + } + } + + render() { + console.log('id: '+ cookies.get('id')); + console.log('name: '+cookies.get('name')); + console.log('email: '+cookies.get('email')); + return ( +
+ Menu Principal +
+
+ + + + + +
+ +
+
+ +
+ ); + } +} + +export default Menu; \ No newline at end of file diff --git a/web-ui/web-react/src/index.js b/web-ui/web-react/src/index.js index 991c96b9..3e9cb72d 100644 --- a/web-ui/web-react/src/index.js +++ b/web-ui/web-react/src/index.js @@ -3,14 +3,16 @@ import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; //import * as serviceWorker from './serviceWorker'; -import { HashRouter } from 'react-router-dom' +import { HashRouter, Route } from 'react-router-dom' import ScrollToTop from './ScrollToTop'; +import Routes from './routes/Routes'; + + ReactDOM.render( - - + , document.getElementById('root') diff --git a/web-ui/web-react/src/pages/Menu.js b/web-ui/web-react/src/pages/Menu.js index 379eb986..ba8b834b 100644 --- a/web-ui/web-react/src/pages/Menu.js +++ b/web-ui/web-react/src/pages/Menu.js @@ -6,8 +6,8 @@ const cookies = new Cookies(); class Menu extends Component { cerrarSesion=()=>{ cookies.remove('id', {path: "/"}); - cookies.remove('name', {path: "/"}); cookies.remove('email', {path: "/"}); + cookies.remove('name', {path: "/"}); window.location.href='/'; } diff --git a/web-ui/web-react/src/routes/Routes.js b/web-ui/web-react/src/routes/Routes.js index a9d8860a..90d842a9 100644 --- a/web-ui/web-react/src/routes/Routes.js +++ b/web-ui/web-react/src/routes/Routes.js @@ -1,9 +1,11 @@ import React from 'react'; import {BrowserRouter, Switch, Route} from 'react-router-dom'; +import App from '../App'; import LoginLocalStorage from '../components/LoginLocalStorage'; import Menu from '../pages/Menu'; - function Routes() { + + return ( From e56665ff79ef37c38730cfc3e610f075df1f8823 Mon Sep 17 00:00:00 2001 From: Mariela Date: Tue, 9 Aug 2022 14:29:32 -0600 Subject: [PATCH 06/16] cambios de rutas --- .../src/components/LoginLocalStorage.js | 4 +- web-ui/web-react/src/components/MenuAdmin.js | 310 +++--------------- web-ui/web-react/src/pages/Menu.js | 2 +- web-ui/web-react/src/routes/Routes.js | 5 +- 4 files changed, 47 insertions(+), 274 deletions(-) diff --git a/web-ui/web-react/src/components/LoginLocalStorage.js b/web-ui/web-react/src/components/LoginLocalStorage.js index 6f01c4bc..5e19537d 100644 --- a/web-ui/web-react/src/components/LoginLocalStorage.js +++ b/web-ui/web-react/src/components/LoginLocalStorage.js @@ -53,7 +53,7 @@ class LoginLocalStorage extends Component { cookies.set('name', user.name, { path: "/" }); cookies.set('email', user.email, { path: "/" }); alert(`Bienvenido ${user.name}`); - window.location.href = "./menu"; + window.location.href = "./"; } else { alert('El usuario o la contraseña no son correctos'); } @@ -68,7 +68,7 @@ class LoginLocalStorage extends Component { componentDidMount() { if (cookies.get('email')) { - window.location.href = "./menu"; + window.location.href = "./"; } } diff --git a/web-ui/web-react/src/components/MenuAdmin.js b/web-ui/web-react/src/components/MenuAdmin.js index 5cca9efe..8c429942 100644 --- a/web-ui/web-react/src/components/MenuAdmin.js +++ b/web-ui/web-react/src/components/MenuAdmin.js @@ -1,143 +1,12 @@ import React, { Component } from 'react'; import Cookies from 'universal-cookie'; -import AdministradoresComunidad from './AdministradoresComunidad'; -import AdministradoresSistema from './AdministradoresSistema'; -import Communities from './components/ComunidadViviendas'; +import AdministradoresComunidad from '../components/AdministradoresComunidad'; +import AdministradoresSistema from '../components/AdministradoresSistema'; +import Communities from '../components/ComunidadViviendas'; +import Dashboard from '../templates/Dashboard'; +import { BrowserRouter, Switch, Route } from 'react-router-dom'; +const cookies = new Cookies(); -class MenuAdmin extends Component { - state = { - layoutMode - } - - - -} - -const [layoutMode, setLayoutMode] = useState('static'); -const [layoutColorMode, setLayoutColorMode] = useState('light') -const [inputStyle, setInputStyle] = useState('outlined'); -const [ripple, setRipple] = useState(true); -const [staticMenuInactive, setStaticMenuInactive] = useState(false); -const [overlayMenuActive, setOverlayMenuActive] = useState(false); -const [mobileMenuActive, setMobileMenuActive] = useState(false); -const [mobileTopbarMenuActive, setMobileTopbarMenuActive] = useState(false); -const copyTooltipRef = useRef(); -const location = useLocation(); - -const [cookies, setCookies] = useRef(); - -const handleLogout = () => { - cookies.remove('id', {path: "/"}); - cookies.remove('email', {path: "/"}); - cookies.remove('name', {path: "/"}); - window.location.href='/'; -} - -useEffect(() => { - if(!cookies.get('email')){ - window.location.href="./"; - } -}, []) - - - -PrimeReact.ripple = true; - -let menuClick = false; -let mobileTopbarMenuClick = false; - -useEffect(() => { - if (mobileMenuActive) { - addClass(document.body, "body-overflow-hidden"); - } else { - removeClass(document.body, "body-overflow-hidden"); - } -}, [mobileMenuActive]); - -useEffect(() => { - copyTooltipRef && copyTooltipRef.current && copyTooltipRef.current.updateTargetEvents(); -}, [location]); - -const onInputStyleChange = (inputStyle) => { - setInputStyle(inputStyle); -} - -const onRipple = (e) => { - PrimeReact.ripple = e.value; - setRipple(e.value) -} - -const onLayoutModeChange = (mode) => { - setLayoutMode(mode) -} - -const onColorModeChange = (mode) => { - setLayoutColorMode(mode) -} - -const onWrapperClick = (event) => { - if (!menuClick) { - setOverlayMenuActive(false); - setMobileMenuActive(false); - } - - if (!mobileTopbarMenuClick) { - setMobileTopbarMenuActive(false); - } - - mobileTopbarMenuClick = false; - menuClick = false; -} - -const onToggleMenuClick = (event) => { - menuClick = true; - - if (isDesktop()) { - if (layoutMode === 'overlay') { - if (mobileMenuActive === true) { - setOverlayMenuActive(true); - } - - setOverlayMenuActive((prevState) => !prevState); - setMobileMenuActive(false); - } - else if (layoutMode === 'static') { - setStaticMenuInactive((prevState) => !prevState); - } - } - else { - setMobileMenuActive((prevState) => !prevState); - } - - event.preventDefault(); -} - -const onSidebarClick = () => { - menuClick = true; -} - -const onMobileTopbarMenuClick = (event) => { - mobileTopbarMenuClick = true; - - setMobileTopbarMenuActive((prevState) => !prevState); - event.preventDefault(); -} - -const onMobileSubTopbarMenuClick = (event) => { - mobileTopbarMenuClick = true; - - event.preventDefault(); -} - -const onMenuItemClick = (event) => { - if (!event.item.items) { - setOverlayMenuActive(false); - setMobileMenuActive(false); - } -} -const isDesktop = () => { - return window.innerWidth >= 992; -} const menu = [ { @@ -146,163 +15,66 @@ const menu = [ { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, { label: 'Administradores del sistema', icon: 'pi pi-fw pi-id-card', to: '/administradoresSistema' }, { label: 'Administradores de comunidad', icon: 'pi pi-fw pi-id-card', to: '/administradoresComunidad' }, - { label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad' }, { label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas' }, - { label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos' }, - { label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn' }, { label: 'Log out', icon: 'pi pi-fw pi-id-card', to: '/logOut' } ] }, - { - label: 'UI Components', icon: 'pi pi-fw pi-sitemap', - items: [ - { label: 'Form Layout', icon: 'pi pi-fw pi-id-card', to: '/formlayout' }, - { label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' }, - { label: "Float Label", icon: "pi pi-fw pi-bookmark", to: "/floatlabel" }, - { label: "Invalid State", icon: "pi pi-fw pi-exclamation-circle", to: "invalidstate" }, - { label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' }, - { label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' }, - { label: 'List', icon: 'pi pi-fw pi-list', to: '/list' }, - { label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' }, - { label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' }, - { label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' }, - { label: "Media", icon: "pi pi-fw pi-image", to: "/media" }, - { label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' }, - { label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' }, - { label: 'File', icon: 'pi pi-fw pi-file', to: '/file' }, - { label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' }, - { label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' }, - ] - }, - { - label: 'UI Blocks', - items: [ - { label: 'Free Blocks', icon: 'pi pi-fw pi-eye', to: '/blocks', badge: "NEW" }, - { label: 'All Blocks', icon: 'pi pi-fw pi-globe', url: 'https://www.primefaces.org/primeblocks-react' } - ] - }, - { - label: 'Icons', - items: [ - { label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' } - ] - }, - { - label: 'Pages', icon: 'pi pi-fw pi-clone', - items: [ - { label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' }, - { label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' }, - { label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' } - ] - }, - { - label: 'Menu Hierarchy', icon: 'pi pi-fw pi-search', - items: [ - { - label: 'Submenu 1', icon: 'pi pi-fw pi-bookmark', - items: [ - { - label: 'Submenu 1.1', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' }, - ] - }, - { - label: 'Submenu 1.2', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' } - ] - }, - ] - }, - { - label: 'Submenu 2', icon: 'pi pi-fw pi-bookmark', - items: [ - { - label: 'Submenu 2.1', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' }, - ] - }, - { - label: 'Submenu 2.2', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' } - ] - } - ] - } - ] - } ]; -const addClass = (element, className) => { - if (element.classList) - element.classList.add(className); - else - element.className += ' ' + className; + +const handleLogout = () => { + cookies.remove('id', { path: "/" }); + cookies.remove('email', { path: "/" }); + cookies.remove('name', { path: "/" }); + window.location.href = '/'; } -const removeClass = (element, className) => { - if (element.classList) - element.classList.remove(className); - else - element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); -} +class MenuAdmin extends Component { -const wrapperClass = classNames('layout-wrapper', { - 'layout-overlay': layoutMode === 'overlay', - 'layout-static': layoutMode === 'static', - 'layout-static-sidebar-inactive': staticMenuInactive && layoutMode === 'static', - 'layout-overlay-sidebar-active': overlayMenuActive && layoutMode === 'overlay', - 'layout-mobile-sidebar-active': mobileMenuActive, - 'p-input-filled': inputStyle === 'filled', - 'p-ripple-disabled': ripple === false, - 'layout-theme-light': layoutColorMode === 'light' -}); + state = { + layoutColorMode: 'light', + layoutMode: 'static', -class Menu extends Component { - cerrarSesion=()=>{ - cookies.remove('id', {path: "/"}); - cookies.remove('email', {path: "/"}); - cookies.remove('name', {path: "/"}); - window.location.href='/'; + } + + + cerrarSesion = () => { + cookies.remove('id', { path: "/" }); + cookies.remove('email', { path: "/" }); + cookies.remove('name', { path: "/" }); + window.location.href = '/'; } componentDidMount() { - if(!cookies.get('email')){ - window.location.href="./app"; + if (!cookies.get('email')) { + window.location.href = "./"; } } render() { - console.log('id: '+ cookies.get('id')); - console.log('name: '+cookies.get('name')); - console.log('email: '+cookies.get('email')); + return (
Menu Principal -
-
- - - - - -
+
+ +
+
+
+ } /> + + + +
+ +

- +
); } } -export default Menu; \ No newline at end of file +export default MenuAdmin; \ No newline at end of file diff --git a/web-ui/web-react/src/pages/Menu.js b/web-ui/web-react/src/pages/Menu.js index ba8b834b..f06ce0ad 100644 --- a/web-ui/web-react/src/pages/Menu.js +++ b/web-ui/web-react/src/pages/Menu.js @@ -8,7 +8,7 @@ class Menu extends Component { cookies.remove('id', {path: "/"}); cookies.remove('email', {path: "/"}); cookies.remove('name', {path: "/"}); - window.location.href='/'; + window.location.href='/login'; } componentDidMount() { diff --git a/web-ui/web-react/src/routes/Routes.js b/web-ui/web-react/src/routes/Routes.js index 90d842a9..9af9a965 100644 --- a/web-ui/web-react/src/routes/Routes.js +++ b/web-ui/web-react/src/routes/Routes.js @@ -2,6 +2,7 @@ import React from 'react'; import {BrowserRouter, Switch, Route} from 'react-router-dom'; import App from '../App'; import LoginLocalStorage from '../components/LoginLocalStorage'; +import MenuAdmin from '../components/MenuAdmin'; import Menu from '../pages/Menu'; function Routes() { @@ -9,8 +10,8 @@ function Routes() { return ( - - + + ); From ec0d604e34a151b6433531a0d2e34efb3f976db2 Mon Sep 17 00:00:00 2001 From: Maria Sanchez Date: Tue, 9 Aug 2022 16:03:48 -0600 Subject: [PATCH 07/16] insert react navigation and home component --- mobile-ui/App.js | 123 +---- mobile-ui/components/Home.js | 38 +- mobile-ui/components/LogIn.js | 88 ++++ mobile-ui/components/RecoverPassword.js | 13 + mobile-ui/package-lock.json | 592 ++++++++++++++++++++++++ mobile-ui/package.json | 7 + 6 files changed, 738 insertions(+), 123 deletions(-) create mode 100644 mobile-ui/components/LogIn.js create mode 100644 mobile-ui/components/RecoverPassword.js diff --git a/mobile-ui/App.js b/mobile-ui/App.js index 169933a1..9f43ccee 100644 --- a/mobile-ui/App.js +++ b/mobile-ui/App.js @@ -1,120 +1,27 @@ import React from "react"; import { - Text, - Link, - HStack, - Center, - Heading, - Switch, - useColorMode, - NativeBaseProvider, - extendTheme, - VStack, - Box, - FormControl, - Input, - Button, - Image + NativeBaseProvider } from "native-base"; -import NativeBaseIcon from "./components/NativeBaseIcon"; -import { Platform } from "react-native"; -import logo from "./assets/logo-katoikia.png" - -// Define the config -const config = { - useSystemColorMode: false, - initialColorMode: "dark", -}; - -// extend the theme -export const theme = extendTheme({ config, -colors: { - brown: "#D7A86E" -} }); - -// const logo = require('./assets/logo-katoikia.png') +import { NavigationContainer } from '@react-navigation/native'; +import { createNativeStackNavigator } from '@react-navigation/native-stack'; +import LogIn from "./components/LogIn"; +import Home from "./components/Home"; +import RecoverPassword from "./components/RecoverPassword"; +const Stack = createNativeStackNavigator(); export default function App() { return ( -
- - Katoikia logo - - Bienvenido a Katoikia - - - Su app de comunidad de confianza - - - - - Correo Electrónico - - - - Contraseña - - - Recuperar contraseña - - - - - - - -
+ + + + + + +
); -} - -// Color Switch Component -function ToggleDarkMode() { - const { colorMode, toggleColorMode } = useColorMode(); - return ( - - Dark - - Light - - ); -} +} \ No newline at end of file diff --git a/mobile-ui/components/Home.js b/mobile-ui/components/Home.js index cce81831..04070bb0 100644 --- a/mobile-ui/components/Home.js +++ b/mobile-ui/components/Home.js @@ -1,28 +1,36 @@ import React from "react"; import { Text, - Link, HStack, - Center, - Heading, - Switch, - useColorMode, NativeBaseProvider, - extendTheme, - VStack, + IconButton, Box, - FormControl, - Input, - Button, - Image + StatusBar, + Icon, + MaterialIcons, + Center } from "native-base"; export default function Home(){ return ( - - - - +
+ + + + + } /> + + Home + + + + } /> + } /> + } /> + + +
+ ) } \ No newline at end of file diff --git a/mobile-ui/components/LogIn.js b/mobile-ui/components/LogIn.js new file mode 100644 index 00000000..ed542d83 --- /dev/null +++ b/mobile-ui/components/LogIn.js @@ -0,0 +1,88 @@ +import React from "react"; +import { + Text, + Link, + HStack, + Center, + Heading, + Switch, + useColorMode, + NativeBaseProvider, + extendTheme, + VStack, + Box, + FormControl, + Input, + Button, + Image +} from "native-base"; +import logo from "../assets/logo-katoikia.png"; + + +export default function LogIn({navigation}) { + return ( + + +
+ + Katoikia logo + + + Bienvenido a Katoikia + + + Su app de comunidad de confianza + + + + + Correo Electrónico + + + + Contraseña + + navigation.navigate('Password')} + > + Recuperar contraseña + + + + + + + +
+ + + ); +} \ No newline at end of file diff --git a/mobile-ui/components/RecoverPassword.js b/mobile-ui/components/RecoverPassword.js new file mode 100644 index 00000000..62dce460 --- /dev/null +++ b/mobile-ui/components/RecoverPassword.js @@ -0,0 +1,13 @@ +import { Center } from "native-base"; +import React from "react"; + +export default function RecoverPassword () { + +return ( + +
+ + +
+) +} \ No newline at end of file diff --git a/mobile-ui/package-lock.json b/mobile-ui/package-lock.json index 51face23..860e1166 100644 --- a/mobile-ui/package-lock.json +++ b/mobile-ui/package-lock.json @@ -9,13 +9,20 @@ "version": "1.0.0", "license": "MIT", "dependencies": { + "@react-native-community/masked-view": "^0.1.11", + "@react-navigation/native": "^6.0.11", + "@react-navigation/native-stack": "^6.7.0", + "@react-navigation/stack": "^6.2.2", "expo": "^44.0.0", "expo-status-bar": "~1.2.0", "native-base": "3.4.0", "react": "17.0.1", "react-dom": "17.0.1", "react-native": "0.64.3", + "react-native-gesture-handler": "~2.1.0", + "react-native-reanimated": "~2.3.1", "react-native-safe-area-context": "3.3.2", + "react-native-screens": "~3.10.1", "react-native-svg": "12.1.1", "react-native-web": "0.17.1" }, @@ -1810,6 +1817,17 @@ "node": ">=0.1.95" } }, + "node_modules/@egjs/hammerjs": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", + "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==", + "dependencies": { + "@types/hammerjs": "^2.0.36" + }, + "engines": { + "node": ">=0.8.0" + } + }, "node_modules/@expo/config": { "version": "6.0.6", "resolved": "https://registry.npmjs.org/@expo/config/-/config-6.0.6.tgz", @@ -3490,6 +3508,16 @@ "node": ">= 4.0.0" } }, + "node_modules/@react-native-community/masked-view": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.11.tgz", + "integrity": "sha512-rQfMIGSR/1r/SyN87+VD8xHHzDYeHaJq6elOSCAD+0iLagXkSI2pfA0LmSXP21uw5i3em7GkkRjfJ8wpqWXZNw==", + "deprecated": "Repository was moved to @react-native-masked-view/masked-view", + "peerDependencies": { + "react": ">=16.0", + "react-native": ">=0.57" + } + }, "node_modules/@react-native/assets": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz", @@ -3505,6 +3533,116 @@ "resolved": "https://registry.npmjs.org/@react-native/polyfills/-/polyfills-1.0.0.tgz", "integrity": "sha512-0jbp4RxjYopTsIdLl+/Fy2TiwVYHy4mgeu07DG4b/LyM0OS/+lPP5c9sbnt/AMlnF6qz2JRZpPpGw1eMNS6A4w==" }, + "node_modules/@react-navigation/core": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.2.2.tgz", + "integrity": "sha512-gEJ1gRqt1EIqRrnJIpSQ0wWJRue9maAQNKYrlQ0a/LSKErF3g6w+sD2wW4Bbb1yj88pGhKeuI4wdB9MVK766Pg==", + "dependencies": { + "@react-navigation/routers": "^6.1.1", + "escape-string-regexp": "^4.0.0", + "nanoid": "^3.1.23", + "query-string": "^7.0.0", + "react-is": "^16.13.0" + }, + "peerDependencies": { + "react": "*" + } + }, + "node_modules/@react-navigation/core/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-navigation/core/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, + "node_modules/@react-navigation/elements": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-1.3.4.tgz", + "integrity": "sha512-O0jICpjn3jskVo4yiWzZozmj7DZy1ZBbn3O7dbenuUjZSj/cscjwaapmZZFGcI/IMmjmx8UTKsybhCFEIbGf3g==", + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-safe-area-context": ">= 3.0.0" + } + }, + "node_modules/@react-navigation/native": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-6.0.11.tgz", + "integrity": "sha512-z0YTB7Czdb9SNjxfzcFNB3Vym0qmUcxpiYGOOXX8PH0s+xlIs/w+2RVp6YAvAC48A30o7MMCYqy5OeR6lrtWHg==", + "dependencies": { + "@react-navigation/core": "^6.2.2", + "escape-string-regexp": "^4.0.0", + "fast-deep-equal": "^3.1.3", + "nanoid": "^3.1.23" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, + "node_modules/@react-navigation/native-stack": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.7.0.tgz", + "integrity": "sha512-03CuSwbBvP9+iXgjrTRRw+aog+KZXbhPzqCWVExzIWNOzf5/PJEcdtlm9KDrx2aHHDtDA6LRLKQA4UIlJOmNzA==", + "dependencies": { + "@react-navigation/elements": "^1.3.4", + "warn-once": "^0.1.0" + }, + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-safe-area-context": ">= 3.0.0", + "react-native-screens": ">= 3.0.0" + } + }, + "node_modules/@react-navigation/native/node_modules/escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@react-navigation/routers": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-6.1.1.tgz", + "integrity": "sha512-mWWj2yh4na/OBaE7bWrft4kdAtxnG8MlV6ph3Bi6tHqgcnxENX+dnQY6y0qg/6E7cmMlaJg5nAC5y4Enr5ir8A==", + "dependencies": { + "nanoid": "^3.1.23" + } + }, + "node_modules/@react-navigation/stack": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-6.2.2.tgz", + "integrity": "sha512-P9ZfmluOXNmbs7YdG1UWS1fAh87Yse9aX8TgqOz4FlHEm5q7g5eaM35QgWByt+wif3UiqE40D8wXpqRQvMgPWg==", + "dependencies": { + "@react-navigation/elements": "^1.3.4", + "color": "^4.2.3", + "warn-once": "^0.1.0" + }, + "peerDependencies": { + "@react-navigation/native": "^6.0.0", + "react": "*", + "react-native": "*", + "react-native-gesture-handler": ">= 1.0.0", + "react-native-safe-area-context": ">= 3.0.0", + "react-native-screens": ">= 3.0.0" + } + }, "node_modules/@react-stately/checkbox": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@react-stately/checkbox/-/checkbox-3.2.0.tgz", @@ -3947,6 +4085,16 @@ "@types/node": "*" } }, + "node_modules/@types/hammerjs": { + "version": "2.0.41", + "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.41.tgz", + "integrity": "sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA==" + }, + "node_modules/@types/invariant": { + "version": "2.2.35", + "resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.35.tgz", + "integrity": "sha512-DxX1V9P8zdJPYQat1gHyY0xj3efl8gnMVjiM9iCY6y27lj+PoQWkgjt8jDqmovPqULkKVpKRg8J36iQiA+EtEg==" + }, "node_modules/@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -4843,6 +4991,18 @@ "node": ">=0.10.0" } }, + "node_modules/color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "dependencies": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "engines": { + "node": ">=12.5.0" + } + }, "node_modules/color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -4856,6 +5016,31 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, + "node_modules/color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "dependencies": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, + "node_modules/color/node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color/node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + }, "node_modules/colorette": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", @@ -5860,6 +6045,11 @@ "node": ">=0.10.0" } }, + "node_modules/fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, "node_modules/fast-glob": { "version": "3.2.11", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", @@ -5929,6 +6119,14 @@ "node": ">=8" } }, + "node_modules/filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==", + "engines": { + "node": ">=0.10.0" + } + }, "node_modules/finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -6306,6 +6504,19 @@ "node": ">=8" } }, + "node_modules/hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "dependencies": { + "react-is": "^16.7.0" + } + }, + "node_modules/hoist-non-react-statics/node_modules/react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + }, "node_modules/http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -7960,6 +8171,11 @@ "mkdirp": "bin/cmd.js" } }, + "node_modules/mockdate": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.5.tgz", + "integrity": "sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ==" + }, "node_modules/ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -7975,6 +8191,17 @@ "thenify-all": "^1.0.0" } }, + "node_modules/nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, "node_modules/nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -8749,6 +8976,23 @@ "once": "^1.3.1" } }, + "node_modules/query-string": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz", + "integrity": "sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==", + "dependencies": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + }, + "engines": { + "node": ">=6" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, "node_modules/querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -8835,6 +9079,17 @@ "react": "17.0.1" } }, + "node_modules/react-freeze": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.3.tgz", + "integrity": "sha512-ZnXwLQnGzrDpHBHiC56TXFXvmolPeMjTn1UOm610M4EXGzbEDR7oOIyS2ZiItgbs6eZc4oU/a0hpk8PrcKvv5g==", + "engines": { + "node": ">=10" + }, + "peerDependencies": { + "react": ">=17.0.0" + } + }, "node_modules/react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -8898,6 +9153,18 @@ "nullthrows": "^1.1.1" } }, + "node_modules/react-native-gesture-handler": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.1.3.tgz", + "integrity": "sha512-y5W2MVB+J6vjIT/mUidDv0BqVRbWXn0cP7R2o6fsSYsHh9M0btT979+bCI7nPuhmRHjkhg5xCm4HNMIH0IQO4w==", + "dependencies": { + "@egjs/hammerjs": "^2.0.17", + "hoist-non-react-statics": "^3.3.0", + "invariant": "^2.2.4", + "lodash": "^4.17.21", + "prop-types": "^15.7.2" + } + }, "node_modules/react-native-iphone-x-helper": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz", @@ -8918,6 +9185,25 @@ "react-native": ">=0.48.4" } }, + "node_modules/react-native-reanimated": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-2.3.3.tgz", + "integrity": "sha512-uQofwsWUoKLY4QDgSdNbRxnqQDaQEPLLBNO9SP64JfQ2fDRJD5rjb4d3S29F0z9FqTnsWEwTL2Sl0spdx9xvHA==", + "dependencies": { + "@babel/plugin-transform-object-assign": "^7.10.4", + "@types/invariant": "^2.2.35", + "invariant": "^2.2.4", + "lodash.isequal": "^4.5.0", + "mockdate": "^3.0.2", + "react-native-screens": "^3.4.0", + "string-hash-64": "^1.0.3" + }, + "peerDependencies": { + "react": "*", + "react-native": "*", + "react-native-gesture-handler": "*" + } + }, "node_modules/react-native-safe-area-context": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-3.3.2.tgz", @@ -8927,6 +9213,19 @@ "react-native": "*" } }, + "node_modules/react-native-screens": { + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.10.2.tgz", + "integrity": "sha512-bMKSpwMeqAoXBqTJiDEG1ogM1cMk66sEmpp/4dGqdX59v+OwMqPeTuBk37qaSuS7gPOFFKsNW2X3ymGvBT4iEw==", + "dependencies": { + "react-freeze": "^1.0.0", + "warn-once": "^0.1.0" + }, + "peerDependencies": { + "react": "*", + "react-native": "*" + } + }, "node_modules/react-native-svg": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.1.1.tgz", @@ -9690,6 +9989,19 @@ "plist": "^3.0.5" } }, + "node_modules/simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "dependencies": { + "is-arrayish": "^0.3.1" + } + }, + "node_modules/simple-swizzle/node_modules/is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + }, "node_modules/sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -9948,6 +10260,14 @@ "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==", "deprecated": "See https://github.com/lydell/source-map-url#deprecated" }, + "node_modules/split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==", + "engines": { + "node": ">=6" + } + }, "node_modules/split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -10089,6 +10409,14 @@ "node": ">= 0.10.0" } }, + "node_modules/strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==", + "engines": { + "node": ">=4" + } + }, "node_modules/string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -10097,6 +10425,11 @@ "safe-buffer": "~5.1.0" } }, + "node_modules/string-hash-64": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string-hash-64/-/string-hash-64-1.0.3.tgz", + "integrity": "sha512-D5OKWKvDhyVWWn2x5Y9b+37NUllks34q1dCDhk/vYcso9fmhs+Tl3KR/gE4v5UNj2UA35cnX4KdVVGkG1deKqw==" + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -10643,6 +10976,11 @@ "makeerror": "1.0.12" } }, + "node_modules/warn-once": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.1.tgz", + "integrity": "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q==" + }, "node_modules/wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", @@ -12132,6 +12470,14 @@ "minimist": "^1.2.0" } }, + "@egjs/hammerjs": { + "version": "2.0.17", + "resolved": "https://registry.npmjs.org/@egjs/hammerjs/-/hammerjs-2.0.17.tgz", + "integrity": "sha512-XQsZgjm2EcVUiZQf11UBJQfmZeEmOW8DpI1gsFeln6w0ae0ii4dMQEQ0kjl6DspdWX1aGY1/loyXnP0JS06e/A==", + "requires": { + "@types/hammerjs": "^2.0.36" + } + }, "@expo/config": { "version": "6.0.6", "resolved": "https://registry.npmjs.org/@expo/config/-/config-6.0.6.tgz", @@ -13485,6 +13831,12 @@ "ora": "^3.4.0" } }, + "@react-native-community/masked-view": { + "version": "0.1.11", + "resolved": "https://registry.npmjs.org/@react-native-community/masked-view/-/masked-view-0.1.11.tgz", + "integrity": "sha512-rQfMIGSR/1r/SyN87+VD8xHHzDYeHaJq6elOSCAD+0iLagXkSI2pfA0LmSXP21uw5i3em7GkkRjfJ8wpqWXZNw==", + "requires": {} + }, "@react-native/assets": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/@react-native/assets/-/assets-1.0.0.tgz", @@ -13500,6 +13852,81 @@ "resolved": "https://registry.npmjs.org/@react-native/polyfills/-/polyfills-1.0.0.tgz", "integrity": "sha512-0jbp4RxjYopTsIdLl+/Fy2TiwVYHy4mgeu07DG4b/LyM0OS/+lPP5c9sbnt/AMlnF6qz2JRZpPpGw1eMNS6A4w==" }, + "@react-navigation/core": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@react-navigation/core/-/core-6.2.2.tgz", + "integrity": "sha512-gEJ1gRqt1EIqRrnJIpSQ0wWJRue9maAQNKYrlQ0a/LSKErF3g6w+sD2wW4Bbb1yj88pGhKeuI4wdB9MVK766Pg==", + "requires": { + "@react-navigation/routers": "^6.1.1", + "escape-string-regexp": "^4.0.0", + "nanoid": "^3.1.23", + "query-string": "^7.0.0", + "react-is": "^16.13.0" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + }, + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } + } + }, + "@react-navigation/elements": { + "version": "1.3.4", + "resolved": "https://registry.npmjs.org/@react-navigation/elements/-/elements-1.3.4.tgz", + "integrity": "sha512-O0jICpjn3jskVo4yiWzZozmj7DZy1ZBbn3O7dbenuUjZSj/cscjwaapmZZFGcI/IMmjmx8UTKsybhCFEIbGf3g==", + "requires": {} + }, + "@react-navigation/native": { + "version": "6.0.11", + "resolved": "https://registry.npmjs.org/@react-navigation/native/-/native-6.0.11.tgz", + "integrity": "sha512-z0YTB7Czdb9SNjxfzcFNB3Vym0qmUcxpiYGOOXX8PH0s+xlIs/w+2RVp6YAvAC48A30o7MMCYqy5OeR6lrtWHg==", + "requires": { + "@react-navigation/core": "^6.2.2", + "escape-string-regexp": "^4.0.0", + "fast-deep-equal": "^3.1.3", + "nanoid": "^3.1.23" + }, + "dependencies": { + "escape-string-regexp": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", + "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==" + } + } + }, + "@react-navigation/native-stack": { + "version": "6.7.0", + "resolved": "https://registry.npmjs.org/@react-navigation/native-stack/-/native-stack-6.7.0.tgz", + "integrity": "sha512-03CuSwbBvP9+iXgjrTRRw+aog+KZXbhPzqCWVExzIWNOzf5/PJEcdtlm9KDrx2aHHDtDA6LRLKQA4UIlJOmNzA==", + "requires": { + "@react-navigation/elements": "^1.3.4", + "warn-once": "^0.1.0" + } + }, + "@react-navigation/routers": { + "version": "6.1.1", + "resolved": "https://registry.npmjs.org/@react-navigation/routers/-/routers-6.1.1.tgz", + "integrity": "sha512-mWWj2yh4na/OBaE7bWrft4kdAtxnG8MlV6ph3Bi6tHqgcnxENX+dnQY6y0qg/6E7cmMlaJg5nAC5y4Enr5ir8A==", + "requires": { + "nanoid": "^3.1.23" + } + }, + "@react-navigation/stack": { + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/@react-navigation/stack/-/stack-6.2.2.tgz", + "integrity": "sha512-P9ZfmluOXNmbs7YdG1UWS1fAh87Yse9aX8TgqOz4FlHEm5q7g5eaM35QgWByt+wif3UiqE40D8wXpqRQvMgPWg==", + "requires": { + "@react-navigation/elements": "^1.3.4", + "color": "^4.2.3", + "warn-once": "^0.1.0" + } + }, "@react-stately/checkbox": { "version": "3.2.0", "resolved": "https://registry.npmjs.org/@react-stately/checkbox/-/checkbox-3.2.0.tgz", @@ -13846,6 +14273,16 @@ "@types/node": "*" } }, + "@types/hammerjs": { + "version": "2.0.41", + "resolved": "https://registry.npmjs.org/@types/hammerjs/-/hammerjs-2.0.41.tgz", + "integrity": "sha512-ewXv/ceBaJprikMcxCmWU1FKyMAQ2X7a9Gtmzw8fcg2kIePI1crERDM818W+XYrxqdBBOdlf2rm137bU+BltCA==" + }, + "@types/invariant": { + "version": "2.2.35", + "resolved": "https://registry.npmjs.org/@types/invariant/-/invariant-2.2.35.tgz", + "integrity": "sha512-DxX1V9P8zdJPYQat1gHyY0xj3efl8gnMVjiM9iCY6y27lj+PoQWkgjt8jDqmovPqULkKVpKRg8J36iQiA+EtEg==" + }, "@types/istanbul-lib-coverage": { "version": "2.0.4", "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz", @@ -14551,6 +14988,30 @@ "object-visit": "^1.0.0" } }, + "color": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/color/-/color-4.2.3.tgz", + "integrity": "sha512-1rXeuUUiGGrykh+CeBdu5Ie7OJwinCgQY0bc7GCRxy5xVHy+moaqkpL/jqQq0MtQOeYcrqEz4abc5f0KtU7W4A==", + "requires": { + "color-convert": "^2.0.1", + "color-string": "^1.9.0" + }, + "dependencies": { + "color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "requires": { + "color-name": "~1.1.4" + } + }, + "color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==" + } + } + }, "color-convert": { "version": "1.9.3", "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", @@ -14564,6 +15025,15 @@ "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==" }, + "color-string": { + "version": "1.9.1", + "resolved": "https://registry.npmjs.org/color-string/-/color-string-1.9.1.tgz", + "integrity": "sha512-shrVawQFojnZv6xM40anx4CkoDP+fZsw/ZerEMsW/pyzsRbElpsL/DBVW7q3ExxwusdNXI3lXpuhEZkzs8p5Eg==", + "requires": { + "color-name": "^1.0.0", + "simple-swizzle": "^0.2.2" + } + }, "colorette": { "version": "1.4.0", "resolved": "https://registry.npmjs.org/colorette/-/colorette-1.4.0.tgz", @@ -15360,6 +15830,11 @@ } } }, + "fast-deep-equal": { + "version": "3.1.3", + "resolved": "https://registry.npmjs.org/fast-deep-equal/-/fast-deep-equal-3.1.3.tgz", + "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==" + }, "fast-glob": { "version": "3.2.11", "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.2.11.tgz", @@ -15423,6 +15898,11 @@ "to-regex-range": "^5.0.1" } }, + "filter-obj": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/filter-obj/-/filter-obj-1.1.0.tgz", + "integrity": "sha512-8rXg1ZnX7xzy2NGDVkBVaAy+lSlPNwad13BtgSlLuxfIslyt5Vg64U7tFcCt4WS1R0hvtnQybT/IyCkGZ3DpXQ==" + }, "finalhandler": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/finalhandler/-/finalhandler-1.1.2.tgz", @@ -15704,6 +16184,21 @@ "source-map": "^0.7.3" } }, + "hoist-non-react-statics": { + "version": "3.3.2", + "resolved": "https://registry.npmjs.org/hoist-non-react-statics/-/hoist-non-react-statics-3.3.2.tgz", + "integrity": "sha512-/gGivxi8JPKWNm/W0jSmzcMPpfpPLc3dY/6GxhX2hQ9iGj3aDfklV4ET7NjKpSinLpJ5vafa9iiGIEZg10SfBw==", + "requires": { + "react-is": "^16.7.0" + }, + "dependencies": { + "react-is": { + "version": "16.13.1", + "resolved": "https://registry.npmjs.org/react-is/-/react-is-16.13.1.tgz", + "integrity": "sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==" + } + } + }, "http-errors": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/http-errors/-/http-errors-2.0.0.tgz", @@ -17044,6 +17539,11 @@ "minimist": "^1.2.6" } }, + "mockdate": { + "version": "3.0.5", + "resolved": "https://registry.npmjs.org/mockdate/-/mockdate-3.0.5.tgz", + "integrity": "sha512-iniQP4rj1FhBdBYS/+eQv7j1tadJ9lJtdzgOpvsOHng/GbcDh2Fhdeq+ZRldrPYdXvCyfFUmFeEwEGXZB5I/AQ==" + }, "ms": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", @@ -17059,6 +17559,11 @@ "thenify-all": "^1.0.0" } }, + "nanoid": { + "version": "3.3.4", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz", + "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw==" + }, "nanomatch": { "version": "1.2.13", "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz", @@ -17645,6 +18150,17 @@ "once": "^1.3.1" } }, + "query-string": { + "version": "7.1.1", + "resolved": "https://registry.npmjs.org/query-string/-/query-string-7.1.1.tgz", + "integrity": "sha512-MplouLRDHBZSG9z7fpuAAcI7aAYjDLhtsiVZsevsfaHWDS2IDdORKbSd1kWUA+V4zyva/HZoSfpwnYMMQDhb0w==", + "requires": { + "decode-uri-component": "^0.2.0", + "filter-obj": "^1.1.0", + "split-on-first": "^1.0.0", + "strict-uri-encode": "^2.0.0" + } + }, "querystringify": { "version": "2.2.0", "resolved": "https://registry.npmjs.org/querystringify/-/querystringify-2.2.0.tgz", @@ -17696,6 +18212,12 @@ "scheduler": "^0.20.1" } }, + "react-freeze": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/react-freeze/-/react-freeze-1.0.3.tgz", + "integrity": "sha512-ZnXwLQnGzrDpHBHiC56TXFXvmolPeMjTn1UOm610M4EXGzbEDR7oOIyS2ZiItgbs6eZc4oU/a0hpk8PrcKvv5g==", + "requires": {} + }, "react-is": { "version": "17.0.2", "resolved": "https://registry.npmjs.org/react-is/-/react-is-17.0.2.tgz", @@ -17765,6 +18287,18 @@ "nullthrows": "^1.1.1" } }, + "react-native-gesture-handler": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/react-native-gesture-handler/-/react-native-gesture-handler-2.1.3.tgz", + "integrity": "sha512-y5W2MVB+J6vjIT/mUidDv0BqVRbWXn0cP7R2o6fsSYsHh9M0btT979+bCI7nPuhmRHjkhg5xCm4HNMIH0IQO4w==", + "requires": { + "@egjs/hammerjs": "^2.0.17", + "hoist-non-react-statics": "^3.3.0", + "invariant": "^2.2.4", + "lodash": "^4.17.21", + "prop-types": "^15.7.2" + } + }, "react-native-iphone-x-helper": { "version": "1.3.1", "resolved": "https://registry.npmjs.org/react-native-iphone-x-helper/-/react-native-iphone-x-helper-1.3.1.tgz", @@ -17780,12 +18314,35 @@ "react-native-iphone-x-helper": "^1.0.3" } }, + "react-native-reanimated": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/react-native-reanimated/-/react-native-reanimated-2.3.3.tgz", + "integrity": "sha512-uQofwsWUoKLY4QDgSdNbRxnqQDaQEPLLBNO9SP64JfQ2fDRJD5rjb4d3S29F0z9FqTnsWEwTL2Sl0spdx9xvHA==", + "requires": { + "@babel/plugin-transform-object-assign": "^7.10.4", + "@types/invariant": "^2.2.35", + "invariant": "^2.2.4", + "lodash.isequal": "^4.5.0", + "mockdate": "^3.0.2", + "react-native-screens": "^3.4.0", + "string-hash-64": "^1.0.3" + } + }, "react-native-safe-area-context": { "version": "3.3.2", "resolved": "https://registry.npmjs.org/react-native-safe-area-context/-/react-native-safe-area-context-3.3.2.tgz", "integrity": "sha512-yOwiiPJ1rk+/nfK13eafbpW6sKW0jOnsRem2C1LPJjM3tfTof6hlvV5eWHATye3XOpu2cJ7N+HdkUvUDGwFD2Q==", "requires": {} }, + "react-native-screens": { + "version": "3.10.2", + "resolved": "https://registry.npmjs.org/react-native-screens/-/react-native-screens-3.10.2.tgz", + "integrity": "sha512-bMKSpwMeqAoXBqTJiDEG1ogM1cMk66sEmpp/4dGqdX59v+OwMqPeTuBk37qaSuS7gPOFFKsNW2X3ymGvBT4iEw==", + "requires": { + "react-freeze": "^1.0.0", + "warn-once": "^0.1.0" + } + }, "react-native-svg": { "version": "12.1.1", "resolved": "https://registry.npmjs.org/react-native-svg/-/react-native-svg-12.1.1.tgz", @@ -18384,6 +18941,21 @@ "plist": "^3.0.5" } }, + "simple-swizzle": { + "version": "0.2.2", + "resolved": "https://registry.npmjs.org/simple-swizzle/-/simple-swizzle-0.2.2.tgz", + "integrity": "sha512-JA//kQgZtbuY83m+xT+tXJkmJncGMTFT+C+g2h2R9uxkYIrE2yy9sgmcLhCnw57/WSD+Eh3J97FPEDFnbXnDUg==", + "requires": { + "is-arrayish": "^0.3.1" + }, + "dependencies": { + "is-arrayish": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/is-arrayish/-/is-arrayish-0.3.2.tgz", + "integrity": "sha512-eVRqCvVlZbuw3GrM63ovNSNAeA1K16kaR/LRY/92w0zxQ5/1YzwblUX652i4Xs9RwAGjW9d9y6X88t8OaAJfWQ==" + } + } + }, "sisteransi": { "version": "1.0.5", "resolved": "https://registry.npmjs.org/sisteransi/-/sisteransi-1.0.5.tgz", @@ -18592,6 +19164,11 @@ "resolved": "https://registry.npmjs.org/source-map-url/-/source-map-url-0.4.1.tgz", "integrity": "sha512-cPiFOTLUKvJFIg4SKVScy4ilPPW6rFgMgfuZJPNoDuMs3nC1HbMUycBoJw77xFIp6z1UJQJOfx6C9GMH80DiTw==" }, + "split-on-first": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/split-on-first/-/split-on-first-1.1.0.tgz", + "integrity": "sha512-43ZssAJaMusuKWL8sKUBQXHWOpq8d6CfN/u1p4gUzfJkM05C8rxTmYrkIPTXapZpORA6LkkzcUulJ8FqA7Uudw==" + }, "split-string": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/split-string/-/split-string-3.1.0.tgz", @@ -18703,6 +19280,11 @@ "resolved": "https://registry.npmjs.org/stream-buffers/-/stream-buffers-2.2.0.tgz", "integrity": "sha512-uyQK/mx5QjHun80FLJTfaWE7JtwfRMKBLkMne6udYOmvH0CawotVa7TfgYHzAnpphn4+TweIx1QKMnRIbipmUg==" }, + "strict-uri-encode": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/strict-uri-encode/-/strict-uri-encode-2.0.0.tgz", + "integrity": "sha512-QwiXZgpRcKkhTj2Scnn++4PKtWsH0kpzZ62L2R6c/LUVYv7hVnZqcg2+sMuT6R7Jusu1vviK/MFsu6kNJfWlEQ==" + }, "string_decoder": { "version": "1.1.1", "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.1.1.tgz", @@ -18711,6 +19293,11 @@ "safe-buffer": "~5.1.0" } }, + "string-hash-64": { + "version": "1.0.3", + "resolved": "https://registry.npmjs.org/string-hash-64/-/string-hash-64-1.0.3.tgz", + "integrity": "sha512-D5OKWKvDhyVWWn2x5Y9b+37NUllks34q1dCDhk/vYcso9fmhs+Tl3KR/gE4v5UNj2UA35cnX4KdVVGkG1deKqw==" + }, "string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -19111,6 +19698,11 @@ "makeerror": "1.0.12" } }, + "warn-once": { + "version": "0.1.1", + "resolved": "https://registry.npmjs.org/warn-once/-/warn-once-0.1.1.tgz", + "integrity": "sha512-VkQZJbO8zVImzYFteBXvBOZEl1qL175WH8VmZcxF2fZAoudNhNDvHi+doCaAEdU2l2vtcIwa2zn0QK5+I1HQ3Q==" + }, "wcwidth": { "version": "1.0.1", "resolved": "https://registry.npmjs.org/wcwidth/-/wcwidth-1.0.1.tgz", diff --git a/mobile-ui/package.json b/mobile-ui/package.json index beda4bbf..7b717cc6 100644 --- a/mobile-ui/package.json +++ b/mobile-ui/package.json @@ -17,13 +17,20 @@ "eject": "expo eject" }, "dependencies": { + "@react-native-community/masked-view": "^0.1.11", + "@react-navigation/native": "^6.0.11", + "@react-navigation/native-stack": "^6.7.0", + "@react-navigation/stack": "^6.2.2", "expo": "^44.0.0", "expo-status-bar": "~1.2.0", "native-base": "3.4.0", "react": "17.0.1", "react-dom": "17.0.1", "react-native": "0.64.3", + "react-native-gesture-handler": "~2.1.0", + "react-native-reanimated": "~2.3.1", "react-native-safe-area-context": "3.3.2", + "react-native-screens": "~3.10.1", "react-native-svg": "12.1.1", "react-native-web": "0.17.1" }, From e059363d53f4c5f832a2e715b9ef027a90a947be Mon Sep 17 00:00:00 2001 From: Mariela Date: Tue, 9 Aug 2022 17:04:40 -0600 Subject: [PATCH 08/16] =?UTF-8?q?segunda=20forma=20de=20inicio=20de=20sesi?= =?UTF-8?q?=C3=B3n,=20realizad?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/components/LoginLocalStorage.js | 6 +- web-ui/web-react/src/components/MenuAdmin.js | 57 ++++++++++++------- web-ui/web-react/src/pages/Menu.js | 2 +- web-ui/web-react/src/routes/Routes.js | 2 +- 4 files changed, 42 insertions(+), 25 deletions(-) diff --git a/web-ui/web-react/src/components/LoginLocalStorage.js b/web-ui/web-react/src/components/LoginLocalStorage.js index 5e19537d..2fe0332f 100644 --- a/web-ui/web-react/src/components/LoginLocalStorage.js +++ b/web-ui/web-react/src/components/LoginLocalStorage.js @@ -53,7 +53,7 @@ class LoginLocalStorage extends Component { cookies.set('name', user.name, { path: "/" }); cookies.set('email', user.email, { path: "/" }); alert(`Bienvenido ${user.name}`); - window.location.href = "./"; + window.location.href = "/"; } else { alert('El usuario o la contraseña no son correctos'); } @@ -68,7 +68,7 @@ class LoginLocalStorage extends Component { componentDidMount() { if (cookies.get('email')) { - window.location.href = "./"; + window.location.href = "/"; } } @@ -106,7 +106,7 @@ class LoginLocalStorage extends Component {
{ - cookies.remove('id', { path: "/" }); - cookies.remove('email', { path: "/" }); - cookies.remove('name', { path: "/" }); - window.location.href = '/'; -} - class MenuAdmin extends Component { - state = { - layoutColorMode: 'light', - layoutMode: 'static', + constructor(){ + super() + this.state = { + layoutColorMode: 'light', + layoutMode: 'static', + menuClick: false, + mobileTopbarMenuClick: false, + overlayMenuActive: false, + mobileMenuActive: false + } + + } + + onSidebarClick = () => { + this.setState({ + menuClick: true + }) } + onMenuItemClick = (event) => { + if (!event.item.items) { + this.state.overlayMenuActive = false; + this.state.mobileMenuActive = false; + this.setState({ + overlayMenuActive: true, + mobileMenuActive:false + }) + + } + } cerrarSesion = () => { cookies.remove('id', { path: "/" }); cookies.remove('email', { path: "/" }); cookies.remove('name', { path: "/" }); - window.location.href = '/'; + window.location.href = '/login'; } componentDidMount() { if (!cookies.get('email')) { - window.location.href = "./"; - } + window.location.href = "/login"; + } } render() { @@ -56,8 +73,10 @@ class MenuAdmin extends Component { return (
Menu Principal -
- +
+ + +
@@ -66,12 +85,10 @@ class MenuAdmin extends Component { -

-
); } diff --git a/web-ui/web-react/src/pages/Menu.js b/web-ui/web-react/src/pages/Menu.js index f06ce0ad..88758bdf 100644 --- a/web-ui/web-react/src/pages/Menu.js +++ b/web-ui/web-react/src/pages/Menu.js @@ -13,7 +13,7 @@ class Menu extends Component { componentDidMount() { if(!cookies.get('email')){ - window.location.href="./"; + window.location.href="./login"; } } diff --git a/web-ui/web-react/src/routes/Routes.js b/web-ui/web-react/src/routes/Routes.js index 9af9a965..bebacd7b 100644 --- a/web-ui/web-react/src/routes/Routes.js +++ b/web-ui/web-react/src/routes/Routes.js @@ -11,7 +11,7 @@ function Routes() { - + ); From 48f5c58f4a4025a122401581c58ed4ce2b5341fa Mon Sep 17 00:00:00 2001 From: Mariela Date: Thu, 11 Aug 2022 00:55:45 -0600 Subject: [PATCH 09/16] login for user type --- web-ui/web-react/src/App.js | 183 ++++++++++-------- web-ui/web-react/src/AppMenu.js | 5 +- web-ui/web-react/src/AppTopbar.js | 13 ++ .../src/components/LoginLocalStorage.js | 4 + web-ui/web-react/src/components/MenuAdmin.js | 5 + .../src/components/MenuAdminCommunity.js | 119 ++++++++++++ web-ui/web-react/src/index.js | 4 +- web-ui/web-react/src/routes/Routes.js | 29 ++- 8 files changed, 273 insertions(+), 89 deletions(-) create mode 100644 web-ui/web-react/src/components/MenuAdminCommunity.js diff --git a/web-ui/web-react/src/App.js b/web-ui/web-react/src/App.js index 349d6c11..b7c804b0 100644 --- a/web-ui/web-react/src/App.js +++ b/web-ui/web-react/src/App.js @@ -1,6 +1,6 @@ import React, { useState, useEffect, useRef } from 'react'; import classNames from 'classnames'; -import { Route, useLocation } from 'react-router-dom'; +import { BrowserRouter, Switch, Route, useLocation } from 'react-router-dom'; import { CSSTransition } from 'react-transition-group'; import { AppTopbar } from './AppTopbar'; @@ -50,6 +50,10 @@ import './assets/demo/Demos.scss'; import './assets/layout/layout.scss'; import './App.scss'; import LogIn from './components/LogIn'; +import { useCookies } from "react-cookie"; +import LoginLocalStorage from './components/LoginLocalStorage'; + + const App = () => { const [layoutMode, setLayoutMode] = useState('static'); @@ -62,8 +66,9 @@ const App = () => { const [mobileTopbarMenuActive, setMobileTopbarMenuActive] = useState(false); const copyTooltipRef = useRef(); const location = useLocation(); + const [cookies, setCookies] = useCookies(); - const handleLogout=()=>{ + const handleLogout = () => { localStorage.clear(); window.location.reload(); } @@ -117,24 +122,6 @@ const App = () => { } const onToggleMenuClick = (event) => { - menuClick = true; - - if (isDesktop()) { - if (layoutMode === 'overlay') { - if (mobileMenuActive === true) { - setOverlayMenuActive(true); - } - - setOverlayMenuActive((prevState) => !prevState); - setMobileMenuActive(false); - } - else if (layoutMode === 'static') { - setStaticMenuInactive((prevState) => !prevState); - } - } - else { - setMobileMenuActive((prevState) => !prevState); - } event.preventDefault(); } @@ -166,18 +153,50 @@ const App = () => { return window.innerWidth >= 992; } + const menu2 = [ + { + label: 'Home', + items: [ + { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, + { label: 'Administradores del sistema', icon: 'pi pi-fw pi-id-card', to: '/administradoresSistema' }, + { label: 'Administradores de comunidad', icon: 'pi pi-fw pi-id-card', to: '/administradoresComunidad' }, + { label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas' }, + ] + } + ] + + + const menu3 = [ + { + label: 'Home', + items: [ + { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, + { label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos' }, + { label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad' }, + ] + }, + ] + + function menu4() { + if (cookies.type == '1') { + return menu2; + } else if (cookies.type == '2') { + return menu3; + } + } + const menu = [ { label: 'Home', items: [ - {label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/'}, - {label: 'Administradores del sistema', icon: 'pi pi-fw pi-id-card', to: '/administradoresSistema'}, - {label: 'Administradores de comunidad', icon: 'pi pi-fw pi-id-card', to: '/administradoresComunidad'}, - {label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad'}, - {label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas'}, - {label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos'}, - {label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn'}, - {label: 'Log out', icon: 'pi pi-fw pi-id-card', to: '/logOut'} + { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, + { label: 'Administradores del sistema', icon: 'pi pi-fw pi-id-card', to: '/administradoresSistema' }, + { label: 'Administradores de comunidad', icon: 'pi pi-fw pi-id-card', to: '/administradoresComunidad' }, + { label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad' }, + { label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas' }, + { label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos' }, + { label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn' }, + { label: 'Log out', icon: 'pi pi-fw pi-id-card', to: '/logOut' } ] }, { @@ -282,7 +301,6 @@ const App = () => { else element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); } - const wrapperClass = classNames('layout-wrapper', { 'layout-overlay': layoutMode === 'overlay', 'layout-static': layoutMode === 'static', @@ -295,60 +313,69 @@ const App = () => { }); return ( -
- - + + + -
- -
+
+ -
-
- } /> - - - - - - - - - - - - - - - - - } /> - - - - - - - - - - - - + + +
+ +
+ +
+
+ + } /> + + + + + + + + + + + + + + {/**/} + + + } /> + + + + + + + + + + + + +
+ + +
+ + + + +
+
+ + - -
- - - - -
-
-
); } diff --git a/web-ui/web-react/src/AppMenu.js b/web-ui/web-react/src/AppMenu.js index 7ee0e07e..7c81bc73 100644 --- a/web-ui/web-react/src/AppMenu.js +++ b/web-ui/web-react/src/AppMenu.js @@ -109,10 +109,7 @@ export const AppMenu = (props) => { return (
- - primeblocks - +
); } diff --git a/web-ui/web-react/src/AppTopbar.js b/web-ui/web-react/src/AppTopbar.js index 40e350b1..02c59e06 100644 --- a/web-ui/web-react/src/AppTopbar.js +++ b/web-ui/web-react/src/AppTopbar.js @@ -1,9 +1,21 @@ import React from 'react'; import { Link } from 'react-router-dom'; import classNames from 'classnames'; +import Cookies from 'universal-cookie'; + +const cookies = new Cookies(); export const AppTopbar = (props) => { + function cerrarSesion() { + cookies.remove('id', { path: "/" }); + cookies.remove('email', { path: "/" }); + cookies.remove('name', { path: "/" }); + cookies.remove('type', { path: "/" }); + cookies.remove('community_id', { path: "/" }); + window.location.href = '/login'; + } + return (
@@ -37,6 +49,7 @@ export const AppTopbar = (props) => { Profile +
diff --git a/web-ui/web-react/src/components/LoginLocalStorage.js b/web-ui/web-react/src/components/LoginLocalStorage.js index 2fe0332f..4e3fa806 100644 --- a/web-ui/web-react/src/components/LoginLocalStorage.js +++ b/web-ui/web-react/src/components/LoginLocalStorage.js @@ -52,6 +52,10 @@ class LoginLocalStorage extends Component { cookies.set('id', user._id, { path: "/" }); cookies.set('name', user.name, { path: "/" }); cookies.set('email', user.email, { path: "/" }); + cookies.set('type', user.user_type, { path: "/" }); + if(user.user_type != '1') { + cookies.set('community_id', user.community_id, { path: "/" }); + } alert(`Bienvenido ${user.name}`); window.location.href = "/"; } else { diff --git a/web-ui/web-react/src/components/MenuAdmin.js b/web-ui/web-react/src/components/MenuAdmin.js index e22ef17d..334ccf04 100644 --- a/web-ui/web-react/src/components/MenuAdmin.js +++ b/web-ui/web-react/src/components/MenuAdmin.js @@ -6,6 +6,7 @@ import Communities from '../components/ComunidadViviendas'; import Dashboard from '../templates/Dashboard'; import { BrowserRouter, Switch, Route } from 'react-router-dom'; import { AppMenu } from '../AppMenu'; +import { CSSTransition } from 'react-transition-group'; const cookies = new Cookies(); @@ -59,6 +60,7 @@ class MenuAdmin extends Component { cookies.remove('id', { path: "/" }); cookies.remove('email', { path: "/" }); cookies.remove('name', { path: "/" }); + cookies.remove('type', { path: "/" }); window.location.href = '/login'; } @@ -89,6 +91,9 @@ class MenuAdmin extends Component {

+ +
+
); } diff --git a/web-ui/web-react/src/components/MenuAdminCommunity.js b/web-ui/web-react/src/components/MenuAdminCommunity.js new file mode 100644 index 00000000..db982561 --- /dev/null +++ b/web-ui/web-react/src/components/MenuAdminCommunity.js @@ -0,0 +1,119 @@ +import React, { Component } from 'react'; +import Cookies from 'universal-cookie'; +import Inquilinos from './Inquilinos'; +import GuardasSeguridad from './GuardasSeguridad'; +import Dashboard from '../templates/Dashboard'; +import { BrowserRouter, Switch, Route } from 'react-router-dom'; +import { AppMenu } from '../AppMenu'; + +const cookies = new Cookies(); + +const menu = [ + { + label: 'Home', + items: [ + { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, + { label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos' }, + { label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad' }, + ] + }, +]; + +class MenuAdminCommunity extends Component { + + constructor() { + super() + this.state = { + layoutColorMode: 'light', + layoutMode: 'static', + menuClick: false, + mobileTopbarMenuClick: false, + overlayMenuActive: false, + mobileMenuActive: false + } + + } + + onSidebarClick = () => { + this.setState({ + menuClick: true + }) + + } + + onMenuItemClick = (event) => { + if (!event.item.items) { + this.setState({ + overlayMenuActive: false, + mobileMenuActive: false + }) + + } + } + + cerrarSesion = () => { + cookies.remove('id', { path: "/" }); + cookies.remove('email', { path: "/" }); + cookies.remove('name', { path: "/" }); + cookies.remove('type', { path: "/" }); + cookies.remove('community_id', { path: "/" }); + window.location.href = '/login'; + } + + componentDidMount() { + if (!cookies.get('email')) { + window.location.href = "/login"; + } + } + + + onWrapperClick = (event) => { + if (!this.state.menuClick) { + this.setState({ + overlayMenuActive: false, + mobileMenuActive: false + }) + } + + if (!this.state.mobileTopbarMenuClick) { + this.setState({ + mobileTopbarMenuClick: false, + }) + } + + this.setState({ + mobileTopbarMenuClick: false, + menuClick: false + }) + } + + render() { + + return ( + +
+ +
+ Menu Principal +
+ + + +
+ +
+
+ } /> + + +
+ +
+
+
+
+ ); + } +} + +export default MenuAdminCommunity; \ No newline at end of file diff --git a/web-ui/web-react/src/index.js b/web-ui/web-react/src/index.js index 3e9cb72d..61aad4f9 100644 --- a/web-ui/web-react/src/index.js +++ b/web-ui/web-react/src/index.js @@ -3,7 +3,7 @@ import React from 'react'; import ReactDOM from 'react-dom'; import App from './App'; //import * as serviceWorker from './serviceWorker'; -import { HashRouter, Route } from 'react-router-dom' +import { HashRouter, Route, Router } from 'react-router-dom' import ScrollToTop from './ScrollToTop'; import Routes from './routes/Routes'; @@ -12,7 +12,7 @@ import Routes from './routes/Routes'; ReactDOM.render( - + , document.getElementById('root') diff --git a/web-ui/web-react/src/routes/Routes.js b/web-ui/web-react/src/routes/Routes.js index bebacd7b..cb0800ec 100644 --- a/web-ui/web-react/src/routes/Routes.js +++ b/web-ui/web-react/src/routes/Routes.js @@ -1,17 +1,36 @@ -import React from 'react'; -import {BrowserRouter, Switch, Route} from 'react-router-dom'; +import React, { useEffect, useRef } from 'react'; +import { BrowserRouter, Switch, Route } from 'react-router-dom'; import App from '../App'; import LoginLocalStorage from '../components/LoginLocalStorage'; import MenuAdmin from '../components/MenuAdmin'; import Menu from '../pages/Menu'; +import MenuAdminCommunity from '../components/MenuAdminCommunity'; +import { useCookies } from "react-cookie"; + + function Routes() { - + const [cookies, setCookies] = useCookies(); + + + function getMenu() { + console.log(cookies.type) + switch(cookies.type) { + case '1': + return + case '2': + return + + } + } + + return ( - - + + + ); From 5ba3fce7e3a810002c523681d2724f4aa31cab3a Mon Sep 17 00:00:00 2001 From: Mariela Date: Thu, 11 Aug 2022 01:12:15 -0600 Subject: [PATCH 10/16] funcionalidad hecha --- web-ui/web-react/src/App.js | 512 ++++++++++++----------- web-ui/web-react/src/AppMenu.js | 298 +++++++------ web-ui/web-react/src/AppTopbar.js | 7 +- web-ui/web-react/src/components/LogIn.js | 3 - 4 files changed, 402 insertions(+), 418 deletions(-) diff --git a/web-ui/web-react/src/App.js b/web-ui/web-react/src/App.js index 12c09705..b5137fb9 100644 --- a/web-ui/web-react/src/App.js +++ b/web-ui/web-react/src/App.js @@ -71,112 +71,112 @@ const App = () => { const location = useLocation(); const [cookies, setCookies] = useCookies(); - PrimeReact.ripple = true; + PrimeReact.ripple = true; - let menuClick = false; - let mobileTopbarMenuClick = false; + let menuClick = false; + let mobileTopbarMenuClick = false; - useEffect(() => { - if (mobileMenuActive) { - addClass(document.body, 'body-overflow-hidden'); - } else { - removeClass(document.body, 'body-overflow-hidden'); - } - }, [mobileMenuActive]); + useEffect(() => { + if (mobileMenuActive) { + addClass(document.body, 'body-overflow-hidden'); + } else { + removeClass(document.body, 'body-overflow-hidden'); + } + }, [mobileMenuActive]); - useEffect(() => { - copyTooltipRef && - copyTooltipRef.current && - copyTooltipRef.current.updateTargetEvents(); - }, [location]); + useEffect(() => { + copyTooltipRef && + copyTooltipRef.current && + copyTooltipRef.current.updateTargetEvents(); + }, [location]); - const onInputStyleChange = (inputStyle) => { - setInputStyle(inputStyle); - }; + const onInputStyleChange = (inputStyle) => { + setInputStyle(inputStyle); + }; - const onRipple = (e) => { - PrimeReact.ripple = e.value; - setRipple(e.value); - }; + const onRipple = (e) => { + PrimeReact.ripple = e.value; + setRipple(e.value); + }; - const onLayoutModeChange = (mode) => { - setLayoutMode(mode); - }; + const onLayoutModeChange = (mode) => { + setLayoutMode(mode); + }; - const onColorModeChange = (mode) => { - setLayoutColorMode(mode); - }; + const onColorModeChange = (mode) => { + setLayoutColorMode(mode); + }; - const onWrapperClick = (event) => { - if (!menuClick) { - setOverlayMenuActive(false); - setMobileMenuActive(false); - } - - if (!mobileTopbarMenuClick) { - setMobileTopbarMenuActive(false); - } - - mobileTopbarMenuClick = false; - menuClick = false; - }; - - const onToggleMenuClick = (event) => { - menuClick = true; - - if (isDesktop()) { - if (layoutMode === 'overlay') { - if (mobileMenuActive === true) { - setOverlayMenuActive(true); + const onWrapperClick = (event) => { + if (!menuClick) { + setOverlayMenuActive(false); + setMobileMenuActive(false); } - setOverlayMenuActive((prevState) => !prevState); - setMobileMenuActive(false); - } else if (layoutMode === 'static') { - setStaticMenuInactive((prevState) => !prevState); - } - } else { - setMobileMenuActive((prevState) => !prevState); - } + if (!mobileTopbarMenuClick) { + setMobileTopbarMenuActive(false); + } - event.preventDefault(); - }; + mobileTopbarMenuClick = false; + menuClick = false; + }; - const onSidebarClick = () => { - menuClick = true; - }; + const onToggleMenuClick = (event) => { + menuClick = true; - const onMobileTopbarMenuClick = (event) => { - mobileTopbarMenuClick = true; + if (isDesktop()) { + if (layoutMode === 'overlay') { + if (mobileMenuActive === true) { + setOverlayMenuActive(true); + } - setMobileTopbarMenuActive((prevState) => !prevState); - event.preventDefault(); - }; + setOverlayMenuActive((prevState) => !prevState); + setMobileMenuActive(false); + } else if (layoutMode === 'static') { + setStaticMenuInactive((prevState) => !prevState); + } + } else { + setMobileMenuActive((prevState) => !prevState); + } - const onMobileSubTopbarMenuClick = (event) => { - mobileTopbarMenuClick = true; + event.preventDefault(); + }; - event.preventDefault(); - }; + const onSidebarClick = () => { + menuClick = true; + }; - const onMenuItemClick = (event) => { - if (!event.item.items) { - setOverlayMenuActive(false); - setMobileMenuActive(false); - } - }; - const isDesktop = () => { - return window.innerWidth >= 992; - }; + const onMobileTopbarMenuClick = (event) => { + mobileTopbarMenuClick = true; + + setMobileTopbarMenuActive((prevState) => !prevState); + event.preventDefault(); + }; + + const onMobileSubTopbarMenuClick = (event) => { + mobileTopbarMenuClick = true; + + event.preventDefault(); + }; + + const onMenuItemClick = (event) => { + if (!event.item.items) { + setOverlayMenuActive(false); + setMobileMenuActive(false); + } + }; + const isDesktop = () => { + return window.innerWidth >= 992; + }; const menu2 = [ { - label: 'Home', + label: 'Inicio', items: [ { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, - { label: 'Administradores del sistema', icon: 'pi pi-fw pi-id-card', to: '/administradoresSistema' }, - { label: 'Administradores de comunidad', icon: 'pi pi-fw pi-id-card', to: '/administradoresComunidad' }, - { label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas' }, + { label: 'Administradores del sistema',icon: PrimeIcons.USERS, to: '/administradoresSistema' }, + { label: 'Administradores de comunidad', icon: PrimeIcons.USERS, to: '/administradoresComunidad' }, + { label: 'Comunidades', icon: PrimeIcons.BUILDING, to: '/comunidadesViviendas' }, ] } ] @@ -184,11 +184,16 @@ const App = () => { const menu3 = [ { - label: 'Home', + label: 'Inicio', items: [ { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, - { label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos' }, - { label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad' }, + { label: 'Inquilinos', icon: PrimeIcons.USERS, to: '/inquilinos' }, + { label: 'Guardas de seguridad', icon: PrimeIcons.LOCK, to: '/guardasSeguridad' }, + { + label: 'Áreas Comunes de Comunidad', + icon: PrimeIcons.BUILDING, + to: '/areasComunes', + }, ] }, ] @@ -203,184 +208,188 @@ const App = () => { const menu = [ { - label: 'Administradores del sistema', - icon: PrimeIcons.USERS, - to: '/administradoresSistema', + label: 'Inicio', + items: + [ + { + label: 'Administradores del sistema', + icon: PrimeIcons.USERS, + to: '/administradoresSistema', + }, + { + label: 'Administradores de comunidad', + icon: PrimeIcons.USERS, + to: '/administradoresComunidad', + }, + { + label: 'Guardas de seguridad', + icon: PrimeIcons.LOCK, + to: '/guardasSeguridad', + }, + { + label: 'Comunidades', + icon: PrimeIcons.BUILDING, + to: '/comunidadesViviendas', + }, + { + label: 'Inquilinos', + icon: PrimeIcons.USER, + to: '/inquilinos' + }, + { + label: 'Áreas Comunes de Comunidad', + icon: PrimeIcons.BUILDING, + to: '/areasComunes', + }, + { label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn' }, + ], }, { - label: 'Administradores de comunidad', - icon: PrimeIcons.USERS, - to: '/administradoresComunidad', + label: 'UI Components', + icon: 'pi pi-fw pi-sitemap', + items: [ + { + label: 'Form Layout', + icon: 'pi pi-fw pi-id-card', + to: '/formlayout', + }, + { label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' }, + { + label: 'Float Label', + icon: 'pi pi-fw pi-bookmark', + to: '/floatlabel', + }, + { + label: 'Invalid State', + icon: 'pi pi-fw pi-exclamation-circle', + to: 'invalidstate', + }, + { label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' }, + { label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' }, + { label: 'List', icon: 'pi pi-fw pi-list', to: '/list' }, + { label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' }, + { label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' }, + { label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' }, + { label: 'Media', icon: 'pi pi-fw pi-image', to: '/media' }, + { label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' }, + { label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' }, + { label: 'File', icon: 'pi pi-fw pi-file', to: '/file' }, + { label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' }, + { label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' }, + ], }, { - label: 'Guardas de seguridad', - icon: PrimeIcons.LOCK, - to: '/guardasSeguridad', + label: 'UI Blocks', + items: [ + { + label: 'Free Blocks', + icon: 'pi pi-fw pi-eye', + to: '/blocks', + badge: 'NEW', + }, + { + label: 'All Blocks', + icon: 'pi pi-fw pi-globe', + url: 'https://www.primefaces.org/primeblocks-react', + }, + ], }, { - label: 'Comunidades', - icon: PrimeIcons.BUILDING, - to: '/comunidadesViviendas', + label: 'Icons', + items: [{ label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' }], }, { - label: 'Inquilinos', - icon: PrimeIcons.USER, - to: '/inquilinos' + label: 'Pages', + icon: 'pi pi-fw pi-clone', + items: [ + { label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' }, + { label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' }, + { label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' }, + ], }, { - label: 'Áreas Comunes de Comunidad', - icon: PrimeIcons.BUILDING, - to: '/areasComunes', + label: 'Menu Hierarchy', + icon: 'pi pi-fw pi-search', + items: [ + { + label: 'Submenu 1', + icon: 'pi pi-fw pi-bookmark', + items: [ + { + label: 'Submenu 1.1', + icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' }, + ], + }, + { + label: 'Submenu 1.2', + icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' }, + ], + }, + ], + }, + { + label: 'Submenu 2', + icon: 'pi pi-fw pi-bookmark', + items: [ + { + label: 'Submenu 2.1', + icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' }, + ], + }, + { + label: 'Submenu 2.2', + icon: 'pi pi-fw pi-bookmark', + items: [ + { label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' }, + { label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' }, + ], + }, + ], + }, + ], }, - { label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn' }, - ], - }, - { - label: 'UI Components', - icon: 'pi pi-fw pi-sitemap', - items: [ - { - label: 'Form Layout', - icon: 'pi pi-fw pi-id-card', - to: '/formlayout', - }, - { label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' }, - { - label: 'Float Label', - icon: 'pi pi-fw pi-bookmark', - to: '/floatlabel', - }, - { - label: 'Invalid State', - icon: 'pi pi-fw pi-exclamation-circle', - to: 'invalidstate', - }, - { label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' }, - { label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' }, - { label: 'List', icon: 'pi pi-fw pi-list', to: '/list' }, - { label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' }, - { label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' }, - { label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' }, - { label: 'Media', icon: 'pi pi-fw pi-image', to: '/media' }, - { label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' }, - { label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' }, - { label: 'File', icon: 'pi pi-fw pi-file', to: '/file' }, - { label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' }, - { label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' }, - ], - }, - { - label: 'UI Blocks', - items: [ - { - label: 'Free Blocks', - icon: 'pi pi-fw pi-eye', - to: '/blocks', - badge: 'NEW', - }, - { - label: 'All Blocks', - icon: 'pi pi-fw pi-globe', - url: 'https://www.primefaces.org/primeblocks-react', - }, - ], - }, - { - label: 'Icons', - items: [{ label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' }], - }, - { - label: 'Pages', - icon: 'pi pi-fw pi-clone', - items: [ - { label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' }, - { label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' }, - { label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' }, - ], - }, - { - label: 'Menu Hierarchy', - icon: 'pi pi-fw pi-search', - items: [ - { - label: 'Submenu 1', - icon: 'pi pi-fw pi-bookmark', - items: [ - { - label: 'Submenu 1.1', - icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' }, - ], - }, - { - label: 'Submenu 1.2', - icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' }, - ], - }, - ], - }, - { - label: 'Submenu 2', - icon: 'pi pi-fw pi-bookmark', - items: [ - { - label: 'Submenu 2.1', - icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' }, - ], - }, - { - label: 'Submenu 2.2', - icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' }, - ], - }, - ], - }, - ], - }, - ]; + ]; - const addClass = (element, className) => { - if (element.classList) element.classList.add(className); - else element.className += ' ' + className; - }; + const addClass = (element, className) => { + if (element.classList) element.classList.add(className); + else element.className += ' ' + className; + }; - const removeClass = (element, className) => { - if (element.classList) element.classList.remove(className); - else - element.className = element.className.replace( - new RegExp( - '(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', - 'gi', - ), - ' ', - ); - }; + const removeClass = (element, className) => { + if (element.classList) element.classList.remove(className); + else + element.className = element.className.replace( + new RegExp( + '(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', + 'gi', + ), + ' ', + ); + }; - const wrapperClass = classNames('layout-wrapper', { - 'layout-overlay': layoutMode === 'overlay', - 'layout-static': layoutMode === 'static', - 'layout-static-sidebar-inactive': - staticMenuInactive && layoutMode === 'static', - 'layout-overlay-sidebar-active': - overlayMenuActive && layoutMode === 'overlay', - 'layout-mobile-sidebar-active': mobileMenuActive, - 'p-input-filled': inputStyle === 'filled', - 'p-ripple-disabled': ripple === false, - 'layout-theme-light': layoutColorMode === 'light', - }); + const wrapperClass = classNames('layout-wrapper', { + 'layout-overlay': layoutMode === 'overlay', + 'layout-static': layoutMode === 'static', + 'layout-static-sidebar-inactive': + staticMenuInactive && layoutMode === 'static', + 'layout-overlay-sidebar-active': + overlayMenuActive && layoutMode === 'overlay', + 'layout-mobile-sidebar-active': mobileMenuActive, + 'p-input-filled': inputStyle === 'filled', + 'p-ripple-disabled': ripple === false, + 'layout-theme-light': layoutColorMode === 'light', + }); return ( @@ -429,6 +438,7 @@ const App = () => { +
diff --git a/web-ui/web-react/src/AppMenu.js b/web-ui/web-react/src/AppMenu.js index dd1c636c..3f46d74c 100644 --- a/web-ui/web-react/src/AppMenu.js +++ b/web-ui/web-react/src/AppMenu.js @@ -6,179 +6,161 @@ import { Ripple } from 'primereact/ripple'; import { Badge } from 'primereact/badge'; const AppSubmenu = (props) => { - const [activeIndex, setActiveIndex] = useState(null); + const [activeIndex, setActiveIndex] = useState(null); - const onMenuItemClick = (event, item, index) => { - //avoid processing disabled items - if (item.disabled) { - event.preventDefault(); - return true; - } + const onMenuItemClick = (event, item, index) => { + //avoid processing disabled items + if (item.disabled) { + event.preventDefault(); + return true; + } - //execute command - if (item.command) { - item.command({ originalEvent: event, item: item }); - } + //execute command + if (item.command) { + item.command({ originalEvent: event, item: item }); + } - if (index === activeIndex) setActiveIndex(null); - else setActiveIndex(index); + if (index === activeIndex) setActiveIndex(null); + else setActiveIndex(index); - if (props.onMenuItemClick) { - props.onMenuItemClick({ - originalEvent: event, - item: item, - }); - } - }; + if (props.onMenuItemClick) { + props.onMenuItemClick({ + originalEvent: event, + item: item, + }); + } + }; - const onKeyDown = (event) => { - if (event.code === 'Enter' || event.code === 'Space') { - event.preventDefault(); - event.target.click(); - } - }; + const onKeyDown = (event) => { + if (event.code === 'Enter' || event.code === 'Space') { + event.preventDefault(); + event.target.click(); + } + }; - const renderLinkContent = (item) => { - let submenuIcon = item.items && ( - - ); - let badge = item.badge && ; + const renderLinkContent = (item) => { + let submenuIcon = item.items && ( + + ); + let badge = item.badge && ; - return ( - - - {item.label} - {submenuIcon} - {badge} - - - ); - }; - - const renderLink = (item, i) => { - let content = renderLinkContent(item); - - if (item.to) { - return ( - onMenuItemClick(e, item, i)} - exact - target={item.target} - > - {content} - - ); - } else { - return ( - onMenuItemClick(e, item, i)} - target={item.target} - > - {content} - - ); - } - }; - - let items = - props.items && - props.items.map((item, i) => { - let active = activeIndex === i; - let styleClass = classNames(item.badgeStyleClass, { - 'layout-menuitem-category': props.root, - 'active-menuitem': active && !item.to, - }); - - if (props.root) { return ( -
  • - {props.root === true && ( - -
    + + {item.label} + {submenuIcon} + {badge} + + + ); + }; + + const renderLink = (item, i) => { + let content = renderLinkContent(item); + + if (item.to) { + return ( + onMenuItemClick(e, item, i)} + exact + target={item.target} > - {item.label} -
    - -
    - )} -
  • - ); - } else { - return ( -
  • - {renderLink(item, i)} - - - -
  • - ); - } - }); + {content} + + ); + } else { + return ( + onMenuItemClick(e, item, i)} + target={item.target} + > + {content} + + ); + } + }; - return items ? ( -
      - {items} -
    - ) : null; + let items = + props.items && + props.items.map((item, i) => { + let active = activeIndex === i; + let styleClass = classNames(item.badgeStyleClass, { + 'layout-menuitem-category': props.root, + 'active-menuitem': active && !item.to, + }); + + if (props.root) { + return ( +
  • + {props.root === true && ( + +
    + {item.label} +
    + +
    + )} +
  • + ); + } else { + return ( +
  • + {renderLink(item, i)} + + + +
  • + ); + } + }); + + return items ? ( +
      + {items} +
    + ) : null; }; export const AppMenu = (props) => { - return ( -
    - - - primeblocks - -
    - ); -}; - return (
    - - + +
    ); + + + } diff --git a/web-ui/web-react/src/AppTopbar.js b/web-ui/web-react/src/AppTopbar.js index d0ad87f3..be2a90bf 100644 --- a/web-ui/web-react/src/AppTopbar.js +++ b/web-ui/web-react/src/AppTopbar.js @@ -6,12 +6,7 @@ import Cookies from 'universal-cookie'; const cookies = new Cookies(); export const AppTopbar = (props) => { - return ( -
    - - logo - KATOIKIA - + function cerrarSesion() { cookies.remove('id', { path: "/" }); diff --git a/web-ui/web-react/src/components/LogIn.js b/web-ui/web-react/src/components/LogIn.js index 466bf3d6..8777a82f 100644 --- a/web-ui/web-react/src/components/LogIn.js +++ b/web-ui/web-react/src/components/LogIn.js @@ -39,9 +39,6 @@ const LogIn = () => { {/* */}
    -
    -
    -
    ); }; From 3fc01cc033ee75f51d0b774d0ada78b85662125f Mon Sep 17 00:00:00 2001 From: Mariela Date: Fri, 12 Aug 2022 18:40:07 -0600 Subject: [PATCH 11/16] add logos app --- .../web-react/public/images/Logo_Katoikia.png | Bin 0 -> 37826 bytes .../web-react/public/images/Logo_Katoikia.svg | 9 +++++++++ 2 files changed, 9 insertions(+) create mode 100644 web-ui/web-react/public/images/Logo_Katoikia.png create mode 100644 web-ui/web-react/public/images/Logo_Katoikia.svg diff --git a/web-ui/web-react/public/images/Logo_Katoikia.png b/web-ui/web-react/public/images/Logo_Katoikia.png new file mode 100644 index 0000000000000000000000000000000000000000..d59e2c9a5a020b13246fd55f6daf2d01f236f7d9 GIT binary patch literal 37826 zcmV)kK%l>gP)_||)w0rzW=1VDnSPAT|M@vT$82oO zWMd;U+4M+VGO5%pbyroZYcK932!H^Hl>jmmxo?rNz5VVw?%#bcB0&^0Q1K!V5&1qc zkdcuQ@$S3#^UvMSaX)Sq*`1>M-Vbo&y}!lARTRZNf43|PTUmvhBa0n4MUKd>!Eq{> zKJpS4p7~XH0l&e<-d=_LzuvF9I23ZeQ!0Rh2NF!dCy9U>F;o}_UzVTmRdd5SRXRw`|*X;27EPd`- zmhpKxn5^+EHy_-PPU?Z=hN6_~7^c zvaI2Kv-Km-%d>=5=gL3zKg9dr{Ff-&OWfEsq&$eKb2W6j18!;;TUqxz6f>+M=Kq{@ z3KpNQ>n`yS@MwGiV*g`YzkUOa=1DlN7?*h;W*=A+gB$a5Z6`uDxJ#?3{+-4qU*D>y zOFbWjZGOMy@j*rr(#~zf{TO~-zli;^3b8W2Ro$w3+vw+#Yq;|Ex8NjwcEdift-q{nN?Xn0wThTcXTOkrx_ zAK=)DgX?dF&tn)`n!`57-jDxx&vKEu4Etp$yn-ivUP!1ZhG^~m zN2-UCc^9K7ljc<<%M2f{7-Q3Gl}`$0 zsXSPc_ya6`>)-Gm2guVF9PZsrP!)R$1HI++_Wt&7=!B6*GtB7Q+RU%%!3d`K;TfEG z?st%eiH5>raKmk|eg@MsXOfHW?)$%&){Y%t8FPc2$by6}l2`bAzyUvO*`Ouhpd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)|c&Ewp}%YtR$TyYAN?nuiBp0Fx`LX8-@;X zdpt{GcwUVZN`mgq^Tq>h@%~ClnWfdsfyT9gd|uR*5~%R=;M{NVuw$r6`oQXiNUAms zFv9Kk|7rrHY}*oaQXU4)Zs{6ByO^PlBzd`|koFqA&f!O&;qIuSmm3*ADH}?PvQCpH z=~g~O>tBRq9XG||o%axvwC!Sm#7-1xlcvt*fiv(bHQl6z5?atO7h{lv_`KKj+%Y)S z12nu8K@gBHiT9Cr9EX!AHG&!xPv}c zFW=zro#v*SfjuCm7KKQQ9;Qw_1Iw!`;3Bf**SPh|Ns+{_S_~xz^p$i@y(6R^*yXY;JyG1Fsb2t92z3Iy7-*2}Z^>XK;Tz?r9T_3{s)A-m8A%w=8I#p

    zpmXW}hV5KYHbZM#BHkli`94C=LmXNd{%Cd!<^7xuDc|d=b$SDml&Y0Krl{I$`J%XUQ z0MivF-*1&AYbb}-@9m&RXC5pZMp~JM%|l1(-fT;TqU5NM8!X+**kvu@ z-p?}BPg?=z2vlA8@n54xP9!O{U@RRqyS4j!zZH?JNh}e9>M`Q*8D&+_)E%ZIoz1)-8886w5r0+i@hFQs`t*aK#A)5 z`M2P7uBqf2 zkN(;n6rJ1H&Ls$_K>w + + + + + + + + From 59c0ced9184fbedf5993a0a6af8d64de45b46428 Mon Sep 17 00:00:00 2001 From: Mariela Date: Fri, 12 Aug 2022 18:40:26 -0600 Subject: [PATCH 12/16] agregar funcionalidades de validaciones en login --- web-ui/web-react/src/App.js | 94 ++++--- web-ui/web-react/src/AppTopbar.js | 89 +++++-- .../src/components/LoginLocalStorage.js | 234 ++++++++++++------ 3 files changed, 292 insertions(+), 125 deletions(-) diff --git a/web-ui/web-react/src/App.js b/web-ui/web-react/src/App.js index b5137fb9..c1db2858 100644 --- a/web-ui/web-react/src/App.js +++ b/web-ui/web-react/src/App.js @@ -174,7 +174,7 @@ const App = () => { label: 'Inicio', items: [ { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, - { label: 'Administradores del sistema',icon: PrimeIcons.USERS, to: '/administradoresSistema' }, + { label: 'Administradores del sistema', icon: PrimeIcons.USERS, to: '/administradoresSistema' }, { label: 'Administradores de comunidad', icon: PrimeIcons.USERS, to: '/administradoresComunidad' }, { label: 'Comunidades', icon: PrimeIcons.BUILDING, to: '/comunidadesViviendas' }, ] @@ -198,11 +198,26 @@ const App = () => { }, ] + const menuLogin = [ + { + label: 'Inicio', + items: [ + { + label: 'Inicio de sesion', + icon: PrimeIcons.BUILDING, + to: '/login' + }, + ] + }, + ] + function menu4() { if (cookies.type == '1') { return menu2; } else if (cookies.type == '2') { return menu3; + } else { + return menuLogin; } } @@ -210,39 +225,39 @@ const App = () => { { label: 'Inicio', items: - [ - { - label: 'Administradores del sistema', - icon: PrimeIcons.USERS, - to: '/administradoresSistema', - }, - { - label: 'Administradores de comunidad', - icon: PrimeIcons.USERS, - to: '/administradoresComunidad', - }, - { - label: 'Guardas de seguridad', - icon: PrimeIcons.LOCK, - to: '/guardasSeguridad', - }, - { - label: 'Comunidades', - icon: PrimeIcons.BUILDING, - to: '/comunidadesViviendas', - }, - { - label: 'Inquilinos', - icon: PrimeIcons.USER, - to: '/inquilinos' - }, - { - label: 'Áreas Comunes de Comunidad', - icon: PrimeIcons.BUILDING, - to: '/areasComunes', - }, - { label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn' }, - ], + [ + { + label: 'Administradores del sistema', + icon: PrimeIcons.USERS, + to: '/administradoresSistema', + }, + { + label: 'Administradores de comunidad', + icon: PrimeIcons.USERS, + to: '/administradoresComunidad', + }, + { + label: 'Guardas de seguridad', + icon: PrimeIcons.LOCK, + to: '/guardasSeguridad', + }, + { + label: 'Comunidades', + icon: PrimeIcons.BUILDING, + to: '/comunidadesViviendas', + }, + { + label: 'Inquilinos', + icon: PrimeIcons.USER, + to: '/inquilinos' + }, + { + label: 'Áreas Comunes de Comunidad', + icon: PrimeIcons.BUILDING, + to: '/areasComunes', + }, + { label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn' }, + ], }, { label: 'UI Components', @@ -395,9 +410,10 @@ const App = () => { -

    + + {
    - + } /> + @@ -439,15 +456,12 @@ const App = () => { - -
    - +
    diff --git a/web-ui/web-react/src/AppTopbar.js b/web-ui/web-react/src/AppTopbar.js index be2a90bf..f9226f50 100644 --- a/web-ui/web-react/src/AppTopbar.js +++ b/web-ui/web-react/src/AppTopbar.js @@ -1,14 +1,17 @@ -import React from 'react'; +import React, { useState, useEffect } from 'react'; import { Link } from 'react-router-dom'; import classNames from 'classnames'; import Cookies from 'universal-cookie'; +import { Button } from 'primereact/button'; +import { Menubar } from 'primereact/menubar'; const cookies = new Cookies(); export const AppTopbar = (props) => { - + const [logged, setLogged] = useState(null); - function cerrarSesion() { + + function cerrarSesion() { cookies.remove('id', { path: "/" }); cookies.remove('email', { path: "/" }); cookies.remove('name', { path: "/" }); @@ -17,10 +20,46 @@ export const AppTopbar = (props) => { window.location.href = '/login'; } + useEffect(() => { + if (cookies.get('email')) { + setLogged(true); + } else { + setLogged(false); + }; + }, []) + + + const buttonLogout = () => { + return ( + <> +
    +
    + + ) + } + + const menuProfile = [ + { + label: 'Perfil', + icon: 'pi pi-user', + items: [ + { + label: 'Cerrar Sesion', + icon: 'pi pi-fw pi-lock', + } + ], + }, + ] + + return (
    - logo + logo KATOIKIA @@ -28,33 +67,51 @@ export const AppTopbar = (props) => { */} - + -
      - {/*
    • +
        + {/*
      • */} - {/*
      • + {/*
      • */} -
      • +
      • + + {/* + + + + + */}
    ); diff --git a/web-ui/web-react/src/components/LoginLocalStorage.js b/web-ui/web-react/src/components/LoginLocalStorage.js index 4e3fa806..fbd74f0f 100644 --- a/web-ui/web-react/src/components/LoginLocalStorage.js +++ b/web-ui/web-react/src/components/LoginLocalStorage.js @@ -1,20 +1,25 @@ import DashboardAdmin from "./DashboardAdmin"; -import React, { Component, Fragment } from 'react'; +import React, { Component, Fragment, useRef } from 'react'; import Cookies from 'universal-cookie'; import { InputText } from 'primereact/inputtext'; import { Button } from 'primereact/button'; +import { Toast } from 'primereact/toast'; const baseUrl = "http://localhost:4000/user/loginUser"; const cookies = new Cookies(); - class LoginLocalStorage extends Component { - state = { - form: { - email: '', - password: '' - }, - errorMessages:{} + constructor(props) { + super(props); + this.state = { + form: { + email: '', + password: '' + }, + errorEmail: false, + errorPassword: false, + logged: null + } } handleChange = async e => { @@ -26,6 +31,33 @@ class LoginLocalStorage extends Component { }); } + validaciones = (data) => { + let error = true; + if (data.email == '') { + this.setState({ + errorEmail: true + }) + error = true; + } else { + this.setState({ + errorEmail: false + }) + } + if (data.password == '') { + this.setState({ + errorPassword: true + }) + error = true; + } else { + this.setState({ + errorPassword: false + }) + } + + return error; + + } + iniciarSesion = async () => { const data = { email: this.state.form.email, @@ -34,40 +66,65 @@ class LoginLocalStorage extends Component { console.log(data); - await fetch(baseUrl, { - cache: 'no-cache', - method: 'POST', - body: JSON.stringify(data), - headers: { - 'Content-Type': 'application/json' - } - }) - .then(response => { - return response.json(); + if (!this.validaciones(data)) { + this.setState({ + email: true, + password: true }) - .then(response => { - console.log(response.message); - if (response.message) { - const user = response.message; - cookies.set('id', user._id, { path: "/" }); - cookies.set('name', user.name, { path: "/" }); - cookies.set('email', user.email, { path: "/" }); - cookies.set('type', user.user_type, { path: "/" }); - if(user.user_type != '1') { - cookies.set('community_id', user.community_id, { path: "/" }); - } - alert(`Bienvenido ${user.name}`); - window.location.href = "/"; - } else { - alert('El usuario o la contraseña no son correctos'); + await fetch(baseUrl, { + cache: 'no-cache', + method: 'POST', + body: JSON.stringify(data), + headers: { + 'Content-Type': 'application/json' } }) - .catch(error => { - console.log(error); - }) + .then(response => { + if (response.status != 201) + console.log('Ocurrió un error con el servicio: ' + response.status); + else return response.json(); + }) + .then(response => { + console.log(response.message); + + if (response.message) { + const user = response.message; + cookies.set('id', user._id, { path: "/" }); + cookies.set('name', user.name, { path: "/" }); + cookies.set('email', user.email, { path: "/" }); + cookies.set('type', user.user_type, { path: "/" }); + if (user.user_type != '1') { + cookies.set('community_id', user.community_id, { path: "/" }); + } + // alert(`Bienvenido ${user.name}`); + document.getElementById('notification').hidden = true; + document.getElementById('notification2').hidden = false; + document.getElementById("message2").innerHTML = `Bienvenido ${user.name}`; + //document.getElementById("message").remove('p-message p-message-error') + // document.getElementById("message").append(`Bienvenido ${user.name}`); + // document.getElementById("message").classList('p-message p-message-success') + // window.location.href = "/"; + + + } else { + document.getElementById('notification2').hidden = true; + document.getElementById('notification').hidden = false; + + + //alert('El usuario o la contraseña no son correctos'); + document.getElementById("message").innerHTML = "El usuario o la contraseña son incorrectos"; + // document.getElementById("message").remove('p-message p-message-success') + // document.getElementById("message").append('El usuario o la contraseña son incorrectos'); + // document.getElementById("message").add.className('p-message p-message-error') + } + }) + .catch(error => { + console.log(error); + }) + } } componentDidMount() { @@ -77,49 +134,88 @@ class LoginLocalStorage extends Component { } renderErrorMessage = (name) => - name === this.state.errorMessages.name && ( -
    {this.state.errorMessages.message}
    - ); + name === this.state.errorMessages.name && ( +
    {this.state.errorMessages.message}
    + ); - errors = { - email: "Correo requerido", - pass: "Contraseña requerida" - }; + errors = { + email: "Correo requerido", + pass: "Contraseña requerida" + }; render() { return ( - -
    -
    -
    + +
    +
    + +
    + +
    +
    Iniciar Sesión
    +
    + +
    + +
    +
    + + + + +
    + {this.state.errorEmail && ( + Correo electrónico es requerido + )} + +
    +
    + +
    +
    + + + + +
    + {this.state.errorPassword && ( + Contraseña es requerida + )} +
    +
    + +
    From 0dbf6acfc405298e0629cfaa4c3c564de50ebc8c Mon Sep 17 00:00:00 2001 From: Mariela Date: Fri, 12 Aug 2022 19:21:24 -0600 Subject: [PATCH 13/16] eliminar documentos innecesarios --- web-ui/web-react/src/App.js | 5 +- .../src/components/DashboardAdmin.js | 360 ------------------ .../web-react/src/components/LocalStorage.js | 17 - web-ui/web-react/src/pages/Menu.js | 35 -- web-ui/web-react/src/routes/Routes.js | 39 -- 5 files changed, 2 insertions(+), 454 deletions(-) delete mode 100644 web-ui/web-react/src/components/DashboardAdmin.js delete mode 100644 web-ui/web-react/src/components/LocalStorage.js delete mode 100644 web-ui/web-react/src/pages/Menu.js delete mode 100644 web-ui/web-react/src/routes/Routes.js diff --git a/web-ui/web-react/src/App.js b/web-ui/web-react/src/App.js index c1db2858..3381887e 100644 --- a/web-ui/web-react/src/App.js +++ b/web-ui/web-react/src/App.js @@ -50,11 +50,10 @@ import './assets/demo/flags/flags.css'; import './assets/demo/Demos.scss'; import './assets/layout/layout.scss'; import './App.scss'; -import LogIn from './components/LogIn'; import { PrimeIcons } from 'primereact/api'; import AreasComunes from './components/AreasComunes'; import { useCookies } from "react-cookie"; -import LoginLocalStorage from './components/LoginLocalStorage'; +import Login from './components/Login'; @@ -425,7 +424,7 @@ const App = () => {
    - + } /> diff --git a/web-ui/web-react/src/components/DashboardAdmin.js b/web-ui/web-react/src/components/DashboardAdmin.js deleted file mode 100644 index 0911d706..00000000 --- a/web-ui/web-react/src/components/DashboardAdmin.js +++ /dev/null @@ -1,360 +0,0 @@ -import React, { useState, useEffect, useRef } from 'react'; -import classNames from 'classnames'; -import { Route, useLocation } from 'react-router-dom'; -import { CSSTransition } from 'react-transition-group'; - -import { AppTopbar } from '../AppTopbar'; -import { AppFooter } from '../AppFooter'; -import { AppMenu } from '../AppMenu'; -import { AppConfig } from '../AppConfig'; - -import Dashboard from '../templates/Dashboard'; -import ButtonDemo from '../templates/ButtonDemo'; -import ChartDemo from '../templates/ChartDemo'; -import Documentation from '../templates/Documentation'; -import FileDemo from '../templates/FileDemo'; -import FloatLabelDemo from '../templates/FloatLabelDemo'; -import FormLayoutDemo from '../templates/FormLayoutDemo'; -import InputDemo from '../templates/InputDemo'; -import ListDemo from '../templates/ListDemo'; -import MenuDemo from '../templates/MenuDemo'; -import MessagesDemo from '../templates/MessagesDemo'; -import MiscDemo from '../templates/MiscDemo'; -import OverlayDemo from '../templates/OverlayDemo'; -import MediaDemo from '../templates/MediaDemo'; -import PanelDemo from '../templates/PanelDemo'; -import TableDemo from '../templates/TableDemo'; -import TreeDemo from '../templates/TreeDemo'; -import InvalidStateDemo from '../templates/InvalidStateDemo'; -import BlocksDemo from '../templates/BlocksDemo'; -import IconsDemo from '../templates/IconsDemo'; -import AdministradoresSistema from '../components/AdministradoresSistema'; -import AdministradoresComunidad from '../components/AdministradoresComunidad'; -import GuardasSeguridad from '../components/GuardasSeguridad'; -import Communities from '../components/ComunidadViviendas'; -import Inquilinos from '../components/Inquilinos'; - -import Crud from '../pages/Crud'; -import EmptyPage from '../pages/EmptyPage'; -import TimelineDemo from '../pages/TimelineDemo'; - -import PrimeReact from 'primereact/api'; -import { Tooltip } from 'primereact/tooltip'; - -import 'primereact/resources/primereact.css'; -import 'primeicons/primeicons.css'; -import 'primeflex/primeflex.css'; -import 'prismjs/themes/prism-coy.css'; -import '../assets/demo/flags/flags.css'; -import '../assets/demo/Demos.scss'; -import '../assets/layout/layout.scss'; -import '../App.scss'; -import LogIn from '../components/LogIn'; -import LoginLocalStorage from '../components/LoginLocalStorage'; - -const DashboardAdmin = () => { - const [layoutMode, setLayoutMode] = useState('static'); - const [layoutColorMode, setLayoutColorMode] = useState('light') - const [inputStyle, setInputStyle] = useState('outlined'); - const [ripple, setRipple] = useState(true); - const [staticMenuInactive, setStaticMenuInactive] = useState(false); - const [overlayMenuActive, setOverlayMenuActive] = useState(false); - const [mobileMenuActive, setMobileMenuActive] = useState(false); - const [mobileTopbarMenuActive, setMobileTopbarMenuActive] = useState(false); - const copyTooltipRef = useRef(); - const location = useLocation(); - - const handleLogout=()=>{ - localStorage.clear(); - window.location.reload(); - } - - PrimeReact.ripple = true; - - let menuClick = false; - let mobileTopbarMenuClick = false; - - useEffect(() => { - if (mobileMenuActive) { - addClass(document.body, "body-overflow-hidden"); - } else { - removeClass(document.body, "body-overflow-hidden"); - } - }, [mobileMenuActive]); - - useEffect(() => { - copyTooltipRef && copyTooltipRef.current && copyTooltipRef.current.updateTargetEvents(); - }, [location]); - - const onInputStyleChange = (inputStyle) => { - setInputStyle(inputStyle); - } - - const onRipple = (e) => { - PrimeReact.ripple = e.value; - setRipple(e.value) - } - - const onLayoutModeChange = (mode) => { - setLayoutMode(mode) - } - - const onColorModeChange = (mode) => { - setLayoutColorMode(mode) - } - - const onWrapperClick = (event) => { - if (!menuClick) { - setOverlayMenuActive(false); - setMobileMenuActive(false); - } - - if (!mobileTopbarMenuClick) { - setMobileTopbarMenuActive(false); - } - - mobileTopbarMenuClick = false; - menuClick = false; - } - - const onToggleMenuClick = (event) => { - menuClick = true; - - if (isDesktop()) { - if (layoutMode === 'overlay') { - if (mobileMenuActive === true) { - setOverlayMenuActive(true); - } - - setOverlayMenuActive((prevState) => !prevState); - setMobileMenuActive(false); - } - else if (layoutMode === 'static') { - setStaticMenuInactive((prevState) => !prevState); - } - } - else { - setMobileMenuActive((prevState) => !prevState); - } - - event.preventDefault(); - } - - const onSidebarClick = () => { - menuClick = true; - } - - const onMobileTopbarMenuClick = (event) => { - mobileTopbarMenuClick = true; - - setMobileTopbarMenuActive((prevState) => !prevState); - event.preventDefault(); - } - - const onMobileSubTopbarMenuClick = (event) => { - mobileTopbarMenuClick = true; - - event.preventDefault(); - } - - const onMenuItemClick = (event) => { - if (!event.item.items) { - setOverlayMenuActive(false); - setMobileMenuActive(false); - } - } - const isDesktop = () => { - return window.innerWidth >= 992; - } - - const menu = [ - { - label: 'Home', - items: [ - {label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/'}, - {label: 'Administradores del sistema', icon: 'pi pi-fw pi-id-card', to: '/administradoresSistema'}, - {label: 'Administradores de comunidad', icon: 'pi pi-fw pi-id-card', to: '/administradoresComunidad'}, - {label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad'}, - {label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas'}, - {label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos'}, - {label: 'Log in', icon: 'pi pi-fw pi-id-card', to: '/logIn'}, - {label: 'Log out', icon: 'pi pi-fw pi-id-card', to: '/logOut'} - ] - }, - { - label: 'UI Components', icon: 'pi pi-fw pi-sitemap', - items: [ - { label: 'Form Layout', icon: 'pi pi-fw pi-id-card', to: '/formlayout' }, - { label: 'Input', icon: 'pi pi-fw pi-check-square', to: '/input' }, - { label: "Float Label", icon: "pi pi-fw pi-bookmark", to: "/floatlabel" }, - { label: "Invalid State", icon: "pi pi-fw pi-exclamation-circle", to: "invalidstate" }, - { label: 'Button', icon: 'pi pi-fw pi-mobile', to: '/button' }, - { label: 'Table', icon: 'pi pi-fw pi-table', to: '/table' }, - { label: 'List', icon: 'pi pi-fw pi-list', to: '/list' }, - { label: 'Tree', icon: 'pi pi-fw pi-share-alt', to: '/tree' }, - { label: 'Panel', icon: 'pi pi-fw pi-tablet', to: '/panel' }, - { label: 'Overlay', icon: 'pi pi-fw pi-clone', to: '/overlay' }, - { label: "Media", icon: "pi pi-fw pi-image", to: "/media" }, - { label: 'Menu', icon: 'pi pi-fw pi-bars', to: '/menu' }, - { label: 'Message', icon: 'pi pi-fw pi-comment', to: '/messages' }, - { label: 'File', icon: 'pi pi-fw pi-file', to: '/file' }, - { label: 'Chart', icon: 'pi pi-fw pi-chart-bar', to: '/chart' }, - { label: 'Misc', icon: 'pi pi-fw pi-circle-off', to: '/misc' }, - ] - }, - { - label: 'UI Blocks', - items: [ - { label: 'Free Blocks', icon: 'pi pi-fw pi-eye', to: '/blocks', badge: "NEW" }, - { label: 'All Blocks', icon: 'pi pi-fw pi-globe', url: 'https://www.primefaces.org/primeblocks-react' } - ] - }, - { - label: 'Icons', - items: [ - { label: 'PrimeIcons', icon: 'pi pi-fw pi-prime', to: '/icons' } - ] - }, - { - label: 'Pages', icon: 'pi pi-fw pi-clone', - items: [ - { label: 'Crud', icon: 'pi pi-fw pi-user-edit', to: '/crud' }, - { label: 'Timeline', icon: 'pi pi-fw pi-calendar', to: '/timeline' }, - { label: 'Empty', icon: 'pi pi-fw pi-circle-off', to: '/empty' } - ] - }, - { - label: 'Menu Hierarchy', icon: 'pi pi-fw pi-search', - items: [ - { - label: 'Submenu 1', icon: 'pi pi-fw pi-bookmark', - items: [ - { - label: 'Submenu 1.1', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 1.1.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.1.2', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.1.3', icon: 'pi pi-fw pi-bookmark' }, - ] - }, - { - label: 'Submenu 1.2', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 1.2.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 1.2.2', icon: 'pi pi-fw pi-bookmark' } - ] - }, - ] - }, - { - label: 'Submenu 2', icon: 'pi pi-fw pi-bookmark', - items: [ - { - label: 'Submenu 2.1', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 2.1.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.1.2', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.1.3', icon: 'pi pi-fw pi-bookmark' }, - ] - }, - { - label: 'Submenu 2.2', icon: 'pi pi-fw pi-bookmark', - items: [ - { label: 'Submenu 2.2.1', icon: 'pi pi-fw pi-bookmark' }, - { label: 'Submenu 2.2.2', icon: 'pi pi-fw pi-bookmark' } - ] - } - ] - } - ] - } - ]; - - const addClass = (element, className) => { - if (element.classList) - element.classList.add(className); - else - element.className += ' ' + className; - } - - const removeClass = (element, className) => { - if (element.classList) - element.classList.remove(className); - else - element.className = element.className.replace(new RegExp('(^|\\b)' + className.split(' ').join('|') + '(\\b|$)', 'gi'), ' '); - } - - const wrapperClass = classNames('layout-wrapper', { - 'layout-overlay': layoutMode === 'overlay', - 'layout-static': layoutMode === 'static', - 'layout-static-sidebar-inactive': staticMenuInactive && layoutMode === 'static', - 'layout-overlay-sidebar-active': overlayMenuActive && layoutMode === 'overlay', - 'layout-mobile-sidebar-active': mobileMenuActive, - 'p-input-filled': inputStyle === 'filled', - 'p-ripple-disabled': ripple === false, - 'layout-theme-light': layoutColorMode === 'light' - }); - - return ( -
    - - - - -
    - -
    - -
    -
    - } /> - - - - - - - - - - - - - - - - - } /> - - - - - - - - - - - - -
    - - -
    - - - - -
    -
    - - -
    - - ); - -} - -export default DashboardAdmin; diff --git a/web-ui/web-react/src/components/LocalStorage.js b/web-ui/web-react/src/components/LocalStorage.js deleted file mode 100644 index 37edbadb..00000000 --- a/web-ui/web-react/src/components/LocalStorage.js +++ /dev/null @@ -1,17 +0,0 @@ -import React, { useRef } from "react"; - -function LocalStorage(){ - const data=useRef(); - const handleClick=()=>{ - console.log(data.current.value,"initial value") - localStorage.setItem("inputValue",data.current.value) - } - console.log(localStorage.getItem("inputValue"),"****") - return( - <> - - - - ); -} -export default LocalStorage; \ No newline at end of file diff --git a/web-ui/web-react/src/pages/Menu.js b/web-ui/web-react/src/pages/Menu.js deleted file mode 100644 index 88758bdf..00000000 --- a/web-ui/web-react/src/pages/Menu.js +++ /dev/null @@ -1,35 +0,0 @@ -import React, { Component } from 'react'; -import Cookies from 'universal-cookie'; - -const cookies = new Cookies(); - -class Menu extends Component { - cerrarSesion=()=>{ - cookies.remove('id', {path: "/"}); - cookies.remove('email', {path: "/"}); - cookies.remove('name', {path: "/"}); - window.location.href='/login'; - } - - componentDidMount() { - if(!cookies.get('email')){ - window.location.href="./login"; - } - } - - render() { - console.log('id: '+ cookies.get('id')); - console.log('name: '+cookies.get('name')); - console.log('email: '+cookies.get('email')); - return ( -
    - Menu Principal - -
    - -
    - ); - } -} - -export default Menu; \ No newline at end of file diff --git a/web-ui/web-react/src/routes/Routes.js b/web-ui/web-react/src/routes/Routes.js deleted file mode 100644 index cb0800ec..00000000 --- a/web-ui/web-react/src/routes/Routes.js +++ /dev/null @@ -1,39 +0,0 @@ -import React, { useEffect, useRef } from 'react'; -import { BrowserRouter, Switch, Route } from 'react-router-dom'; -import App from '../App'; -import LoginLocalStorage from '../components/LoginLocalStorage'; -import MenuAdmin from '../components/MenuAdmin'; -import Menu from '../pages/Menu'; -import MenuAdminCommunity from '../components/MenuAdminCommunity'; -import { useCookies } from "react-cookie"; - - -function Routes() { - - const [cookies, setCookies] = useCookies(); - - - function getMenu() { - console.log(cookies.type) - switch(cookies.type) { - case '1': - return - case '2': - return - - } - } - - - return ( - - - - - - - - ); -} - -export default Routes; \ No newline at end of file From 274efecee40afa6438fac3c159eb4fd7ed41ca92 Mon Sep 17 00:00:00 2001 From: Mariela Date: Fri, 12 Aug 2022 19:22:08 -0600 Subject: [PATCH 14/16] modified modify --- web-ui/web-react/src/components/LogIn.js | 232 ++++++++++++++++++++--- 1 file changed, 203 insertions(+), 29 deletions(-) diff --git a/web-ui/web-react/src/components/LogIn.js b/web-ui/web-react/src/components/LogIn.js index 8777a82f..b70037de 100644 --- a/web-ui/web-react/src/components/LogIn.js +++ b/web-ui/web-react/src/components/LogIn.js @@ -1,45 +1,219 @@ -import React, { useState } from 'react'; +import React, { Component, Fragment, useRef } from 'react'; +import Cookies from 'universal-cookie'; import { InputText } from 'primereact/inputtext'; +import { Button } from 'primereact/button'; -const LogIn = () => { +const baseUrl = "http://localhost:4000/user/loginUser"; +const cookies = new Cookies(); - const [email, setEmail] = useState(""); - const [password, setPassword] = useState(""); +class Login extends Component { + constructor(props) { + super(props); + this.state = { + form: { + email: '', + password: '' + }, + errorEmail: false, + errorPassword: false, + logged: null + } + } + handleChange = async e => { + await this.setState({ + form: { + ...this.state.form, + [e.target.name]: e.target.value + } + }); + } - const iniciarSesion = () =>{ + validaciones = (data) => { + let error = true; + if (data.email == '') { + this.setState({ + errorEmail: true + }) + error = true; + } else { + this.setState({ + errorEmail: false + }) + } + if (data.password == '') { + this.setState({ + errorPassword: true + }) + error = true; + } else { + this.setState({ + errorPassword: false + }) + } + + return error; } - + iniciarSesion = async () => { + const data = { + email: this.state.form.email, + password: this.state.form.password + } - return ( -
    -
    -
    -
    Iniciar Sesión
    -
    -
    - - + console.log(data); + + if (!this.validaciones(data)) { + this.setState({ + email: true, + password: true + }) + await fetch(baseUrl, { + cache: 'no-cache', + method: 'POST', + body: JSON.stringify(data), + headers: { + 'Content-Type': 'application/json' + } + }) + .then(response => { + if (response.status != 201) + console.log('Ocurrió un error con el servicio: ' + response.status); + else return response.json(); + }) + .then(response => { + console.log(response.message); + + if (response.message) { + const user = response.message; + cookies.set('id', user._id, { path: "/" }); + cookies.set('name', user.name, { path: "/" }); + cookies.set('email', user.email, { path: "/" }); + cookies.set('type', user.user_type, { path: "/" }); + if (user.user_type != '1') { + cookies.set('community_id', user.community_id, { path: "/" }); + } + // alert(`Bienvenido ${user.name}`); + document.getElementById('notification').hidden = true; + document.getElementById('notification2').hidden = false; + + document.getElementById("message2").innerHTML = `Bienvenido ${user.name}`; + + window.location.href = "/"; + } else { + document.getElementById('notification2').hidden = true; + document.getElementById('notification').hidden = false; + + //alert('El usuario o la contraseña no son correctos'); + document.getElementById("message").innerHTML = "El usuario o la contraseña son incorrectos"; + } + }) + .catch(error => { + console.log(error); + }) + } + } + + componentDidMount() { + if (cookies.get('email')) { + window.location.href = "/"; + } + } + + renderErrorMessage = (name) => + name === this.state.errorMessages.name && ( +
    {this.state.errorMessages.message}
    + ); + + errors = { + email: "Correo requerido", + pass: "Contraseña requerida" + }; + + render() { + return ( + + + + +
    +
    + -
    - - + - {/* */} + +
    +
    + +
    +
    Iniciar Sesión
    +
    + +
    + +
    +
    + + + + +
    + {this.state.errorEmail && ( + Correo electrónico es requerido + )} + +
    +
    +
    + +
    +
    + + + + +
    + {this.state.errorPassword && ( + Contraseña es requerida + )} +
    +
    + + +
    +
    -
    -
    - - -
    +
    - {/* */} -
    - ); -}; -export default LogIn \ No newline at end of file + + ); + } +} + +export default Login; \ No newline at end of file From 4bbe8dfea54038efb338052d695ab53fcd513128 Mon Sep 17 00:00:00 2001 From: Mariela Date: Fri, 12 Aug 2022 21:01:18 -0600 Subject: [PATCH 15/16] add pagina 404 --- web-ui/web-react/src/App.js | 122 ++++++--- .../src/components/{LogIn.js => LogInUser.js} | 37 +-- .../src/components/LoginLocalStorage.js | 231 ------------------ web-ui/web-react/src/components/MenuAdmin.js | 102 -------- .../src/components/MenuAdminCommunity.js | 119 --------- web-ui/web-react/src/components/Page404.js | 20 ++ 6 files changed, 131 insertions(+), 500 deletions(-) rename web-ui/web-react/src/components/{LogIn.js => LogInUser.js} (86%) delete mode 100644 web-ui/web-react/src/components/LoginLocalStorage.js delete mode 100644 web-ui/web-react/src/components/MenuAdmin.js delete mode 100644 web-ui/web-react/src/components/MenuAdminCommunity.js create mode 100644 web-ui/web-react/src/components/Page404.js diff --git a/web-ui/web-react/src/App.js b/web-ui/web-react/src/App.js index 3381887e..ef05324a 100644 --- a/web-ui/web-react/src/App.js +++ b/web-ui/web-react/src/App.js @@ -53,8 +53,8 @@ import './App.scss'; import { PrimeIcons } from 'primereact/api'; import AreasComunes from './components/AreasComunes'; import { useCookies } from "react-cookie"; -import Login from './components/Login'; - +import LogInUser from './components/LogInUser'; +import Page404 from './components/Page404' const App = () => { @@ -69,6 +69,7 @@ const App = () => { const copyTooltipRef = useRef(); const location = useLocation(); const [cookies, setCookies] = useCookies(); + const [logged, setLogged] = useState() PrimeReact.ripple = true; @@ -89,6 +90,12 @@ const App = () => { copyTooltipRef.current.updateTargetEvents(); }, [location]); + + + + + + const onInputStyleChange = (inputStyle) => { setInputStyle(inputStyle); }; @@ -405,6 +412,9 @@ const App = () => { 'layout-theme-light': layoutColorMode === 'light', }); + + + return ( @@ -424,43 +434,89 @@ const App = () => {
    - - } /> + {(() => { + if (!cookies.email) { + return ( + <> + + + + + + ) + } else { + + if (cookies.type == '1') { + return ( + <> + } /> + + + + + + + ) + + } else if (cookies.type == '2') { + return ( + <> + } /> + + + + + + + ) + } else { + return ( + + ) + } + + + return ( + <> + } /> + + + + + + + + + + + + + + + {/**/} + + + } /> + + + + + + + + + + ) + + } + })()} - - - - - - - - - - - - - - {/**/} - - - } /> - - - - - - - - - - -
    - +
    diff --git a/web-ui/web-react/src/components/LogIn.js b/web-ui/web-react/src/components/LogInUser.js similarity index 86% rename from web-ui/web-react/src/components/LogIn.js rename to web-ui/web-react/src/components/LogInUser.js index b70037de..2d25e73e 100644 --- a/web-ui/web-react/src/components/LogIn.js +++ b/web-ui/web-react/src/components/LogInUser.js @@ -2,11 +2,12 @@ import React, { Component, Fragment, useRef } from 'react'; import Cookies from 'universal-cookie'; import { InputText } from 'primereact/inputtext'; import { Button } from 'primereact/button'; +import { Toast } from 'primereact/toast'; const baseUrl = "http://localhost:4000/user/loginUser"; const cookies = new Cookies(); -class Login extends Component { +class LogInUser extends Component { constructor(props) { super(props); this.state = { @@ -30,7 +31,7 @@ class Login extends Component { } validaciones = (data) => { - let error = true; + let error = false; if (data.email == '') { this.setState({ errorEmail: true @@ -87,20 +88,26 @@ class Login extends Component { if (response.message) { const user = response.message; - cookies.set('id', user._id, { path: "/" }); - cookies.set('name', user.name, { path: "/" }); - cookies.set('email', user.email, { path: "/" }); - cookies.set('type', user.user_type, { path: "/" }); - if (user.user_type != '1') { - cookies.set('community_id', user.community_id, { path: "/" }); + + if(user.user_type == '1' || user.user_type == '2'){ + cookies.set('id', user._id, { path: "/" }); + cookies.set('name', user.name, { path: "/" }); + cookies.set('email', user.email, { path: "/" }); + cookies.set('type', user.user_type, { path: "/" }); + if (user.user_type != '1') { + cookies.set('community_id', user.community_id, { path: "/" }); + } + // alert(`Bienvenido ${user.name}`); + document.getElementById('notification').hidden = true; + document.getElementById('notification2').hidden = false; + + document.getElementById("message2").innerHTML = `Bienvenido ${user.name}`; + + window.location.href = "/"; } - // alert(`Bienvenido ${user.name}`); - document.getElementById('notification').hidden = true; - document.getElementById('notification2').hidden = false; + window.location.href = "/page404"; - document.getElementById("message2").innerHTML = `Bienvenido ${user.name}`; - - window.location.href = "/"; + } else { document.getElementById('notification2').hidden = true; document.getElementById('notification').hidden = false; @@ -216,4 +223,4 @@ class Login extends Component { } } -export default Login; \ No newline at end of file +export default LogInUser; \ No newline at end of file diff --git a/web-ui/web-react/src/components/LoginLocalStorage.js b/web-ui/web-react/src/components/LoginLocalStorage.js deleted file mode 100644 index fbd74f0f..00000000 --- a/web-ui/web-react/src/components/LoginLocalStorage.js +++ /dev/null @@ -1,231 +0,0 @@ -import DashboardAdmin from "./DashboardAdmin"; -import React, { Component, Fragment, useRef } from 'react'; -import Cookies from 'universal-cookie'; -import { InputText } from 'primereact/inputtext'; -import { Button } from 'primereact/button'; -import { Toast } from 'primereact/toast'; - -const baseUrl = "http://localhost:4000/user/loginUser"; -const cookies = new Cookies(); - -class LoginLocalStorage extends Component { - constructor(props) { - super(props); - this.state = { - form: { - email: '', - password: '' - }, - errorEmail: false, - errorPassword: false, - logged: null - } - } - - handleChange = async e => { - await this.setState({ - form: { - ...this.state.form, - [e.target.name]: e.target.value - } - }); - } - - validaciones = (data) => { - let error = true; - if (data.email == '') { - this.setState({ - errorEmail: true - }) - error = true; - } else { - this.setState({ - errorEmail: false - }) - } - if (data.password == '') { - this.setState({ - errorPassword: true - }) - error = true; - } else { - this.setState({ - errorPassword: false - }) - } - - return error; - - } - - iniciarSesion = async () => { - const data = { - email: this.state.form.email, - password: this.state.form.password - } - - console.log(data); - - if (!this.validaciones(data)) { - this.setState({ - email: true, - password: true - }) - await fetch(baseUrl, { - cache: 'no-cache', - method: 'POST', - body: JSON.stringify(data), - headers: { - 'Content-Type': 'application/json' - } - }) - .then(response => { - if (response.status != 201) - console.log('Ocurrió un error con el servicio: ' + response.status); - else return response.json(); - }) - .then(response => { - console.log(response.message); - - if (response.message) { - const user = response.message; - cookies.set('id', user._id, { path: "/" }); - cookies.set('name', user.name, { path: "/" }); - cookies.set('email', user.email, { path: "/" }); - cookies.set('type', user.user_type, { path: "/" }); - if (user.user_type != '1') { - cookies.set('community_id', user.community_id, { path: "/" }); - } - // alert(`Bienvenido ${user.name}`); - document.getElementById('notification').hidden = true; - document.getElementById('notification2').hidden = false; - - - document.getElementById("message2").innerHTML = `Bienvenido ${user.name}`; - - //document.getElementById("message").remove('p-message p-message-error') - // document.getElementById("message").append(`Bienvenido ${user.name}`); - // document.getElementById("message").classList('p-message p-message-success') - // window.location.href = "/"; - - - } else { - document.getElementById('notification2').hidden = true; - document.getElementById('notification').hidden = false; - - - //alert('El usuario o la contraseña no son correctos'); - document.getElementById("message").innerHTML = "El usuario o la contraseña son incorrectos"; - // document.getElementById("message").remove('p-message p-message-success') - // document.getElementById("message").append('El usuario o la contraseña son incorrectos'); - // document.getElementById("message").add.className('p-message p-message-error') - } - }) - .catch(error => { - console.log(error); - }) - } - } - - componentDidMount() { - if (cookies.get('email')) { - window.location.href = "/"; - } - } - - renderErrorMessage = (name) => - name === this.state.errorMessages.name && ( -
    {this.state.errorMessages.message}
    - ); - - errors = { - email: "Correo requerido", - pass: "Contraseña requerida" - }; - - render() { - return ( - - - - -
    -
    - - - - -
    -
    - -
    -
    Iniciar Sesión
    -
    - -
    - -
    -
    - - - - -
    - {this.state.errorEmail && ( - Correo electrónico es requerido - )} - -
    -
    -
    - -
    -
    - - - - -
    - {this.state.errorPassword && ( - Contraseña es requerida - )} -
    -
    - - -
    -
    -
    -
    -
    - - - - ); - } -} - -export default LoginLocalStorage; \ No newline at end of file diff --git a/web-ui/web-react/src/components/MenuAdmin.js b/web-ui/web-react/src/components/MenuAdmin.js deleted file mode 100644 index 334ccf04..00000000 --- a/web-ui/web-react/src/components/MenuAdmin.js +++ /dev/null @@ -1,102 +0,0 @@ -import React, { Component } from 'react'; -import Cookies from 'universal-cookie'; -import AdministradoresComunidad from '../components/AdministradoresComunidad'; -import AdministradoresSistema from '../components/AdministradoresSistema'; -import Communities from '../components/ComunidadViviendas'; -import Dashboard from '../templates/Dashboard'; -import { BrowserRouter, Switch, Route } from 'react-router-dom'; -import { AppMenu } from '../AppMenu'; -import { CSSTransition } from 'react-transition-group'; - -const cookies = new Cookies(); - -const menu = [ - { - label: 'Home', - items: [ - { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, - { label: 'Administradores del sistema', icon: 'pi pi-fw pi-id-card', to: '/administradoresSistema' }, - { label: 'Administradores de comunidad', icon: 'pi pi-fw pi-id-card', to: '/administradoresComunidad' }, - { label: 'Comunidadades', icon: 'pi pi-fw pi-id-card', to: '/comunidadesViviendas' }, - ] - }, -]; - -class MenuAdmin extends Component { - - constructor(){ - super() - this.state = { - layoutColorMode: 'light', - layoutMode: 'static', - menuClick: false, - mobileTopbarMenuClick: false, - overlayMenuActive: false, - mobileMenuActive: false - } - - } - - onSidebarClick = () => { - this.setState({ - menuClick: true - }) - - } - - onMenuItemClick = (event) => { - if (!event.item.items) { - this.state.overlayMenuActive = false; - this.state.mobileMenuActive = false; - this.setState({ - overlayMenuActive: true, - mobileMenuActive:false - }) - - } - } - - cerrarSesion = () => { - cookies.remove('id', { path: "/" }); - cookies.remove('email', { path: "/" }); - cookies.remove('name', { path: "/" }); - cookies.remove('type', { path: "/" }); - window.location.href = '/login'; - } - - componentDidMount() { - if (!cookies.get('email')) { - window.location.href = "/login"; - } - } - - render() { - - return ( -
    - Menu Principal -
    - - - -
    - -
    -
    - } /> - - - -
    - -
    -
    - -
    -
    -
    - ); - } -} - -export default MenuAdmin; \ No newline at end of file diff --git a/web-ui/web-react/src/components/MenuAdminCommunity.js b/web-ui/web-react/src/components/MenuAdminCommunity.js deleted file mode 100644 index db982561..00000000 --- a/web-ui/web-react/src/components/MenuAdminCommunity.js +++ /dev/null @@ -1,119 +0,0 @@ -import React, { Component } from 'react'; -import Cookies from 'universal-cookie'; -import Inquilinos from './Inquilinos'; -import GuardasSeguridad from './GuardasSeguridad'; -import Dashboard from '../templates/Dashboard'; -import { BrowserRouter, Switch, Route } from 'react-router-dom'; -import { AppMenu } from '../AppMenu'; - -const cookies = new Cookies(); - -const menu = [ - { - label: 'Home', - items: [ - { label: 'Dashboard', icon: 'pi pi-fw pi-home', to: '/' }, - { label: 'Inquilinos', icon: 'pi pi-fw pi-id-card', to: '/inquilinos' }, - { label: 'Guardas de seguridad', icon: 'pi pi-fw pi-id-card', to: '/guardasSeguridad' }, - ] - }, -]; - -class MenuAdminCommunity extends Component { - - constructor() { - super() - this.state = { - layoutColorMode: 'light', - layoutMode: 'static', - menuClick: false, - mobileTopbarMenuClick: false, - overlayMenuActive: false, - mobileMenuActive: false - } - - } - - onSidebarClick = () => { - this.setState({ - menuClick: true - }) - - } - - onMenuItemClick = (event) => { - if (!event.item.items) { - this.setState({ - overlayMenuActive: false, - mobileMenuActive: false - }) - - } - } - - cerrarSesion = () => { - cookies.remove('id', { path: "/" }); - cookies.remove('email', { path: "/" }); - cookies.remove('name', { path: "/" }); - cookies.remove('type', { path: "/" }); - cookies.remove('community_id', { path: "/" }); - window.location.href = '/login'; - } - - componentDidMount() { - if (!cookies.get('email')) { - window.location.href = "/login"; - } - } - - - onWrapperClick = (event) => { - if (!this.state.menuClick) { - this.setState({ - overlayMenuActive: false, - mobileMenuActive: false - }) - } - - if (!this.state.mobileTopbarMenuClick) { - this.setState({ - mobileTopbarMenuClick: false, - }) - } - - this.setState({ - mobileTopbarMenuClick: false, - menuClick: false - }) - } - - render() { - - return ( - -
    - -
    - Menu Principal -
    - - - -
    - -
    -
    - } /> - - -
    - -
    -
    -
    -
    - ); - } -} - -export default MenuAdminCommunity; \ No newline at end of file diff --git a/web-ui/web-react/src/components/Page404.js b/web-ui/web-react/src/components/Page404.js new file mode 100644 index 00000000..f19e4881 --- /dev/null +++ b/web-ui/web-react/src/components/Page404.js @@ -0,0 +1,20 @@ +import React from 'react'; + + +const Page404 = () => { + + return ( +
    +
    +
    +
    +
    404
    +
    No se encuentra la página
    +
    +
    +
    +
    + ) +} + +export default React.memo(Page404) From 4b08969ebe5933ca3fc308d5d6da584d39825c02 Mon Sep 17 00:00:00 2001 From: Maria Sanchez Date: Fri, 12 Aug 2022 21:56:58 -0600 Subject: [PATCH 16/16] navigation and more components --- mobile-ui/components/Home.js | 5 +-- mobile-ui/components/LogIn.js | 32 +++++++++------ mobile-ui/components/Profile.js | 0 mobile-ui/components/RecoverPassword.js | 53 ++++++++++++++++++++++--- 4 files changed, 69 insertions(+), 21 deletions(-) create mode 100644 mobile-ui/components/Profile.js diff --git a/mobile-ui/components/Home.js b/mobile-ui/components/Home.js index 04070bb0..6f35a009 100644 --- a/mobile-ui/components/Home.js +++ b/mobile-ui/components/Home.js @@ -2,7 +2,6 @@ import React from "react"; import { Text, HStack, - NativeBaseProvider, IconButton, Box, StatusBar, @@ -14,10 +13,10 @@ import { export default function Home(){ return ( -
    +
    - + } /> diff --git a/mobile-ui/components/LogIn.js b/mobile-ui/components/LogIn.js index ed542d83..c5b5e76d 100644 --- a/mobile-ui/components/LogIn.js +++ b/mobile-ui/components/LogIn.js @@ -2,22 +2,20 @@ import React from "react"; import { Text, Link, - HStack, + View, Center, Heading, - Switch, - useColorMode, - NativeBaseProvider, - extendTheme, VStack, Box, FormControl, Input, Button, - Image + Image, + TextInput } from "native-base"; import logo from "../assets/logo-katoikia.png"; - +import { Entypo } from '@expo/vector-icons'; +import { MaterialCommunityIcons } from '@expo/vector-icons'; export default function LogIn({navigation}) { return ( @@ -54,12 +52,20 @@ export default function LogIn({navigation}) { - Correo Electrónico - + Correo Electrónico + + + + + + - Contraseña - + Contraseña + + + + navigation.navigate('Password')} + > + Recuperar contraseña @@ -82,7 +90,5 @@ export default function LogIn({navigation}) {
    - - ); } \ No newline at end of file diff --git a/mobile-ui/components/Profile.js b/mobile-ui/components/Profile.js new file mode 100644 index 00000000..e69de29b diff --git a/mobile-ui/components/RecoverPassword.js b/mobile-ui/components/RecoverPassword.js index 62dce460..a16522f5 100644 --- a/mobile-ui/components/RecoverPassword.js +++ b/mobile-ui/components/RecoverPassword.js @@ -1,13 +1,56 @@ -import { Center } from "native-base"; import React from "react"; - +import { + Text, + Link, + Center, + Heading, + VStack, + Box, + FormControl, + Input, + Button + } from "native-base"; export default function RecoverPassword () { return ( +
    + + + Recupere su contraseña + + + Se le enviaran las instrucciones al correo electrónico + -
    + + + Correo Electrónico + + + + + + + +
    - -
    ) } \ No newline at end of file