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
Show 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}) => {
<
/
>
};
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
{
memo
,
useMemo
}
from
"react"
;
import
CalendarStandartCell
from
"../CalendarStandartCell.js/CalendarStandartCell"
;
...
...
@@ -95,7 +94,7 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
}
return
lines
},
[
sortedTasks
,
hours
])
console
.
log
(
linesInDay
)
return
<>
<
Grid
container
...
...
@@ -119,15 +118,12 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
dayNumber
=
{
day
.
dayNumber
}
currentTask
=
{
currentTask
}
handleOpen
=
{
handleOpen
}
modal
=
{
modal
.
open
}
modal
=
{
modal
}
>
<
CalendarTask
setCurrentTask
=
{
setCurrentTask
}
year
=
{
year
}
month
=
{
month
}
tasks
=
{
tasks
}
day
=
{
day
}
hours
=
{
hour
}
modal
=
{
modal
}
hourFormat
=
{
hourFormat
}
handleOpen
=
{
handleOpen
}
currentTask
=
{
currentTask
}
...
...
@@ -141,4 +137,4 @@ const CalendarRowDay = ({xs, hoursInDay, createTaskInCellHandler, currentTask, h
<
/
>
};
export
default
CalendarRowDay
;
\ No newline at end of file
export
default
memo
(
CalendarRowDay
);
\ No newline at end of file
planner-front/src/components/MonthCalendarBody/CalendarStandartCell.js/CalendarStandartCell.js
View file @
2fc36f54
...
...
@@ -16,7 +16,7 @@ const CalendarStandartCell = ({children, xs, hours, dayNumber, createTaskInCell
{
children
}
{
isThisCell
?
<
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
>
Задача
...
...
planner-front/src/components/MonthCalendarBody/CalendarTask/CalendarTask.js
View file @
2fc36f54
...
...
@@ -6,7 +6,7 @@ import { editCalendarTask } from "../../../store/actions/tasksActions";
const
TaskDefault
=
({
task
,
onClickTaskHandler
})
=>
{
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
}
>
<
span
>
...
...
@@ -17,7 +17,7 @@ const TaskDefault = ({task, onClickTaskHandler}) => {
const
TaskWithNoStartAndAllEnd
=
({
task
,
onClickTaskHandler
})
=>
{
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
}
>
<
span
>
...
...
@@ -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
hour
=
parseInt
(
hours
.
split
(
':'
)[
0
])
const
tasksCell
=
useMemo
(()
=>
{
return
[]
},
[])
useEffect
(()
=>
{
if
(
!
currentTask
.
title
)
{
...
...
@@ -120,6 +117,7 @@ const CalendarTask = ({year, month, tasks, day, hours, setCurrentTask, hourForma
}
else
{
return
(
<
Empty
/>
)
}
...
...
planner-front/src/containers/MonthCalendar/MonthCalendar.js
View file @
2fc36f54
...
...
@@ -114,7 +114,7 @@ function MonthCalendar() {
description
:
"описание"
,
priority
:
null
,
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
))
}
...
...
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