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
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
995d1829
Commit
995d1829
authored
4 years ago
by
Lucas Eduardo Schoenfelder
Browse files
Options
Downloads
Patches
Plain Diff
Replace UserPage.js
parent
989f0f5c
No related branches found
No related tags found
2 merge requests
!57
Merge of develop into master
,
!56
Fixed buttons reportar, seguir, compartilhar, guardar and entrar (in comments...
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/Pages/UserPage.js
+14
-125
14 additions, 125 deletions
src/Pages/UserPage.js
with
14 additions
and
125 deletions
src/Pages/UserPage.js
+
14
−
125
View file @
995d1829
...
@@ -32,11 +32,11 @@ import Tabs from '@material-ui/core/Tabs';
...
@@ -32,11 +32,11 @@ import Tabs from '@material-ui/core/Tabs';
import
Tab
from
'
@material-ui/core/Tab
'
;
import
Tab
from
'
@material-ui/core/Tab
'
;
import
Paper
from
'
@material-ui/core/Paper
'
;
import
Paper
from
'
@material-ui/core/Paper
'
;
import
TabPanelAtividades
from
'
../Components/TabPanels/TabPanelAtividades.js
'
import
TabPanelAtividades
from
'
../Components/TabPanels/
UserPage
Tab
s/
PanelAtividades.js
'
import
TabPanelMeusRecursos
from
'
../Components/TabPanels/TabPanelMeusRecursos.js
'
import
TabPanelMeusRecursos
from
'
../Components/TabPanels/
UserPage
Tab
s/
PanelMeusRecursos.js
'
import
TabPanelFavoritos
from
'
../Components/TabPanels/TabPanelFavoritos.js
'
import
TabPanelFavoritos
from
'
../Components/TabPanels/
UserPage
Tab
s/
PanelFavoritos.js
'
import
TabPanelColecoes
from
'
../Components/TabPanels/TabPanelColecoes.js
'
import
TabPanelColecoes
from
'
../Components/TabPanels/
UserPage
Tab
s/
PanelColecoes.js
'
import
TabPanelRede
from
'
../Components/TabPanels/TabPanelRede.js
'
import
TabPanelRede
from
'
../Components/TabPanels/
UserPage
Tab
s/
PanelRede.js
'
import
TabPanelStatusEConquistas
from
'
../Components/TabPanels/TabPanelStatusEConquistas.js
'
import
TabPanelStatusEConquistas
from
'
../Components/TabPanels/TabPanelStatusEConquistas.js
'
import
TabPanelCuradoria
from
'
../Components/TabPanels/UserPageTabs/PanelCuradoria.js
'
import
TabPanelCuradoria
from
'
../Components/TabPanels/UserPageTabs/PanelCuradoria.js
'
...
@@ -162,7 +162,7 @@ export default function UserPage (props){
...
@@ -162,7 +162,7 @@ export default function UserPage (props){
Number
(
props
.
location
.
state
)
||
0
Number
(
props
.
location
.
state
)
||
0
);
);
const
[
tabs
,
setTabs
]
=
useState
([
const
[
tabs
,
setTabs
]
=
useState
([
'
Atividades
'
,
'
Meus Recursos
'
,
'
Favoritos
'
,
'
Coleções
'
,
'
Rede
'
'
Atividades
'
,
'
Status e Conquistas
'
,
'
Meus Recursos
'
,
'
Favoritos
'
,
'
Coleções
'
,
'
Rede
'
])
])
{
/*sessionStorage.getItem('@portalmec/username')*/
}
{
/*sessionStorage.getItem('@portalmec/username')*/
}
const
user
=
state
.
currentUser
.
username
const
user
=
state
.
currentUser
.
username
...
@@ -206,7 +206,7 @@ export default function UserPage (props){
...
@@ -206,7 +206,7 @@ export default function UserPage (props){
})
})
if
((
response
.
data
.
role_ids
.
includes
(
4
)))
{
if
((
response
.
data
.
role_ids
.
includes
(
4
)))
{
setTabs
([
setTabs
([
'
Atividades
'
,
'
Meus Recursos
'
,
'
Favoritos
'
,
'
Coleções
'
,
'
Rede
'
,
'
Curadoria
'
'
Atividades
'
,
'
Status e Conquistas
'
,
'
Meus Recursos
'
,
'
Favoritos
'
,
'
Coleções
'
,
'
Rede
'
,
'
Curadoria
'
])
])
}
}
},
},
...
@@ -246,119 +246,7 @@ export default function UserPage (props){
...
@@ -246,119 +246,7 @@ export default function UserPage (props){
handleClose
=
{
modalControl
}
handleClose
=
{
modalControl
}
userAvatar
=
{
state
.
currentUser
.
userAvatar
}
userAvatar
=
{
state
.
currentUser
.
userAvatar
}
/
>
/
>
<<<<<<<
src
/
Pages
/
UserPage
.
js
<
HeaderDiv
>
<
ContainerNoPad
>
<
BreadcrumbsDiv
>
<
StyledBreadcrumbs
>
<
Link
to
=
"
/
"
style
=
{{
color
:
"
#00bcd4
"
,
textDecoration
:
"
none
"
}}
>
Página
Inicial
<
/Link
>
<
span
>
Minha
área
<
/span
>
<
span
>
{
tabs
[
tabValue
]}
<
/span
>
<
/StyledBreadcrumbs
>
<
/BreadcrumbsDiv
>
<
div
style
=
{{
display
:
"
flex
"
,
flexDirection
:
"
column
"
}}
>
<
MainContainerDesktop
maxwidth
=
"
xl
"
>
<
Paper
elevation
=
{
3
}
style
=
{{
width
:
"
max-content
"
}}
>
<
ContainerUserProfile
>
<
HeaderContainer
>
<
CoverContainer
>
<
img
src
=
{
state
.
currentUser
.
userCover
}
alt
=
"
user cover avatar
"
style
=
{{
width
:
"
100%
"
,
height
:
"
100%
"
,
objectFit
:
"
cover
"
}}
/
>
<
input
accept
=
"
image/*
"
style
=
{{
display
:
"
none
"
}}
id
=
"
icon-button-file
"
type
=
"
file
"
onChange
=
{(
e
)
=>
updateCover
(
e
.
target
.
files
)}
/
>
<
label
htmlFor
=
"
icon-button-file
"
>
<
Tooltip
title
=
{
<
span
style
=
{{
fontSize
:
"
14px
"
,
overflow
:
"
hidden
"
,
transition
:
"
all .5s ease
"
}}
>
ALTERAR
CAPA
<
/span>} placement="left"
>
<
IconButton
style
=
{{
position
:
"
absolute
"
,
right
:
"
0
"
,
top
:
"
0
"
,
color
:
"
#fff
"
}}
color
=
"
primary
"
aria
-
label
=
"
upload picture
"
component
=
"
span
"
>
<
PhotoCamera
/>
<
/IconButton
>
<
/Tooltip
>
<
/label
>
<
/CoverContainer
>
<
ProfileAvatarDiv
onMouseEnter
=
{
handleHoverAlterarFoto
}
onMouseLeave
=
{
handleHoverAlterarFoto
}
onClick
=
{
modalControl
}
>
<
img
src
=
{
state
.
currentUser
.
userAvatar
}
alt
=
"
user avatar
"
style
=
{{
height
:
"
inherit
"
,
width
:
"
inherit
"
,
border
:
"
0
"
,
verticalAlign
:
"
middle
"
}}
/
>
<
ChangeAvatarDiv
style
=
{
{
display
:
hoverAlterarFoto
?
'
flex
'
:
'
none
'
}}
>
<
span
>
Alterar
Foto
<
/span
>
<
/ChangeAvatarDiv
>
<
/ProfileAvatarDiv
>
<
UserProfileInfoDiv
>
<
p
style
=
{{
fontSize
:
"
28px
"
,
color
:
"
#fff
"
,
marginBottom
:
"
2px
"
,
fontWeight
:
"
500
"
,
backgroundColor
:
"
#77777796
"
,
backgroundRadius
:
"
8px
"
}}
>
{
user
}
<
/p
>
<
div
style
=
{{
fontSize
:
"
14px
"
,
color
:
"
#fff
"
,
marginBottom
:
"
2px
"
}}
>
<
p
>
{
state
.
currentUser
.
education
}
<
/p
>
<
/div
>
<
/UserProfileInfoDiv
>
<
EditProfileAnchor
to
=
"
/editarperfil
"
>
<
Button
>
<
EditIcon
style
=
{{
marginRight
:
"
5px
"
,
verticalAlign
:
"
middle
"
}}
/> <span>EDITAR PERFIL</
span
>
<
/Button
>
<
/EditProfileAnchor
>
<
/HeaderContainer
>
<
CheckTeacherDiv
>
<>
{
state
.
currentUser
.
isCollaborativeTeacher
?
(
[
<>
<
img
src
=
{
CheckDecagram
}
style
=
{{
color
:
"
#00bcd4
"
}}
/
>
<
span
>
Professor
(
a
)
<
/span
>
<
/
>
]
)
:
(
[
<
p
style
=
{{
fontSize
:
"
15px
"
,
lineHeight
:
"
22px
"
,
textAlign
:
"
left
"
,
margin
:
"
0 0 10px
"
}}
>
<
span
style
=
{{
cursor
:
"
pointer
"
}}
>
<
span
style
=
{{
paddingRight
:
"
5px
"
}}
>
<
img
src
=
{
CheckDecagram
}
/
>
<
/span
>
Você
é
professor
(
a
)
e
gostaria
de
publicar
recursos
?
<
span
style
=
{{
color
:
"
#00bcd4
"
}}
>
SAIBA
MAIS
<
/span
>
<
/span
>
<
/p
>
]
)
}
<
/
>
<
/CheckTeacherDiv
>
<
RodapeDiv
>
<
NavBarContentContainer
>
<
StyledTabs
value
=
{
tabValue
}
onChange
=
{
handleChangeTab
}
indicatorColor
=
"
primary
"
textColor
=
"
primary
"
variant
=
"
scrollable
"
scrollButtons
=
"
auto
"
TabIndicatorProps
=
{{
style
:
{
background
:
"
#00bcd4
"
}}}
>
<
StyledTab
label
=
{
tabs
[
0
]}
/
>
<
StyledTab
label
=
{
tabs
[
1
]}
/
>
<
StyledTab
label
=
{
tabs
[
2
]}
/
>
<
StyledTab
label
=
{
tabs
[
3
]}
/
>
<
StyledTab
label
=
{
tabs
[
4
]}
/
>
<
StyledTab
label
=
{
tabs
[
5
]}
/
>
<
/StyledTabs
>
<
/NavBarContentContainer
>
<
/RodapeDiv
>
<
/ContainerUserProfile
>
<
/Paper
>
<
/MainContainerDesktop
>
<
/div
>
{
tabValue
===
0
&&
<
TabPanelAtividades
id
=
{
id
}
config
=
{
config
}
/>}
{
tabValue
===
1
&&
<
TabPanelStatusEConquistas
id
=
{
id
}
config
=
{
config
}
/>
}
{
tabValue
===
2
&&
<
TabPanelMeusRecursos
id
=
{
id
}
config
=
{
config
}
/>
}
{
tabValue
===
3
&&
<
TabPanelFavoritos
id
=
{
id
}
config
=
{
config
}
/>
}
{
tabValue
===
4
&&
<
TabPanelColecoes
id
=
{
id
}
config
=
{
config
}
/>
}
{
tabValue
===
5
&&
<
TabPanelRede
id
=
{
id
}
config
=
{
config
}
/>
}
<
/ContainerNoPad
>
<
/HeaderDiv
>
=======
<
BackgroundDiv
>
<
BackgroundDiv
>
<
CustomizedBreadcrumbs
<
CustomizedBreadcrumbs
...
@@ -410,19 +298,20 @@ export default function UserPage (props){
...
@@ -410,19 +298,20 @@ export default function UserPage (props){
{
tabValue
===
0
&&
{
tabValue
===
0
&&
<
TabPanelAtividades
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
<
TabPanelAtividades
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
{
tabValue
===
1
&&
{
tabValue
===
1
&&
<
TabPanel
MeusRecurso
s
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
<
TabPanel
StatusEConquista
s
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
{
tabValue
===
2
&&
{
tabValue
===
2
&&
<
TabPanel
Favorit
os
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
<
TabPanel
MeusRecurs
os
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
{
tabValue
===
3
&&
{
tabValue
===
3
&&
<
TabPanel
Colecoe
s
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
<
TabPanel
Favorito
s
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
{
tabValue
===
4
&&
{
tabValue
===
4
&&
<
TabPanel
Rede
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
<
TabPanel
Colecoes
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
{
tabValue
===
5
&&
{
tabValue
===
5
&&
<
TabPanelRede
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
{
tabValue
===
6
&&
<
TabPanelCuradoria
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
<
TabPanelCuradoria
id
=
{
id
}
config
=
{
GetHeaderConfig
()}
/>
}
<
/Grid
>
<
/Grid
>
<
/Grid
>
<
/Grid
>
<
/BackgroundDiv
>
<
/BackgroundDiv
>
>>>>>>>
src
/
Pages
/
UserPage
.
js
<
/React.Fragment
>
<
/React.Fragment
>
]
]
)
)
...
...
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