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
8634e9d8
Commit
8634e9d8
authored
Jan 09, 2023
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#141
Изменил вывод информации о проекте
parent
492adeee
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
92 additions
and
76 deletions
+92
-76
ProjectInfo.js
...c/components/ProjectComponents/ProjectInfo/ProjectInfo.js
+45
-0
ColumnTitle.js
...umnsWrapper/ProjectUsersColumn/ColumnTitle/ColumnTitle.js
+5
-5
ProjectUsersColumn.js
...rsColumnsWrapper/ProjectUsersColumn/ProjectUsersColumn.js
+1
-1
UserItem.js
...Wrapper/ProjectUsersColumn/UsersList/UserItem/UserItem.js
+6
-6
UserList.js
...rsColumnsWrapper/ProjectUsersColumn/UsersList/UserList.js
+10
-10
ProjectUsersColumnsWrapper.js
.../ProjectUsersColumnsWrapper/ProjectUsersColumnsWrapper.js
+17
-17
FullProject.js
planner-front/src/containers/FullProject/FullProject.js
+8
-37
No files found.
planner-front/src/components/ProjectComponents/ProjectInfo/ProjectInfo.js
0 → 100644
View file @
8634e9d8
import
{
Box
,
Typography
}
from
"@mui/material"
;
import
moment
from
"moment"
;
import
{
memo
}
from
"react"
;
import
PersonAddIcon
from
'@mui/icons-material/PersonAdd'
;
const
style
=
{
display
:
'flex'
,
flexDirection
:
'column'
,
}
const
styleText
=
{
fontSize
:
'20px'
,
fontWeight
:
'600'
,
display
:
'flex'
,
alignItems
:
'center'
,
gap
:
'10px'
}
const
ProjectInfo
=
({
project
})
=>
{
return
(
<
Box
sx
=
{
style
}
justifyContent
=
{
'space-between'
}
>
<
Typography
variant
=
"h2"
>
Проект
-
{
project
?.
title
}
<
/Typography
>
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
Дата
создания
проекта
:
{
moment
(
project
?.
createdAt
).
format
(
'MM.DD.YYYY'
)}
<
/Typography
>
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
Цвет
:
{
project
?.
color
}
<
/Typography
>
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
Автор
проекта
:
{
project
?.
members
[
0
]?.
user
.
displayName
}
<
/Typography
>
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
Роль
в
проекте
:
{
project
?.
members
[
0
]?.
roleProject
}
<
/Typography
>
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
Задачи
:
<
/Typography
>
<
Typography
variant
=
"body1"
sx
=
{
styleText
}
>
Добавить
участника
:
<
PersonAddIcon
style
=
{{
cursor
:
'pointer'
}}
/
>
<
/Typography
>
<
/Box
>
);
};
export
default
memo
(
ProjectInfo
);
\ No newline at end of file
planner-front/src/components/ProjectComponents/ProjectUsersColumnsWrapper/ProjectUsersColumn/ColumnTitle/ColumnTitle.js
View file @
8634e9d8
...
...
@@ -4,11 +4,11 @@ import { memo } from "react";
const
ColumnTitle
=
({
text
})
=>
{
return
<>
<
Typography
variant
=
"h4"
textAlign
=
{
'center'
}
sx
=
{{
marginBottom
:
'20px'
}}
>
{
text
}
<
/Typography
>
<
/
>
return
<>
<
Typography
variant
=
"h4"
textAlign
=
{
'center'
}
sx
=
{{
marginBottom
:
'20px'
}}
>
{
text
}
<
/Typography
>
<
/
>
};
export
default
memo
(
ColumnTitle
);
planner-front/src/components/ProjectComponents/ProjectUsersColumnsWrapper/ProjectUsersColumn/ProjectUsersColumn.js
View file @
8634e9d8
...
...
@@ -16,7 +16,7 @@ const styleColumn = {
const
ProjectUsersColumn
=
({
role
,
members
})
=>
{
return
(
<
Box
sx
=
{
styleColumn
}
>
<
ColumnTitle
text
=
{
role
.
text
}
/
>
<
ColumnTitle
text
=
{
role
.
text
}
/
>
<
UsersList
role
=
{
role
}
...
...
planner-front/src/components/ProjectComponents/ProjectUsersColumnsWrapper/ProjectUsersColumn/UsersList/UserItem/UserItem.js
View file @
8634e9d8
...
...
@@ -3,12 +3,12 @@ import DeleteIcon from "@mui/icons-material/Delete";
import
{
memo
}
from
"react"
;
const
style
=
{
width
:
'90%'
,
border
:
'1px solid black'
,
borderRadius
:
'5px'
,
padding
:
'15px 15px'
,
display
:
'flex'
,
justifyContent
:
'space-between'
,
width
:
'90%'
,
border
:
'1px solid black'
,
borderRadius
:
'5px'
,
padding
:
'15px 15px'
,
display
:
'flex'
,
justifyContent
:
'space-between'
,
alignItems
:
'center'
}
...
...
planner-front/src/components/ProjectComponents/ProjectUsersColumnsWrapper/ProjectUsersColumn/UsersList/UserList.js
View file @
8634e9d8
import
{
Box
}
from
"@mui/material"
;
import
{
Box
}
from
"@mui/material"
;
import
{
memo
}
from
"react"
;
import
UserItem
from
"./UserItem/UserItem"
;
...
...
@@ -11,19 +11,19 @@ const styleList = {
const
UsersList
=
({
role
,
members
})
=>
{
return
(
<
Box
sx
=
{
styleList
}
>
{
members
.
map
((
member
)
=>
{
if
(
member
.
roleProject
===
role
.
value
)
{
return
(
<
Box
sx
=
{
styleList
}
>
{
members
.
map
((
member
)
=>
{
if
(
member
.
roleProject
===
role
.
value
)
{
return
(
<
UserItem
key
=
{
member
.
id
}
user
=
{
member
?.
user
}
/
>
)
}
else
{
return
null
}
})}
)
}
else
{
return
null
}
})}
<
/Box
>
);
};
...
...
planner-front/src/components/ProjectComponents/ProjectUsersColumnsWrapper/ProjectUsersColumnsWrapper.js
View file @
8634e9d8
import
{
Box
}
from
"@mui/material"
;
import
{
Box
}
from
"@mui/material"
;
import
{
memo
}
from
"react"
;
import
ProjectUsersColumn
from
"./ProjectUsersColumn/ProjectUsersColumn"
;
const
projectRoles
=
[{
value
:
'admin'
,
text
:
'Админы'
},
{
value
:
'user'
,
text
:
'Юзеры'
},
{
value
:
'watcher'
,
text
:
'Наблюдатели'
}]
const
projectRoles
=
[{
value
:
'admin'
,
text
:
'Админы'
},
{
value
:
'user'
,
text
:
'Юзеры'
},
{
value
:
'watcher'
,
text
:
'Наблюдатели'
}]
const
style
=
{
display
:
'flex'
,
gap
:
'150px'
,
gap
:
'150px'
,
width
:
'100%'
,
marginTop
:
'20px'
,
justifyContent
:
'space-evenly'
}
const
ProjectUsersColumnsWrapper
=
({
members
})
=>
{
return
(
<
Box
sx
=
{
style
}
justifyContent
=
{
'space-between'
}
>
{
projectRoles
.
map
((
role
,
i
)
=>
{
return
(
<
ProjectUsersColumn
key
=
{
i
}
role
=
{
role
}
members
=
{
members
}
/
>
)
})}
<
/Box
>
);
const
ProjectUsersColumnsWrapper
=
({
members
})
=>
{
return
(
<
Box
sx
=
{
style
}
justifyContent
=
{
'space-between'
}
>
{
projectRoles
.
map
((
role
,
i
)
=>
{
return
(
<
ProjectUsersColumn
key
=
{
i
}
role
=
{
role
}
members
=
{
members
}
/
>
)
})}
<
/Box
>
);
};
export
default
memo
(
ProjectUsersColumnsWrapper
);
\ No newline at end of file
planner-front/src/containers/FullProject/FullProject.js
View file @
8634e9d8
...
...
@@ -6,6 +6,7 @@ import { fetchProject } from "../../store/actions/projectsActions";
import
{
fetchUsers
,
fetchUsersAllFields
}
from
"../../store/actions/usersActions"
;
import
NewMember
from
"../NewMember/NewMember"
;
import
ProjectUsersColumnsWrapper
from
"../../components/ProjectComponents/ProjectUsersColumnsWrapper/ProjectUsersColumnsWrapper"
;
import
ProjectInfo
from
"../../components/ProjectComponents/ProjectInfo/ProjectInfo"
;
const
FullProject
=
()
=>
{
...
...
@@ -27,43 +28,13 @@ const FullProject = () => {
},
[
project
])
return
<>
<
Grid
item
xs
=
{
12
}
sm
=
{
12
}
md
=
{
6
}
lg
=
{
4
}
>
<
Box
>
<
h2
>
Проект
-
{
project
?.
project
?.
title
}
<
/h2
>
<
strong
>
<
br
><
/br
>
Дата
создания
проекта
:
{
project
?.
project
?.
createdAt
}
<
/strong
>
<
strong
>
<
br
><
/br
>
Цвет
:
{
project
?.
project
?.
color
}
<
/strong
>
<
strong
>
<
br
><
/br
>
Автор
проекта
:
{
project
?.
project
?.
members
[
0
]?.
user
.
displayName
}
<
/strong
>
<
strong
>
<
br
><
/br
>
Роль
в
проекте
:
{
project
?.
project
?.
members
[
0
]?.
roleProject
}
<
/strong
>
<
strong
>
<
br
><
/br
>
Задачи
:
<
br
><
/br
>
<
/strong
>
<
strong
>
<
br
><
/br
>
<
div
style
=
{{
display
:
'flex'
,
direction
:
'column'
}}
>
Участники
проекта
:
<
NewMember
members
=
{
project
?.
project
?.
members
}
/
>
<
/div
>
<
ProjectUsersColumnsWrapper
members
=
{
members
}
/
>
<
/strong
>
<
/Box
>
<
Grid
>
<
ProjectInfo
project
=
{
project
.
project
}
/
>
<
ProjectUsersColumnsWrapper
members
=
{
members
}
/
>
<
/Grid
>
<
/
>
...
...
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