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
95a5903f
Commit
95a5903f
authored
Jan 11, 2023
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#148
Исправил ошибку с селектом и кей пропом
parent
d0dc6458
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
14 additions
and
19 deletions
+14
-19
CalendarRowDay.js
...lendar/MonthCalendarBody/CalendarRowDay/CalendarRowDay.js
+3
-4
CalendarModalTaskContent.js
...s/UI/CalendarModalTaskContent/CalendarModalTaskContent.js
+1
-1
CalendarStandartCell.js
...Calendars/UI/CalendarStandartCell/CalendarStandartCell.js
+0
-1
CalendarColumnDayWeek.js
...lendarBody/CalendarColumnDayWeek/CalendarColumnDayWeek.js
+5
-8
constants.js
planner-front/src/constants.js
+1
-1
MonthCalendar.js
planner-front/src/containers/MonthCalendar/MonthCalendar.js
+2
-2
WeekCalendar.js
planner-front/src/containers/WeekCalendar/WeekCalendar.js
+2
-2
No files found.
planner-front/src/components/Calendars/MonthCalendar/MonthCalendarBody/CalendarRowDay/CalendarRowDay.js
View file @
95a5903f
...
...
@@ -40,8 +40,7 @@ const CalendarRowDay = ({ xs, hoursInDay, createTaskInCellHandler, currentTask,
>
{
linesInDay
?.
map
((
line
,
i
)
=>
{
const
tasks
=
getTasksWithInfoForPosition
(
line
,
hoursInDay
,
sortedTasks
,
i
,
rowDaySize
.
width
)
return
(
<>
{
tasks
.
map
((
task
)
=>
{
return
(
tasks
.
map
((
task
)
=>
{
const
step
=
rowDaySize
.
width
/
hoursInDay
.
length
return
(
<
CalendarTask
...
...
@@ -61,8 +60,8 @@ const CalendarRowDay = ({ xs, hoursInDay, createTaskInCellHandler, currentTask,
>
<
/CalendarTask
>
)
})
}
<
/>
)
})
)
})}
{
hoursInDay
.
map
((
hour
,
i
)
=>
{
...
...
planner-front/src/components/Calendars/UI/CalendarModalTaskContent/CalendarModalTaskContent.js
View file @
95a5903f
...
...
@@ -34,7 +34,7 @@ function CalendarModalTaskContent({ title, onChangeCurrentTaskHandler, descripti
/
>
<
div
style
=
{{
display
:
'flex'
,
gap
:
'20px'
,
margin
:
'20px 0'
}}
>
<
CustomSelect
defaultValue
=
{
null
}
defaultValue
=
{
priorities
[
0
]?.
value
}
value
=
{
priority
}
name
=
{
'priority'
}
variant
=
{
'outlined'
}
...
...
planner-front/src/components/Calendars/UI/CalendarStandartCell/CalendarStandartCell.js
View file @
95a5903f
...
...
@@ -22,7 +22,6 @@ const CalendarStandartCell = ({ children, xs, hours, dayNumber, createTaskInCell
}
},[
copyTask
,
copyModeTask
,
year
,
month
,
dayNumber
,
hours
])
// console.log(copyTask)
const
cellClass
=
useMemo
(()
=>
{
const
backgroundColor
=
isDeadLine
?
'#fa9b9be3'
:
'null'
return
({
...
...
planner-front/src/components/Calendars/WeekCalendar/WeekCalendarBody/CalendarColumnDayWeek/CalendarColumnDayWeek.js
View file @
95a5903f
import
{
useMemo
}
from
"react"
;
import
React
,
{
useMemo
}
from
"react"
;
import
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../../helpers/CalendarHelpers"
;
import
CalendarStandartCell
from
"../../../UI/CalendarStandartCell/CalendarStandartCell"
;
import
{
useEffect
,
useRef
,
useState
}
from
"react"
;
...
...
@@ -8,7 +8,7 @@ import { getTasksWithInfoForPosition, getWidthLeftZIndex } from "./Helpers";
function
CalendarColumnDayWeek
({
hoursInDay
,
tasks
,
month
,
year
,
day
,
hourFormat
,
handleOpen
,
setCurrentTask
,
copyTask
,
setCopyTask
,
createCopyTask
,
createTaskInCellHandler
,
modal
,
dragTaskHandler
,
copyMode
,
deleteTaskHandler
})
{
function
CalendarColumnDayWeek
({
hoursInDay
,
tasks
,
month
,
year
,
day
,
hourFormat
,
handleOpen
,
setCurrentTask
,
copyTask
,
setCopyTask
,
createCopyTask
,
createTaskInCellHandler
,
modal
,
dragTaskHandler
,
copyMode
,
deleteTaskHandler
})
{
const
[
columnDaySize
,
setColumnDaySize
]
=
useState
({
width
:
0
,
height
:
0
})
...
...
@@ -39,8 +39,7 @@ function CalendarColumnDayWeek({ hoursInDay, tasks, month, year, day, hourFormat
<
Grid
item
xs
=
{
12
/
7
}
ref
=
{
dayColumnRef
}
sx
=
{{
position
:
'relative'
}}
>
{
linesInDay
?.
map
((
line
,
i
)
=>
{
const
boxes
=
getTasksWithInfoForPosition
(
line
,
sortedTasks
,
linesInDay
,
columnDaySize
.
height
,
hours
)
return
(
<>
{
boxes
.
map
((
task
)
=>
{
return
boxes
.
map
((
task
)
=>
{
const
{
width
,
left
,
zIndex
}
=
getWidthLeftZIndex
(
task
,
columnDaySize
.
width
,
i
)
const
step
=
columnDaySize
.
height
/
hours
.
length
const
tasksLength
=
task
.
tasksInHour
...
...
@@ -64,11 +63,9 @@ function CalendarColumnDayWeek({ hoursInDay, tasks, month, year, day, hourFormat
hourFormat
=
{
hourFormat
}
copyModeTask
=
{
copyMode
.
task
}
deleteTaskHandler
=
{
deleteTaskHandler
}
>
<
/CalendarWeekTask
>
/
>
)
})}
<
/>
)
})
})}
{
hoursInDay
?.
map
((
hour
,
i
)
=>
{
...
...
planner-front/src/constants.js
View file @
95a5903f
...
...
@@ -15,7 +15,7 @@ export const anonymoysMenuButtons = [
]
export
const
priorities
=
[
{
value
:
null
,
text
:
'--Приоритет--'
},
{
value
:
''
,
text
:
'--Приоритет--'
},
{
value
:
'A'
,
text
:
'A'
},
{
value
:
'B'
,
text
:
'B'
},
{
value
:
'C'
,
text
:
'C'
}
...
...
planner-front/src/containers/MonthCalendar/MonthCalendar.js
View file @
95a5903f
...
...
@@ -20,7 +20,7 @@ function MonthCalendar() {
const
[
hourFormat
,
setHourFormat
]
=
useState
(
false
);
const
[
dateNow
,
setDateNow
]
=
useState
({
month
:
''
,
year
:
''
})
const
[
workerInfo
,
setWorkerInfo
]
=
useState
({
project
:
''
,
worker
:
''
});
const
[
currentTask
,
setCurrentTask
]
=
useState
({
title
:
''
,
description
:
''
,
priority
:
null
,
infoForCell
:
{
startHour
:
null
,
endHour
:
null
}
})
const
[
currentTask
,
setCurrentTask
]
=
useState
({
title
:
''
,
description
:
''
,
priority
:
''
,
infoForCell
:
{
startHour
:
null
,
endHour
:
null
}
})
const
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
cellSizes
,
setCellSizes
]
=
useState
({})
const
[
userId
,
setUserId
]
=
useState
(
''
)
...
...
@@ -141,7 +141,7 @@ function MonthCalendar() {
const
newTask
=
{
title
:
"Задача"
,
description
:
"описание"
,
priority
:
null
,
priority
:
''
,
dateTimeStart
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hour
,
0
)),
dateTimeDue
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hourDue
,
59
)),
infoForCell
:
{
...
...
planner-front/src/containers/WeekCalendar/WeekCalendar.js
View file @
95a5903f
...
...
@@ -23,7 +23,7 @@ function WeekCalendar() {
const
[
workerInfo
,
setWorkerInfo
]
=
useState
({
project
:
''
,
worker
:
''
});
const
[
dateNow
,
setDateNow
]
=
useState
({
year
:
''
,
month
:
''
,
currentDay
:
''
})
const
[
currentTask
,
setCurrentTask
]
=
useState
({
title
:
''
,
description
:
''
,
priority
:
null
,
infoForCell
:
{
startHour
:
null
,
endHour
:
null
}
})
const
[
currentTask
,
setCurrentTask
]
=
useState
({
title
:
''
,
description
:
''
,
priority
:
''
,
infoForCell
:
{
startHour
:
null
,
endHour
:
null
}
})
const
[
hourFormat
,
setHourFormat
]
=
useState
(
false
);
const
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
userCalendarId
,
setUserCalendarId
]
=
useState
(
null
)
...
...
@@ -138,7 +138,7 @@ function WeekCalendar() {
const
newTask
=
{
title
:
"Задача"
,
description
:
"описание"
,
priority
:
null
,
priority
:
''
,
dateTimeStart
:
dateToISOLikeButLocal
(
new
Date
(
year
,
month
,
dayNumber
,
hour
,
0
)),
dateTimeDue
:
dateToISOLikeButLocal
(
new
Date
(
year
,
month
,
dayNumber
,
hourDue
,
59
)),
infoForCell
:
{
...
...
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