diff --git a/.gitignore b/.gitignore
index e2e665b8..7ef972d1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -9,4 +9,5 @@ npm-debug.log
.eslintcache
/.env
/coverage
+/test
build
diff --git a/src/js/common/components/Drawer/Drawer.jsx b/src/js/common/components/Drawer/Drawer.jsx
index bf76a6a6..8f03b801 100644
--- a/src/js/common/components/Drawer/Drawer.jsx
+++ b/src/js/common/components/Drawer/Drawer.jsx
@@ -43,34 +43,38 @@ const DrawerComponent = props => {
- {primaryItems.map(item => (
-
-
-
- ))}
+ {primaryItems.map(item =>
+ item.visible ? (
+
+
+
+ ) : null,
+ )}
- {secondaryItems.map(item => (
-
-
-
- ))}
+ {secondaryItems.map(item =>
+ item.visible ? (
+
+
+
+ ) : null,
+ )}
);
diff --git a/src/js/common/components/Drawer/Drawer.test.js b/src/js/common/components/Drawer/Drawer.test.js
index a31a9841..09e28111 100644
--- a/src/js/common/components/Drawer/Drawer.test.js
+++ b/src/js/common/components/Drawer/Drawer.test.js
@@ -17,11 +17,13 @@ const initialProps = {
isOpen: false,
primaryItems: [
{
+ visible: true,
label: 'Dispositivos',
path: '/devices',
icon: DevicesOther,
},
{
+ visible: true,
label: 'Modelos',
path: '/templates',
icon: FilterNone,
@@ -29,11 +31,13 @@ const initialProps = {
],
secondaryItems: [
{
+ visible: true,
label: 'Ajuda',
path: '/help',
icon: HelpOutline,
},
{
+ visible: true,
label: 'Sair',
path: '/logout',
icon: ExitToApp,
diff --git a/src/js/common/menu/primaryItems.js b/src/js/common/menu/primaryItems.js
index c5a92a18..9d2078bf 100644
--- a/src/js/common/menu/primaryItems.js
+++ b/src/js/common/menu/primaryItems.js
@@ -10,18 +10,21 @@ import {
export default [
{
+ visible: false,
i18n: 'devices',
label: 'Dispositivos',
path: '/devices',
icon: DevicesOther,
},
{
+ visible: false,
i18n: 'templates',
label: 'Modelos',
path: '/templates',
icon: FilterNone,
},
{
+ visible: false,
i18n: 'flows',
label: 'Fluxos',
path: '/flow',
@@ -34,18 +37,21 @@ export default [
icon: NotificationImportant,
},
{
+ visible: false,
i18n: 'users',
label: 'Usuários',
path: '/users',
icon: People,
},
{
+ visible: false,
i18n: 'profiles',
label: 'Perfis',
path: '/profiles',
icon: SupervisedUserCircle,
},
{
+ visible: true,
i18n: 'dashboard',
label: 'Dashboard',
path: '/dashboard',
diff --git a/src/js/common/menu/secondaryItems.js b/src/js/common/menu/secondaryItems.js
index 609e4923..9c08dea1 100644
--- a/src/js/common/menu/secondaryItems.js
+++ b/src/js/common/menu/secondaryItems.js
@@ -2,12 +2,14 @@ import { ExitToApp, HelpOutline } from '@material-ui/icons';
export default [
{
+ visible: false,
i18n: 'help',
label: 'Ajuda',
path: '/help',
icon: HelpOutline,
},
{
+ visible: true,
i18n: 'exit',
label: 'Sair',
path: '/logout',