Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
P
PortalMEC-React
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Harbor Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PortalMEC
PortalMEC-React
Commits
b0abf398
Commit
b0abf398
authored
4 years ago
by
lfr20
Browse files
Options
Downloads
Patches
Plain Diff
Builded a navigations system
parent
dd75e632
No related branches found
No related tags found
4 merge requests
!57
Merge of develop into master
,
!56
Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...
,
!40
merge admin into develop
,
!37
Merge sistema_admin into Update_Admin_System
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Admin/Pages/Pages/Admin.js
+49
-22
49 additions, 22 deletions
src/Admin/Pages/Pages/Admin.js
with
49 additions
and
22 deletions
src/Admin/Pages/Pages/Admin.js
+
49
−
22
View file @
b0abf398
...
@@ -28,9 +28,14 @@ import ListItemText from '@material-ui/core/ListItemText';
...
@@ -28,9 +28,14 @@ import ListItemText from '@material-ui/core/ListItemText';
import
MenuIcon
from
'
@material-ui/icons/Menu
'
;
import
MenuIcon
from
'
@material-ui/icons/Menu
'
;
import
Fab
from
'
@material-ui/core/Fab
'
;
import
Fab
from
'
@material-ui/core/Fab
'
;
import
{
TabsItens
}
from
'
../AdminLabelTabs/LabelTabs
'
;
import
{
TabsItens
}
from
'
../AdminLabelTabs/LabelTabs
'
;
import
DisplayContent
from
'
../../Components/Components/DisplayContent
'
;
import
{
Store
}
from
'
../../../Store
'
;
import
{
Store
}
from
'
../../../Store
'
;
import
{
BrowserRouter
,
Switch
,
Route
,
Link
}
from
'
react-router-dom
'
;
import
Unauthorized
from
'
../../Components/Components/Unauthorized
'
;
import
Unauthorized
from
'
../../Components/Components/Unauthorized
'
;
import
Welcome
from
'
../../Components/Components/Welcome
'
;
import
NoteVariables
from
'
./SubPages/NoteVariables
'
;
import
Institution
from
'
./SubPages/Institutions
'
;
import
SendEmail
from
'
./SubPages/SendEmail
'
;
import
Inframe
from
'
./SubPages/Inframe
'
;
const
useStyles
=
makeStyles
({
const
useStyles
=
makeStyles
({
list
:
{
list
:
{
...
@@ -84,40 +89,62 @@ export default function Admin() {
...
@@ -84,40 +89,62 @@ export default function Admin() {
>
>
<
List
>
<
List
>
{
TabsItens
.
map
((
text
,
index
)
=>
(
{
TabsItens
.
map
((
text
,
index
)
=>
(
<
ListItem
button
key
=
{
text
.
label
}
onClick
=
{()
=>
setIndexIcon
(
index
)}
>
<
Link
to
=
{
text
.
href
}
key
=
{
text
.
label
}
>
<
IconButton
>
<
ListItem
button
key
=
{
text
.
label
}
onClick
=
{()
=>
setIndexIcon
(
index
)}
>
<
DisplayIcon
i
=
{
index
}
/
>
<
IconButton
>
<
/IconButton
>
<
DisplayIcon
i
=
{
index
}
/
>
<
ListItemText
primary
=
{
text
.
label
}
/
>
<
/IconButton
>
<
/ListItem
>
<
ListItemText
primary
=
{
text
.
label
}
/
>
<
/ListItem
>
<
/Link
>
))}
))}
<
/List
>
<
/List
>
<
/div
>
<
/div
>
);
);
return
(
return
(
<
div
>
<
BrowserRouter
>
{
/**************** Begin of the Drawer ****************/
}
<
Switch
>
<
div
style
=
{{
paddingTop
:
'
2em
'
,
paddingLeft
:
'
2em
'
,
paddingRight
:
'
2em
'
,
paddingBottom
:
'
2em
'
,
backgroundColor
:
'
#D3D3D3
'
}}
>
<
Route
path
=
'
/admin/home
'
component
=
{
Welcome
}
/
>
<
Route
path
=
'
/admin/intitution
'
component
=
{
Institution
}
/
>
<
Route
path
=
'
/admin/sendEmail
'
component
=
{
SendEmail
}
/
>
<
Route
path
=
'
/admin/inframe
'
component
=
{
Inframe
}
/
>
<
Route
path
=
'
/admin/noteVar
'
component
=
{
NoteVariables
}
/
>
<
/div
>
<
/Switch
>
<
React
.
Fragment
>
<
React
.
Fragment
>
<
Drawer
anchor
=
{
'
left
'
}
open
=
{
State
[
'
left
'
]}
onClose
=
{
toggleDrawer
(
'
left
'
,
false
)}
>
<
Drawer
anchor
=
{
'
left
'
}
open
=
{
State
[
'
left
'
]}
onClose
=
{
toggleDrawer
(
'
left
'
,
false
)}
>
{
list
(
'
left
'
)}
{
list
(
'
left
'
)}
<
/Drawer
>
<
/Drawer
>
<
/React.Fragment
>
<
/React.Fragment
>
{
/**************** End of the Drawer****************/
}
{
/**************** Begin of the Content ****************/
}
<
div
style
=
{{
paddingTop
:
'
2em
'
,
paddingLeft
:
'
2em
'
,
paddingRight
:
'
2em
'
,
paddingBottom
:
'
2em
'
,
backgroundColor
:
'
#D3D3D3
'
}}
>
<
DisplayContent
i
=
{
IndexIcon
}
/
>
<
/div
>
{
/**************** End of the Content ****************/
}
{
/**************** FLoating action Button ****************/
}
<
Fab
color
=
"
primary
"
aria
-
label
=
"
add
"
style
=
{
fab
}
onClick
=
{
toggleDrawer
(
'
left
'
,
true
)}
>
<
Fab
color
=
"
primary
"
aria
-
label
=
"
add
"
style
=
{
fab
}
onClick
=
{
toggleDrawer
(
'
left
'
,
true
)}
>
<
MenuIcon
/>
<
MenuIcon
/>
<
/Fab
>
<
/Fab
>
<
/div
>
<
/BrowserRouter
>
// <div>
// {/**************** Begin of the Drawer ****************/}
// <React.Fragment>
// <Drawer anchor={'left'} open={State['left']} onClose={toggleDrawer('left', false)}>
// {list('left')}
// </Drawer>
// </React.Fragment>
// {/**************** End of the Drawer****************/}
// {/**************** Begin of the Content ****************/}
// <div style={{ paddingTop: '2em', paddingLeft: '2em', paddingRight: '2em', paddingBottom: '2em', backgroundColor: ' #D3D3D3' }}>
// <DisplayContent i={IndexIcon} />
// </div>
// {/**************** End of the Content ****************/}
// {/**************** FLoating action Button ****************/}
// <Fab color="primary" aria-label="add" style={fab} onClick={toggleDrawer('left', true)}>
// <MenuIcon />
// </Fab>
// </div>
);
);
// if (state.userIsLoggedIn) {
// if (state.userIsLoggedIn) {
// var obj = { ...(state.currentUser.roles)[0] }
// var obj = { ...(state.currentUser.roles)[0] }
// if (obj.id === 3 || obj.id === 7) {
// if (obj.id === 3 || obj.id === 7) {
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment