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() {
-
+
);