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
2fc36f54
Commit
2fc36f54
authored
Nov 16, 2022
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#38
небольшие правки
parent
0c94e313
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
13 additions
and
19 deletions
+13
-19
CalendarRow.js
...c/components/MonthCalendarBody/CalendarRow/CalendarRow.js
+1
-1
CalendarRowDay.js
...onents/MonthCalendarBody/CalendarRowDay/CalendarRowDay.js
+4
-8
CalendarStandartCell.js
...endarBody/CalendarStandartCell.js/CalendarStandartCell.js
+3
-3
CalendarTask.js
...components/MonthCalendarBody/CalendarTask/CalendarTask.js
+4
-6
MonthCalendar.js
planner-front/src/containers/MonthCalendar/MonthCalendar.js
+1
-1
No files found.
planner-front/src/components/MonthCalendarBody/CalendarRow/CalendarRow.js
View file @
2fc36f54
...
@@ -13,6 +13,6 @@ const CalendarRow = ({children}) => {
...
@@ -13,6 +13,6 @@ const CalendarRow = ({children}) => {
<
/
>
<
/
>
};
};
export
default
memo
(
CalendarRow
)
;
export
default
CalendarRow
;
planner-front/src/components/MonthCalendarBody/CalendarRowDay/CalendarRowDay.js
View file @
2fc36f54
import
{
Tune
}
from
"@mui/icons-material"
;
import
{
Grid
}
from
"@mui/material"
;
import
{
Grid
}
from
"@mui/material"
;
import
{
memo
,
useMemo
}
from
"react"
;
import
{
memo
,
useMemo
}
from
"react"
;
import
CalendarStandartCell
from
"../CalendarStandartCell.js/CalendarStandartCell"
;
import
CalendarStandartCell
from
"../CalendarStandartCell.js/CalendarStandartCell"
;
...
@@ -95,7 +94,7 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
...
@@ -95,7 +94,7 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
}
}
return
lines
return
lines
},
[
sortedTasks
,
hours
])
},
[
sortedTasks
,
hours
])
console
.
log
(
linesInDay
)
return
<>
return
<>
<
Grid
<
Grid
container
container
...
@@ -119,15 +118,12 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
...
@@ -119,15 +118,12 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
dayNumber
=
{
day
.
dayNumber
}
dayNumber
=
{
day
.
dayNumber
}
currentTask
=
{
currentTask
}
currentTask
=
{
currentTask
}
handleOpen
=
{
handleOpen
}
handleOpen
=
{
handleOpen
}
modal
=
{
modal
.
open
}
modal
=
{
modal
}
>
>
<
CalendarTask
<
CalendarTask
setCurrentTask
=
{
setCurrentTask
}
setCurrentTask
=
{
setCurrentTask
}
year
=
{
year
}
month
=
{
month
}
tasks
=
{
tasks
}
day
=
{
day
}
hours
=
{
hour
}
hours
=
{
hour
}
modal
=
{
modal
}
hourFormat
=
{
hourFormat
}
hourFormat
=
{
hourFormat
}
handleOpen
=
{
handleOpen
}
handleOpen
=
{
handleOpen
}
currentTask
=
{
currentTask
}
currentTask
=
{
currentTask
}
...
@@ -141,4 +137,4 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
...
@@ -141,4 +137,4 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
<
/
>
<
/
>
};
};
export
default
CalendarRowDay
;
export
default
memo
(
CalendarRowDay
);
\ No newline at end of file
\ No newline at end of file
planner-front/src/components/MonthCalendarBody/CalendarStandartCell.js/CalendarStandartCell.js
View file @
2fc36f54
...
@@ -15,9 +15,9 @@ const CalendarStandartCell = ({children, xs, hours, dayNumber, createTaskInCell
...
@@ -15,9 +15,9 @@ const CalendarStandartCell = ({children, xs, hours, dayNumber, createTaskInCell
onClick
=
{(
e
)
=>
{
createTaskInCellHandler
(
dayNumber
,
hours
);
setIsThisCell
(
true
);
handleOpen
(
e
)}}
>
onClick
=
{(
e
)
=>
{
createTaskInCellHandler
(
dayNumber
,
hours
);
setIsThisCell
(
true
);
handleOpen
(
e
)}}
>
{
children
}
{
children
}
{
isThisCell
?
{
isThisCell
?
<
Grid
<
Grid
sx
=
{{
backgroundColor
:
'lightgreen'
,
padding
:
'10px'
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis
'
}}
sx
=
{{
height
:
'30px'
,
backgroundColor
:
'lightgreen'
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
,
padding
:
'5px'
,
margin
:
"5px 10px"
,
borderRadius
:
'10px
'
}}
>
>
<
span
>
<
span
>
Задача
Задача
<
/span
>
<
/span
>
...
...
planner-front/src/components/MonthCalendarBody/CalendarTask/CalendarTask.js
View file @
2fc36f54
...
@@ -6,7 +6,7 @@ import { editCalendarTask } from "../../../store/actions/tasksActions";
...
@@ -6,7 +6,7 @@ import { editCalendarTask } from "../../../store/actions/tasksActions";
const
TaskDefault
=
({
task
,
onClickTaskHandler
})
=>
{
const
TaskDefault
=
({
task
,
onClickTaskHandler
})
=>
{
return
(
<
Grid
return
(
<
Grid
sx
=
{{
height
:
'30px'
,
backgroundColor
:
'lightgreen'
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
,
padding
:
'5px'
,
borderBottom
:
'1px solid rgb(29, 161, 51)'
,
borderRadius
:
'10px'
,
margin
:
'5px 10px'
}}
sx
=
{{
height
:
'30px'
,
backgroundColor
:
'lightgreen'
,
whiteSpace
:
'nowrap'
,
overflow
:
'hidden'
,
textOverflow
:
'ellipsis'
,
padding
:
'5px'
,
borderBottom
:
'1px solid rgb(29, 161, 51)'
,
borderRadius
:
'10px'
,
margin
:
'5px 10px'
,
textAlign
:
'left'
}}
onClick
=
{
onClickTaskHandler
}
onClick
=
{
onClickTaskHandler
}
>
>
<
span
>
<
span
>
...
@@ -17,7 +17,7 @@ const TaskDefault = ({task, onClickTaskHandler}) => {
...
@@ -17,7 +17,7 @@ const TaskDefault = ({task, onClickTaskHandler}) => {
const
TaskWithNoStartAndAllEnd
=
({
task
,
onClickTaskHandler
})
=>
{
const
TaskWithNoStartAndAllEnd
=
({
task
,
onClickTaskHandler
})
=>
{
return
(
<
Grid
return
(
<
Grid
sx
=
{{
height
:
'30px'
,
backgroundColor
:
'lightgreen'
,
whiteSpace
:
'nowrap'
,
padding
:
'5px'
,
borderBottom
:
'1px solid rgb(29, 161, 51)'
,
borderTopLeftRadius
:
'10px'
,
borderBottomLeftRadius
:
'10px'
,
margin
:
"5px -1px 5px 10px"
,
position
:
'relative'
}}
sx
=
{{
height
:
'30px'
,
backgroundColor
:
'lightgreen'
,
whiteSpace
:
'nowrap'
,
padding
:
'5px'
,
borderBottom
:
'1px solid rgb(29, 161, 51)'
,
borderTopLeftRadius
:
'10px'
,
borderBottomLeftRadius
:
'10px'
,
margin
:
"5px -1px 5px 10px"
,
position
:
'relative'
,
textAlign
:
'left'
}}
onClick
=
{
onClickTaskHandler
}
onClick
=
{
onClickTaskHandler
}
>
>
<
span
>
<
span
>
...
@@ -59,14 +59,11 @@ const Empty = ({}) => {
...
@@ -59,14 +59,11 @@ const Empty = ({}) => {
const
CalendarTask
=
({
year
,
month
,
tasks
,
day
,
hours
,
setCurrentTask
,
hourFormat
,
handleOpen
,
currentTask
,
linesForCell
,
sortedTasks
})
=>
{
const
CalendarTask
=
({
hours
,
setCurrentTask
,
hourFormat
,
handleOpen
,
currentTask
,
linesForCell
,
sortedTasks
})
=>
{
const
[
thisCellCurrentTask
,
setThisCellCurrentTask
]
=
useState
({})
const
[
thisCellCurrentTask
,
setThisCellCurrentTask
]
=
useState
({})
const
hour
=
parseInt
(
hours
.
split
(
':'
)[
0
])
const
hour
=
parseInt
(
hours
.
split
(
':'
)[
0
])
const
tasksCell
=
useMemo
(()
=>
{
return
[]
},
[])
useEffect
(()
=>
{
useEffect
(()
=>
{
if
(
!
currentTask
.
title
)
{
if
(
!
currentTask
.
title
)
{
...
@@ -120,6 +117,7 @@ const CalendarTask = ({year, month, tasks, day, hours, setCurrentTask, hourForma
...
@@ -120,6 +117,7 @@ const CalendarTask = ({year, month, tasks, day, hours, setCurrentTask, hourForma
}
else
{
}
else
{
return
(
return
(
<
Empty
<
Empty
/>
/>
)
)
}
}
...
...
planner-front/src/containers/MonthCalendar/MonthCalendar.js
View file @
2fc36f54
...
@@ -114,7 +114,7 @@ function MonthCalendar() {
...
@@ -114,7 +114,7 @@ function MonthCalendar() {
description
:
"описание"
,
description
:
"описание"
,
priority
:
null
,
priority
:
null
,
dateTimeStart
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hour
,
0
)),
dateTimeStart
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hour
,
0
)),
dateTimeDue
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hourDue
+
4
,
59
)),
dateTimeDue
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hourDue
,
59
)),
}
}
setCurrentTask
((
newTask
))
setCurrentTask
((
newTask
))
}
}
...
...
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