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
7e098957
Commit
7e098957
authored
Dec 15, 2022
by
Ibadullina Inabat
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'task-107-fix/add_checking_front' into 'development'
Task 107 fix/add checking front See merge request
!82
parents
8827bdc4
186d716f
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
12 additions
and
7 deletions
+12
-7
ProjectMembersItem.js
...rojectComponents/ProjectMembersItem/ProjectMembersItem.js
+7
-3
ProjectMembersList.js
...rojectComponents/ProjectMembersList/ProjectMembersList.js
+1
-0
FullProject.js
planner-front/src/containers/FullProject/FullProject.js
+4
-4
No files found.
planner-front/src/components/ProjectComponents/ProjectMembersItem/ProjectMembersItem.js
View file @
7e098957
...
...
@@ -5,17 +5,21 @@ import { useDispatch, useSelector } from "react-redux";
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
{
deleteMember
}
from
"../../../store/actions/projectsActions"
;
const
ProjectMembersItem
=
({
displayName
,
roleProject
,
id
,
roleProjectOfAuthor
,
userId
})
=>
{
const
ProjectMembersItem
=
({
displayName
,
roleProject
,
id
,
roleProjectOfAuthor
,
userId
,
members
})
=>
{
console
.
log
(
displayName
)
const
dispatch
=
useDispatch
();
const
user
=
useSelector
(
state
=>
state
.
users
)
let
params
=
useParams
()
console
.
log
(
param
s
)
console
.
log
(
member
s
)
console
.
log
(
userId
)
const
{
projects
,
project
}
=
useSelector
(
state
=>
state
.
projects
);
const
deleteHandle
=
(
userId
,
projectId
)
=>
{
dispatch
(
deleteMember
(
userId
,
params
.
id
));
if
(
members
.
length
>
1
)
{
dispatch
(
deleteMember
(
userId
,
params
.
id
))
}
else
{
alert
(
"Нельзя удалить автора проекта"
)
}
};
return
<>
...
...
planner-front/src/components/ProjectComponents/ProjectMembersList/ProjectMembersList.js
View file @
7e098957
...
...
@@ -13,6 +13,7 @@ const ProjectMembersList = ({members, roleProjectOfAuthor}) => {
key
=
{
member
.
id
}
roleProjectOfAuthor
=
{
roleProjectOfAuthor
}
userId
=
{
member
?.
user
?.
id
}
members
=
{
members
}
/
>
})}
<
/Grid
>
...
...
planner-front/src/containers/FullProject/FullProject.js
View file @
7e098957
...
...
@@ -12,7 +12,7 @@ const FullProject = () => {
const
{
projects
,
project
}
=
useSelector
(
state
=>
state
.
projects
);
const
users
=
useSelector
(
state
=>
state
.
users
.
users
);
const
user
=
useSelector
(
state
=>
state
.
users
.
user
);
const
dispatch
=
useDispatch
();
const
params
=
useParams
()
...
...
@@ -24,7 +24,7 @@ const FullProject = () => {
dispatch
(
fetchUsers
())
},
[
dispatch
]);
console
.
log
(
user
s
)
console
.
log
(
user
)
useEffect
(()
=>
{
dispatch
(
fetchProject
(
params
.
id
))
...
...
@@ -55,8 +55,8 @@ const FullProject = () => {
<
strong
>
<
br
><
/br
>
<
div
style
=
{{
display
:
'flex'
,
direction
:
'column'
}}
>
Участники
проекта
:
<
NewMember
members
=
{
project
?.
project
?.
members
}
/
>
Участники
проекта
:
{(
project
?.
project
?.
members
[
0
]?.
user
.
displayName
===
user
.
displayName
)
?
<
NewMember
members
=
{
project
?.
project
?.
members
}
/> : null
}
<
/div
>
...
...
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