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
Hide 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,
...
@@ -40,8 +40,7 @@ const CalendarRowDay = ({ xs, hoursInDay, createTaskInCellHandler, currentTask,
>
>
{
linesInDay
?.
map
((
line
,
i
)
=>
{
{
linesInDay
?.
map
((
line
,
i
)
=>
{
const
tasks
=
getTasksWithInfoForPosition
(
line
,
hoursInDay
,
sortedTasks
,
i
,
rowDaySize
.
width
)
const
tasks
=
getTasksWithInfoForPosition
(
line
,
hoursInDay
,
sortedTasks
,
i
,
rowDaySize
.
width
)
return
(
<>
return
(
tasks
.
map
((
task
)
=>
{
{
tasks
.
map
((
task
)
=>
{
const
step
=
rowDaySize
.
width
/
hoursInDay
.
length
const
step
=
rowDaySize
.
width
/
hoursInDay
.
length
return
(
return
(
<
CalendarTask
<
CalendarTask
...
@@ -61,8 +60,8 @@ const CalendarRowDay = ({ xs, hoursInDay, createTaskInCellHandler, currentTask,
...
@@ -61,8 +60,8 @@ const CalendarRowDay = ({ xs, hoursInDay, createTaskInCellHandler, currentTask,
>
>
<
/CalendarTask
>
<
/CalendarTask
>
)
)
})
}
})
<
/>
)
)
})}
})}
{
hoursInDay
.
map
((
hour
,
i
)
=>
{
{
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
...
@@ -34,7 +34,7 @@ function CalendarModalTaskContent({ title, onChangeCurrentTaskHandler, descripti
/
>
/
>
<
div
style
=
{{
display
:
'flex'
,
gap
:
'20px'
,
margin
:
'20px 0'
}}
>
<
div
style
=
{{
display
:
'flex'
,
gap
:
'20px'
,
margin
:
'20px 0'
}}
>
<
CustomSelect
<
CustomSelect
defaultValue
=
{
null
}
defaultValue
=
{
priorities
[
0
]?.
value
}
value
=
{
priority
}
value
=
{
priority
}
name
=
{
'priority'
}
name
=
{
'priority'
}
variant
=
{
'outlined'
}
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
...
@@ -22,7 +22,6 @@ const CalendarStandartCell = ({ children, xs, hours, dayNumber, createTaskInCell
}
}
},[
copyTask
,
copyModeTask
,
year
,
month
,
dayNumber
,
hours
])
},[
copyTask
,
copyModeTask
,
year
,
month
,
dayNumber
,
hours
])
// console.log(copyTask)
const
cellClass
=
useMemo
(()
=>
{
const
cellClass
=
useMemo
(()
=>
{
const
backgroundColor
=
isDeadLine
?
'#fa9b9be3'
:
'null'
const
backgroundColor
=
isDeadLine
?
'#fa9b9be3'
:
'null'
return
({
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
{
getHoursInDayNumbers
,
getAvailableTasks
,
getLinesInDay
,
getSortedTasks
}
from
"../../../../../helpers/CalendarHelpers"
;
import
CalendarStandartCell
from
"../../../UI/CalendarStandartCell/CalendarStandartCell"
;
import
CalendarStandartCell
from
"../../../UI/CalendarStandartCell/CalendarStandartCell"
;
import
{
useEffect
,
useRef
,
useState
}
from
"react"
;
import
{
useEffect
,
useRef
,
useState
}
from
"react"
;
...
@@ -8,7 +8,7 @@ import { getTasksWithInfoForPosition, getWidthLeftZIndex } from "./Helpers";
...
@@ -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
})
const
[
columnDaySize
,
setColumnDaySize
]
=
useState
({
width
:
0
,
height
:
0
})
...
@@ -39,8 +39,7 @@ function CalendarColumnDayWeek({ hoursInDay, tasks, month, year, day, hourFormat
...
@@ -39,8 +39,7 @@ function CalendarColumnDayWeek({ hoursInDay, tasks, month, year, day, hourFormat
<
Grid
item
xs
=
{
12
/
7
}
ref
=
{
dayColumnRef
}
sx
=
{{
position
:
'relative'
}}
>
<
Grid
item
xs
=
{
12
/
7
}
ref
=
{
dayColumnRef
}
sx
=
{{
position
:
'relative'
}}
>
{
linesInDay
?.
map
((
line
,
i
)
=>
{
{
linesInDay
?.
map
((
line
,
i
)
=>
{
const
boxes
=
getTasksWithInfoForPosition
(
line
,
sortedTasks
,
linesInDay
,
columnDaySize
.
height
,
hours
)
const
boxes
=
getTasksWithInfoForPosition
(
line
,
sortedTasks
,
linesInDay
,
columnDaySize
.
height
,
hours
)
return
(
<>
return
boxes
.
map
((
task
)
=>
{
{
boxes
.
map
((
task
)
=>
{
const
{
width
,
left
,
zIndex
}
=
getWidthLeftZIndex
(
task
,
columnDaySize
.
width
,
i
)
const
{
width
,
left
,
zIndex
}
=
getWidthLeftZIndex
(
task
,
columnDaySize
.
width
,
i
)
const
step
=
columnDaySize
.
height
/
hours
.
length
const
step
=
columnDaySize
.
height
/
hours
.
length
const
tasksLength
=
task
.
tasksInHour
const
tasksLength
=
task
.
tasksInHour
...
@@ -64,11 +63,9 @@ function CalendarColumnDayWeek({ hoursInDay, tasks, month, year, day, hourFormat
...
@@ -64,11 +63,9 @@ function CalendarColumnDayWeek({ hoursInDay, tasks, month, year, day, hourFormat
hourFormat
=
{
hourFormat
}
hourFormat
=
{
hourFormat
}
copyModeTask
=
{
copyMode
.
task
}
copyModeTask
=
{
copyMode
.
task
}
deleteTaskHandler
=
{
deleteTaskHandler
}
deleteTaskHandler
=
{
deleteTaskHandler
}
>
/
>
<
/CalendarWeekTask
>
)
)
})}
})
<
/>
)
})}
})}
{
hoursInDay
?.
map
((
hour
,
i
)
=>
{
{
hoursInDay
?.
map
((
hour
,
i
)
=>
{
...
...
planner-front/src/constants.js
View file @
95a5903f
...
@@ -15,7 +15,7 @@ export const anonymoysMenuButtons = [
...
@@ -15,7 +15,7 @@ export const anonymoysMenuButtons = [
]
]
export
const
priorities
=
[
export
const
priorities
=
[
{
value
:
null
,
text
:
'--Приоритет--'
},
{
value
:
''
,
text
:
'--Приоритет--'
},
{
value
:
'A'
,
text
:
'A'
},
{
value
:
'A'
,
text
:
'A'
},
{
value
:
'B'
,
text
:
'B'
},
{
value
:
'B'
,
text
:
'B'
},
{
value
:
'C'
,
text
:
'C'
}
{
value
:
'C'
,
text
:
'C'
}
...
...
planner-front/src/containers/MonthCalendar/MonthCalendar.js
View file @
95a5903f
...
@@ -20,7 +20,7 @@ function MonthCalendar() {
...
@@ -20,7 +20,7 @@ function MonthCalendar() {
const
[
hourFormat
,
setHourFormat
]
=
useState
(
false
);
const
[
hourFormat
,
setHourFormat
]
=
useState
(
false
);
const
[
dateNow
,
setDateNow
]
=
useState
({
month
:
''
,
year
:
''
})
const
[
dateNow
,
setDateNow
]
=
useState
({
month
:
''
,
year
:
''
})
const
[
workerInfo
,
setWorkerInfo
]
=
useState
({
project
:
''
,
worker
:
''
});
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
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
cellSizes
,
setCellSizes
]
=
useState
({})
const
[
cellSizes
,
setCellSizes
]
=
useState
({})
const
[
userId
,
setUserId
]
=
useState
(
''
)
const
[
userId
,
setUserId
]
=
useState
(
''
)
...
@@ -141,7 +141,7 @@ function MonthCalendar() {
...
@@ -141,7 +141,7 @@ function MonthCalendar() {
const
newTask
=
{
const
newTask
=
{
title
:
"Задача"
,
title
:
"Задача"
,
description
:
"описание"
,
description
:
"описание"
,
priority
:
null
,
priority
:
''
,
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
,
59
)),
dateTimeDue
:
dateToISOLikeButLocal
(
new
Date
(
dateNow
.
year
,
dateNow
.
month
,
dayNumber
,
hourDue
,
59
)),
infoForCell
:
{
infoForCell
:
{
...
...
planner-front/src/containers/WeekCalendar/WeekCalendar.js
View file @
95a5903f
...
@@ -23,7 +23,7 @@ function WeekCalendar() {
...
@@ -23,7 +23,7 @@ function WeekCalendar() {
const
[
workerInfo
,
setWorkerInfo
]
=
useState
({
project
:
''
,
worker
:
''
});
const
[
workerInfo
,
setWorkerInfo
]
=
useState
({
project
:
''
,
worker
:
''
});
const
[
dateNow
,
setDateNow
]
=
useState
({
year
:
''
,
month
:
''
,
currentDay
:
''
})
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
[
hourFormat
,
setHourFormat
]
=
useState
(
false
);
const
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
copyTask
,
setCopyTask
]
=
useState
(
null
)
const
[
userCalendarId
,
setUserCalendarId
]
=
useState
(
null
)
const
[
userCalendarId
,
setUserCalendarId
]
=
useState
(
null
)
...
@@ -138,7 +138,7 @@ function WeekCalendar() {
...
@@ -138,7 +138,7 @@ function WeekCalendar() {
const
newTask
=
{
const
newTask
=
{
title
:
"Задача"
,
title
:
"Задача"
,
description
:
"описание"
,
description
:
"описание"
,
priority
:
null
,
priority
:
''
,
dateTimeStart
:
dateToISOLikeButLocal
(
new
Date
(
year
,
month
,
dayNumber
,
hour
,
0
)),
dateTimeStart
:
dateToISOLikeButLocal
(
new
Date
(
year
,
month
,
dayNumber
,
hour
,
0
)),
dateTimeDue
:
dateToISOLikeButLocal
(
new
Date
(
year
,
month
,
dayNumber
,
hourDue
,
59
)),
dateTimeDue
:
dateToISOLikeButLocal
(
new
Date
(
year
,
month
,
dayNumber
,
hourDue
,
59
)),
infoForCell
:
{
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