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
da5b1334
Commit
da5b1334
authored
Nov 22, 2022
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#54
Небольшие изменения
parent
213b15cc
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
11 deletions
+34
-11
CalendarRowDay.js
...onents/MonthCalendarBody/CalendarRowDay/CalendarRowDay.js
+1
-0
CalendarTask.js
...components/MonthCalendarBody/CalendarTask/CalendarTask.js
+33
-11
No files found.
planner-front/src/components/MonthCalendarBody/CalendarRowDay/CalendarRowDay.js
View file @
da5b1334
...
@@ -174,6 +174,7 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
...
@@ -174,6 +174,7 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
hour
=
{
parseInt
(
hours
[
index
])}
hour
=
{
parseInt
(
hours
[
index
])}
line
=
{
day
.
dayNumber
}
line
=
{
day
.
dayNumber
}
task
=
{
box
.
task
}
task
=
{
box
.
task
}
hourFormat
=
{
hourFormat
}
setCurrentTask
=
{
setCurrentTask
}
setCurrentTask
=
{
setCurrentTask
}
handleOpen
=
{
handleOpen
}
handleOpen
=
{
handleOpen
}
increaseTaskHandler
=
{
increaseTaskHandler
}
increaseTaskHandler
=
{
increaseTaskHandler
}
...
...
planner-front/src/components/MonthCalendarBody/CalendarTask/CalendarTask.js
View file @
da5b1334
...
@@ -13,7 +13,7 @@ const arrowClass = {
...
@@ -13,7 +13,7 @@ const arrowClass = {
}
}
}
}
const
CalendarTask
=
({
setCurrentTask
,
handleOpen
,
task
,
line
,
setCurrentLine
,
increaseTaskHandler
,
reduceTaskHandler
})
=>
{
const
CalendarTask
=
({
setCurrentTask
,
handleOpen
,
task
,
line
,
setCurrentLine
,
increaseTaskHandler
,
reduceTaskHandler
,
hourFormat
})
=>
{
const
[
color
,
setColor
]
=
useState
(
''
)
const
[
color
,
setColor
]
=
useState
(
''
)
useEffect
(()
=>
{
useEffect
(()
=>
{
...
@@ -52,17 +52,39 @@ const CalendarTask = ({setCurrentTask, handleOpen, task, line, setCurrentLine, i
...
@@ -52,17 +52,39 @@ const CalendarTask = ({setCurrentTask, handleOpen, task, line, setCurrentLine, i
sx
=
{{
position
:
'relative'
,
height
:
'30px'
,
backgroundColor
:
color
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
,
borderRadius
:
'10px'
,
margin
:
'5px 10px'
,
display
:
'flex'
,
justifyContent
:
'flex-start'
,
alignItems
:
'center'
,
paddingLeft
:
'5px'
,
zIndex
:
'5'
,
justifyContent
:
'space-between'
}}
sx
=
{{
position
:
'relative'
,
height
:
'30px'
,
backgroundColor
:
color
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
,
borderRadius
:
'10px'
,
margin
:
'5px 10px'
,
display
:
'flex'
,
justifyContent
:
'flex-start'
,
alignItems
:
'center'
,
paddingLeft
:
'5px'
,
zIndex
:
'5'
,
justifyContent
:
'space-between'
}}
onClick
=
{(
e
)
=>
{
onClickTaskHandler
(
e
,
task
)}}
onClick
=
{(
e
)
=>
{
onClickTaskHandler
(
e
,
task
)}}
>
>
<
div
style
=
{{
display
:
'flex'
,
alignItems
:
'center'
}}
>
{
task
.
infoForCell
.
endHour
===
task
.
infoForCell
.
startHour
&&
hourFormat
?
<
ArrowBackIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
increaseTaskHandler
(
line
,
task
,
true
)}}
/
>
<>
<
ArrowForwardIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
reduceTaskHandler
(
line
,
task
,
true
)}}
/
>
<
div
tyle
=
{{
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
/div
>
<
div
style
=
{{
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
span
>
<
ArrowBackIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
increaseTaskHandler
(
line
,
task
,
true
)}}
/
>
<
ArrowForwardIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
reduceTaskHandler
(
line
,
task
,
true
)}}
/
>
<
ArrowBackIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
reduceTaskHandler
(
line
,
task
,
false
)}}
/
>
<
ArrowForwardIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
increaseTaskHandler
(
line
,
task
,
false
)}}
/
>
<
/div
>
<
/div
>
<
div
>
<
span
>
{
task
.
title
}
{
task
.
title
}
<
/span
>
<
/span
>
<
div
style
=
{{
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
/div
>
<
ArrowBackIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
reduceTaskHandler
(
line
,
task
,
false
)}}
/
>
<
/
>
<
ArrowForwardIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
increaseTaskHandler
(
line
,
task
,
false
)}}
/
>
<
/div
>
:
<>
<
div
style
=
{{
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
ArrowBackIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
increaseTaskHandler
(
line
,
task
,
true
)}}
/
>
<
ArrowForwardIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
reduceTaskHandler
(
line
,
task
,
true
)}}
/
>
<
/div
>
<
span
>
{
task
.
title
}
<
/span
>
<
div
style
=
{{
display
:
'flex'
,
alignItems
:
'center'
}}
>
<
ArrowBackIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
reduceTaskHandler
(
line
,
task
,
false
)}}
/
>
<
ArrowForwardIcon
sx
=
{
arrowClass
}
onClick
=
{(
e
)
=>
{
e
.
stopPropagation
();
increaseTaskHandler
(
line
,
task
,
false
)}}
/
>
<
/div
>
<
/
>
}
<
/Grid
>
<
/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