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
732725e6
Commit
732725e6
authored
Dec 18, 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
!89
parents
17849e6b
1702f2ae
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
16 additions
and
13 deletions
+16
-13
MemberForm.js
planner-front/src/components/MemberForm/MemberForm.js
+1
-1
ProfileBlock.js
...r-front/src/components/Menus/ProfileBlock/ProfileBlock.js
+3
-3
ProjectForm.js
...c/components/ProjectComponents/ProjectForm/ProjectForm.js
+5
-2
ProjectItem.js
...c/components/ProjectComponents/ProjectItem/ProjectItem.js
+1
-1
ProjectMembersItem.js
...rojectComponents/ProjectMembersItem/ProjectMembersItem.js
+3
-4
ProjectMembersList.js
...rojectComponents/ProjectMembersList/ProjectMembersList.js
+2
-1
FullProject.js
planner-front/src/containers/FullProject/FullProject.js
+1
-1
No files found.
planner-front/src/components/MemberForm/MemberForm.js
View file @
732725e6
...
@@ -77,7 +77,7 @@ const MemberForm = ({ onSubmit, members }) => {
...
@@ -77,7 +77,7 @@ const MemberForm = ({ onSubmit, members }) => {
id
=
"free-solo-demo"
id
=
"free-solo-demo"
freeSolo
freeSolo
options
=
{
users
}
options
=
{
users
}
getOptionLabel
=
{(
item
)
=>
item
.
displayName
||
""
}
getOptionLabel
=
{(
item
)
=>
(
members
[
0
]?.
user
?.
displayName
!==
item
.
displayName
)
?
(
item
.
displayName
||
""
)
:
""
}
onChange
=
{
memberChangeHandler
}
onChange
=
{
memberChangeHandler
}
name
=
{
"userId"
}
name
=
{
"userId"
}
value
=
{
state
.
user
}
value
=
{
state
.
user
}
...
...
planner-front/src/components/Menus/ProfileBlock/ProfileBlock.js
View file @
732725e6
...
@@ -41,7 +41,7 @@ const ProfileBlock = () => {
...
@@ -41,7 +41,7 @@ const ProfileBlock = () => {
onClick
=
{
handleClick
}
onClick
=
{
handleClick
}
id
=
'test_greetings'
id
=
'test_greetings'
>
>
Hello
,
{
user
?.
displayName
}
Привет
,
{
user
?.
displayName
}
<
/Button
>
<
/Button
>
<
Menu
<
Menu
anchorEl
=
{
anchorEl
}
anchorEl
=
{
anchorEl
}
...
@@ -49,9 +49,9 @@ const ProfileBlock = () => {
...
@@ -49,9 +49,9 @@ const ProfileBlock = () => {
onClose
=
{
handleClose
}
onClose
=
{
handleClose
}
>
>
<
MenuItem
component
=
{
NavLink
}
to
=
"/profile/test"
color
=
"inherit"
onClick
=
{
handleClose
}
>
Profile
<
/MenuItem
>
<
MenuItem
component
=
{
NavLink
}
to
=
"/profile/test"
color
=
"inherit"
onClick
=
{
handleClose
}
>
Профиль
<
/MenuItem
>
<
MenuItem
onClick
=
{()
=>
{
switchUser
()}}
>
Поменять
юзера
<
/MenuItem
>
<
MenuItem
onClick
=
{()
=>
{
switchUser
()}}
>
Поменять
юзера
<
/MenuItem
>
<
MenuItem
onClick
=
{()
=>
{
logout
()}}
>
Logout
<
/MenuItem
>
<
MenuItem
onClick
=
{()
=>
{
logout
()}}
>
Выйти
<
/MenuItem
>
<
/Menu
>
<
/Menu
>
<
SwitchUserModal
<
SwitchUserModal
open
=
{
openSwitchUser
}
open
=
{
openSwitchUser
}
...
...
planner-front/src/components/ProjectComponents/ProjectForm/ProjectForm.js
View file @
732725e6
...
@@ -31,8 +31,11 @@ const ProjectForm = ({onSubmit}) => {
...
@@ -31,8 +31,11 @@ const ProjectForm = ({onSubmit}) => {
e
.
preventDefault
();
e
.
preventDefault
();
let
project
=
{
title
:
state
.
title
}
let
project
=
{
title
:
state
.
title
}
console
.
log
(
project
);
console
.
log
(
project
);
if
(
project
.
title
===
""
)
{
alert
(
"Нельзя создать проект без названия"
)
}
else
{
onSubmit
(
project
);
onSubmit
(
project
);
}
};
};
const
inputChangeHandler
=
(
e
)
=>
{
const
inputChangeHandler
=
(
e
)
=>
{
...
...
planner-front/src/components/ProjectComponents/ProjectItem/ProjectItem.js
View file @
732725e6
planner-front/src/components/ProjectComponents/ProjectMembersItem/ProjectMembersItem.js
View file @
732725e6
...
@@ -5,7 +5,7 @@ import { useDispatch, useSelector } from "react-redux";
...
@@ -5,7 +5,7 @@ import { useDispatch, useSelector } from "react-redux";
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
DeleteIcon
from
"@mui/icons-material/Delete"
;
import
{
deleteMember
}
from
"../../../store/actions/projectsActions"
;
import
{
deleteMember
}
from
"../../../store/actions/projectsActions"
;
const
ProjectMembersItem
=
({
displayName
,
roleProject
,
id
,
roleProjectOfAuthor
,
userId
,
members
})
=>
{
const
ProjectMembersItem
=
({
displayName
,
roleProject
,
id
,
roleProjectOfAuthor
,
userId
,
members
,
authorOfProject
})
=>
{
console
.
log
(
displayName
)
console
.
log
(
displayName
)
const
dispatch
=
useDispatch
();
const
dispatch
=
useDispatch
();
const
user
=
useSelector
(
state
=>
state
.
users
)
const
user
=
useSelector
(
state
=>
state
.
users
)
...
@@ -36,15 +36,14 @@ const ProjectMembersItem = ({ displayName, roleProject, id, roleProjectOfAuthor,
...
@@ -36,15 +36,14 @@ const ProjectMembersItem = ({ displayName, roleProject, id, roleProjectOfAuthor,
<
/strong
>
<
/strong
>
<
strong
>
<
strong
>
{
roleProjectOfAuthor
===
"admin"
?
{
(
members
.
filter
(
e
=>
e
.
user
.
displayName
===
authorOfProject
).
length
>
0
)
?
(
<
strong
>
(
<
strong
>
<
Tooltip
title
=
"Удалить"
>
<
Tooltip
title
=
"Удалить"
>
<
IconButton
<
IconButton
onClick
=
{(
id
)
=>
{
onClick
=
{(
id
)
=>
{
deleteHandle
(
userId
);
deleteHandle
(
userId
);
}}
}}
>
>
{(
displayName
!==
authorOfProject
)
?
<
DeleteIcon
style
=
{{
marginTop
:
"-5px"
}}
/> : null}
<
DeleteIcon
style
=
{{
marginTop
:
"-5px"
}}
/
>
<
/IconButton
>
<
/IconButton
>
<
/Tooltip
>
<
/Tooltip
>
<
/strong>
)
: null
}
<
/strong>
)
: null
}
...
...
planner-front/src/components/ProjectComponents/ProjectMembersList/ProjectMembersList.js
View file @
732725e6
import
{
Grid
}
from
"@mui/material"
;
import
{
Grid
}
from
"@mui/material"
;
import
ProjectMembersItem
from
"../ProjectMembersItem/ProjectMembersItem"
;
import
ProjectMembersItem
from
"../ProjectMembersItem/ProjectMembersItem"
;
const
ProjectMembersList
=
({
members
,
roleProjectOfAuthor
})
=>
{
const
ProjectMembersList
=
({
members
,
roleProjectOfAuthor
,
authorOfProject
})
=>
{
console
.
log
(
"members "
,
members
)
console
.
log
(
"members "
,
members
)
return
(
return
(
<
Grid
item
container
direction
=
"column"
spacing
=
{
1
}
>
<
Grid
item
container
direction
=
"column"
spacing
=
{
1
}
>
...
@@ -14,6 +14,7 @@ const ProjectMembersList = ({members, roleProjectOfAuthor}) => {
...
@@ -14,6 +14,7 @@ const ProjectMembersList = ({members, roleProjectOfAuthor}) => {
roleProjectOfAuthor
=
{
roleProjectOfAuthor
}
roleProjectOfAuthor
=
{
roleProjectOfAuthor
}
userId
=
{
member
?.
user
?.
id
}
userId
=
{
member
?.
user
?.
id
}
members
=
{
members
}
members
=
{
members
}
authorOfProject
=
{
authorOfProject
}
/
>
/
>
})}
})}
<
/Grid
>
<
/Grid
>
...
...
planner-front/src/containers/FullProject/FullProject.js
View file @
732725e6
...
@@ -60,7 +60,7 @@ const FullProject = () => {
...
@@ -60,7 +60,7 @@ const FullProject = () => {
<
/div
>
<
/div
>
<
ProjectMembersList
users
=
{
users
}
project
=
{
project
}
members
=
{
project
?.
project
?.
members
}
roleProjectOfAuthor
=
{
project
?.
project
?.
members
[
0
]?.
roleProject
}
/
>
<
ProjectMembersList
users
=
{
users
}
project
=
{
project
}
members
=
{
project
?.
project
?.
members
}
roleProjectOfAuthor
=
{
project
?.
project
?.
members
[
0
]?.
roleProject
}
authorOfProject
=
{
project
?.
project
?.
members
[
0
]?.
user
.
displayName
}
/
>
<
/strong
>
<
/strong
>
<
strong
>
<
strong
>
<
br
><
/br
>
<
br
><
/br
>
...
...
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