Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
P
planner-team-one
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
21
Issues
21
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Евгений Положенцев
planner-team-one
Commits
6e67312d
Commit
6e67312d
authored
Jan 11, 2023
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#148
Исправил отображение ролей в проекте
parent
d2e030a8
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
22 additions
and
31 deletions
+22
-31
ProjectInfo.js
...c/components/ProjectComponents/ProjectInfo/ProjectInfo.js
+1
-1
ProjectUserItem.js
...ents/ProjectComponents/ProjectUserItem/ProjectUserItem.js
+0
-26
UserItem.js
...Wrapper/ProjectUsersColumn/UsersList/UserItem/UserItem.js
+1
-1
ProjectItem.js
...s/ProjectsWrapper/ProjectsList/ProjectItem/ProjectItem.js
+10
-1
FullProject.js
planner-front/src/containers/FullProject/FullProject.js
+10
-2
No files found.
planner-front/src/components/ProjectComponents/ProjectInfo/ProjectInfo.js
View file @
6e67312d
...
@@ -36,7 +36,7 @@ const ProjectInfo = ({ project, handleOpen, currentRoleInProject,onClickTasksHan
...
@@ -36,7 +36,7 @@ const ProjectInfo = ({ project, handleOpen, currentRoleInProject,onClickTasksHan
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
Задачи
:
<
ArrowIncrementButton
onClick
=
{()
=>
{
onClickTasksHandler
()}}
/
>
Задачи
:
<
ArrowIncrementButton
onClick
=
{()
=>
{
onClickTasksHandler
()}}
/
>
<
/Typography
>
<
/Typography
>
{
currentRoleInProject
===
'
admin
'
?
{
currentRoleInProject
===
'
Админ
'
?
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
Добавить
участника
:
<
PersonAddIcon
style
=
{{
cursor
:
'pointer'
}}
onClick
=
{()
=>
{
handleOpen
()
}}
/
>
Добавить
участника
:
<
PersonAddIcon
style
=
{{
cursor
:
'pointer'
}}
onClick
=
{()
=>
{
handleOpen
()
}}
/
>
<
/Typography
>
<
/Typography
>
...
...
planner-front/src/components/ProjectComponents/ProjectUserItem/ProjectUserItem.js
deleted
100644 → 0
View file @
d2e030a8
import
{
Grid
}
from
"@mui/material"
;
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
{
deleteMember
}
from
"../../../store/actions/projectsActions"
;
import
{
memo
}
from
"react"
;
const
ProjectMembersItem
=
({
user
})
=>
{
const
style
=
{
width
:
'90%'
,
border
:
'1px solid black'
,
borderRadius
:
'5px'
,
padding
:
'15px 15px'
,
display
:
'flex'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}
return
<>
<
Grid
sx
=
{
style
}
>
{
user
?.
displayName
}
<
DeleteIcon
/>
<
/Grid
>
<
/
>
};
export
default
memo
(
ProjectMembersItem
);
planner-front/src/components/ProjectComponents/ProjectUsersColumnsWrapper/ProjectUsersColumn/UsersList/UserItem/UserItem.js
View file @
6e67312d
...
@@ -48,7 +48,7 @@ const ProjectMembersItem = ({ user, deleteMemberHandler, currentRoleInProject, d
...
@@ -48,7 +48,7 @@ const ProjectMembersItem = ({ user, deleteMemberHandler, currentRoleInProject, d
>
>
{
user
?.
displayName
}
{
user
?.
displayName
}
{
currentRoleInProject
===
'
admin
'
&&
user
.
id
!==
userId
?
{
currentRoleInProject
===
'
Админ
'
&&
user
.
id
!==
userId
?
<
DeleteIcon
<
DeleteIcon
sx
=
{{
cursor
:
'pointer'
}}
sx
=
{{
cursor
:
'pointer'
}}
onClick
=
{
deleteMemberHandler
}
onClick
=
{
deleteMemberHandler
}
...
...
planner-front/src/components/ProjectsComponents/ProjectsWrapper/ProjectsList/ProjectItem/ProjectItem.js
View file @
6e67312d
...
@@ -23,7 +23,16 @@ const ProjectItem = ({ title, members, onClickProjectHandler, onClickGoToSpecifi
...
@@ -23,7 +23,16 @@ const ProjectItem = ({ title, members, onClickProjectHandler, onClickGoToSpecifi
const
{
user
}
=
useSelector
(
state
=>
state
.
users
);
const
{
user
}
=
useSelector
(
state
=>
state
.
users
);
const
currentRoleInProject
=
useMemo
(()
=>
{
const
currentRoleInProject
=
useMemo
(()
=>
{
return
members
.
find
((
member
)
=>
member
.
user
.
id
===
user
.
id
)?.
roleProject
switch
(
members
.
find
((
member
)
=>
member
.
user
.
id
===
user
.
id
)?.
roleProject
)
{
case
'admin'
:
return
'Админ'
case
'user'
:
return
'Юзер'
case
'watcher'
:
return
'Наблюдатель'
default
:
return
''
}
},
[
members
,
user
.
id
])
},
[
members
,
user
.
id
])
return
<>
return
<>
...
...
planner-front/src/containers/FullProject/FullProject.js
View file @
6e67312d
import
{
Grid
}
from
"@mui/material"
;
import
{
useNavigate
,
useParams
}
from
"react-router-dom"
;
import
{
useNavigate
,
useParams
}
from
"react-router-dom"
;
import
{
useSelector
,
useDispatch
}
from
"react-redux"
;
import
{
useSelector
,
useDispatch
}
from
"react-redux"
;
import
{
useCallback
,
useEffect
,
useMemo
,
useState
}
from
"react"
;
import
{
useCallback
,
useEffect
,
useMemo
,
useState
}
from
"react"
;
...
@@ -39,7 +38,16 @@ const FullProject = ({ projectId }) => {
...
@@ -39,7 +38,16 @@ const FullProject = ({ projectId }) => {
},
[
project
])
},
[
project
])
const
currentRoleInProject
=
useMemo
(()
=>
{
const
currentRoleInProject
=
useMemo
(()
=>
{
return
members
.
find
((
member
)
=>
member
.
user
.
id
===
user
.
id
)?.
roleProject
switch
(
members
.
find
((
member
)
=>
member
.
user
.
id
===
user
.
id
)?.
roleProject
)
{
case
'admin'
:
return
'Админ'
case
'user'
:
return
'Юзер'
case
'watcher'
:
return
'Наблюдатель'
default
:
return
''
}
},
[
members
,
user
.
id
])
},
[
members
,
user
.
id
])
const
onChangeRoleHandler
=
useCallback
((
e
,
value
)
=>
{
const
onChangeRoleHandler
=
useCallback
((
e
,
value
)
=>
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment