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
228d63a9
Commit
228d63a9
authored
Nov 29, 2022
by
Нелли Ибрагимова
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'task-75-modals-styles' into 'development'
Task 75 modals styles See merge request
!51
parents
3d32aa8d
0d4aeafc
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
66 additions
and
31 deletions
+66
-31
WorkerMenu.js
planner-front/src/components/Menus/WorkerMenu/WorkerMenu.js
+1
-1
TaskModal.css
.../src/components/MyTasksCompoments/TaskModal/TaskModal.css
+12
-7
TaskModal.js
...t/src/components/MyTasksCompoments/TaskModal/TaskModal.js
+48
-17
MyTasks.js
planner-front/src/containers/MyTasks/MyTasks.js
+5
-6
No files found.
planner-front/src/components/Menus/WorkerMenu/WorkerMenu.js
View file @
228d63a9
...
...
@@ -10,7 +10,7 @@ const WorkerMenu = () => {
const
[
anchorEl
,
setAnchorEl
]
=
useState
(
null
);
const
open
=
Boolean
(
anchorEl
);
const
user
=
useSelector
(
state
=>
state
.
users
.
user
)
console
.
log
(
user
)
const
handleClick
=
(
event
)
=>
{
setAnchorEl
(
event
.
currentTarget
);
};
...
...
planner-front/src/components/MyTasksCompoments/TaskModal/TaskModal.css
View file @
228d63a9
.modal
{
width
:
200px
;
height
:
200px
;
background-color
:
rgb
(
180
,
243
,
243
);
display
:
flex
;
margin
:
10%
20%
;
padding
:
30px
;
word-break
:
break-all
;
transition-duration
:
0.5s
;
flex-direction
:
column
;
padding
:
10px
;
align-items
:
center
;
position
:
absolute
;
top
:
200px
;
left
:
200px
;
width
:
300px
;
height
:
300px
;
background-color
:
white
;
border
:
2px
solid
#000
;
box-shadow
:
24px
;
border-radius
:
5px
}
.modalBox
{
display
:
flex
;
...
...
planner-front/src/components/MyTasksCompoments/TaskModal/TaskModal.js
View file @
228d63a9
...
...
@@ -2,64 +2,95 @@ import { Modal, IconButton } from "@mui/material";
import
"./TaskModal.css"
;
import
{
Done
}
from
"@mui/icons-material"
;
import
Input
from
"@mui/material/Input"
;
import
TextField
from
"@mui/material/Input"
;
const
TaskModal
=
({
handleClose
,
open
,
task
,
onChange
,
user
})
=>
{
return
(
<
Modal
aria
-
labelledby
=
"
transition
-modal-title"
aria
-
describedby
=
"
transition
-modal-description"
className
=
{
"modal"
}
aria
-
labelledby
=
"
modal
-modal-title"
aria
-
describedby
=
"
modal
-modal-description"
BackdropProps
=
{{
style
:
{
backgroundColor
:
'rgba(255,255,255, 0)'
}
}
}
closeAfterTransition
onClose
=
{
handleClose
}
open
=
{
open
}
>
{
task
?.
isEditMode
&&
task
.
author
.
id
===
user
.
id
?
(
<
div
className
=
"modal
Box
"
>
<
div
className
=
"modal"
>
<
Input
label
=
"название"
color
=
"secondary"
value
=
{
task
.
title
}
name
=
"title"
onChange
=
{(
e
)
=>
onChange
(
e
,
task
)}
style
=
{{
width
:
"auto"
,
fontSize
:
"12px"
,
color
:
"white"
,
fontWeight
:
"600"
,
height
:
"40px"
,
fontWeight
:
"600"
,
width
:
"280px"
,
margin
:
"10px"
,
padding
:
"5px"
,
border
:
'2px solid #D3D3D3'
,
borderRadius
:
"5px"
}}
/
>
<
Input
<
TextField
label
=
"описание"
value
=
{
task
.
description
}
name
=
"description"
onChange
=
{(
e
)
=>
onChange
(
e
,
task
)}
style
=
{{
width
:
"auto"
,
fontSize
:
"12px"
,
color
:
"white"
}}
/
>
<
IconButton
aria
-
label
=
"done"
onClick
=
{
handleClose
}
>
multiline
=
{
true
}
sx
=
{{
fontWeight
:
"400"
,
width
:
"280px"
,
margin
:
"10px"
,
padding
:
"5px"
,
border
:
'2px solid #D3D3D3'
,
borderRadius
:
"5px"
,
height
:
"300px"
,
whiteSpace
:
"normal"
}}
/
>
<
IconButton
aria
-
label
=
"done"
onClick
=
{
handleClose
}
sx
=
{{
margingBottom
:
"5px"
,
marginTop
:
"auto"
}}
>
<
Done
/>
<
/IconButton
>
<
/div
>
)
:
(
<
div
className
=
"modal
Box
"
>
<
div
className
=
"modal"
>
{
task
&&
task
.
title
&&
(
<
div
style
=
{{
width
:
"200px"
,
height
:
"200px"
,
color
:
"white"
,
fontWeight
:
"600"
,
height
:
"40px"
,
fontWeight
:
"600"
,
width
:
"280px"
,
margin
:
"10px"
,
padding
:
"5px"
,
border
:
'2px solid #D3D3D3'
,
borderRadius
:
"5px"
}}
>
{
task
.
title
}
<
/div
>
)}
{
task
&&
task
.
description
&&
(
<
div
style
=
{{
width
:
"200px"
,
height
:
"200px"
,
color
:
"white"
}}
>
<
div
style
=
{{
margin
:
"10px"
,
border
:
'2px solid #D3D3D3'
,
borderRadius
:
"5px"
,
width
:
"280px"
,
height
:
"200px"
,
margin
:
"10px"
,
padding
:
"5px"
,
}}
>
{
task
.
description
}
<
/div
>
)}
<
IconButton
sx
=
{{
marginLeft
:
0
,
color
:
"white"
}}
aria
-
label
=
"close"
onClick
=
{
handleClose
}
sx
=
{{
margingBottom
:
"5px"
,
marginTop
:
"auto"
}}
>
X
<
/IconButton
>
...
...
planner-front/src/containers/MyTasks/MyTasks.js
View file @
228d63a9
...
...
@@ -388,10 +388,7 @@ console.log(tasks)
.
format
(
"hh:mm A"
),
user
:
user
}}
>
{
/* <span>"время завершения"+ {moment(task.dateTimeDue)
.utc()
.format("hh:mm A")}</span> */
}
<
/CustomTableCell
>
<
/CustomTableCell
>
<
/
>
)}
...
...
@@ -475,7 +472,8 @@ console.log(tasks)
)}
<
/Tooltip
>
<
/TableCell
>
<
TableCell
>
{
task
.
author
.
id
===
user
.
id
?
(
<
TableCell
>
<
Tooltip
title
=
"Удалить"
>
<
IconButton
onClick
=
{(
id
)
=>
{
...
...
@@ -485,7 +483,8 @@ console.log(tasks)
<
DeleteIcon
/>
<
/IconButton
>
<
/Tooltip
>
<
/TableCell
>
<
/TableCell>
)
:null
}
<
/TableRow
>
);
})}
...
...
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