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
572b2feb
Commit
572b2feb
authored
Dec 26, 2022
by
Ermolaev Timur
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#132
Исправил баг со временем для колонки дня недели
parent
5bca45a0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
+6
-6
CalendarColumnDayWeek.js
...lendarBody/CalendarColumnDayWeek/CalendarColumnDayWeek.js
+1
-1
Helpers.js
...onents/Calendars/WeekCalendar/WeekCalendarBody/Helpers.js
+5
-5
No files found.
planner-front/src/components/Calendars/WeekCalendar/WeekCalendarBody/CalendarColumnDayWeek/CalendarColumnDayWeek.js
View file @
572b2feb
...
@@ -11,7 +11,7 @@ import { getTasksWithInfoForPosition, getWidthLeftZIndex } from "./Helpers";
...
@@ -11,7 +11,7 @@ import { getTasksWithInfoForPosition, getWidthLeftZIndex } from "./Helpers";
function
CalendarColumnDayWeek
({
hoursInDay
,
tasks
,
month
,
year
,
day
,
hourFormat
,
handleOpen
,
setCurrentTask
,
copyTask
,
setCopyTask
,
createCopyTask
,
createTaskInCellHandler
,
modal
,
dragTaskHandler
})
{
function
CalendarColumnDayWeek
({
hoursInDay
,
tasks
,
month
,
year
,
day
,
hourFormat
,
handleOpen
,
setCurrentTask
,
copyTask
,
setCopyTask
,
createCopyTask
,
createTaskInCellHandler
,
modal
,
dragTaskHandler
})
{
const
[
columnDaySize
,
setColumnDaySize
]
=
useState
({
width
:
0
,
height
:
0
})
const
[
columnDaySize
,
setColumnDaySize
]
=
useState
({
width
:
0
,
height
:
0
})
console
.
log
(
month
,
year
)
const
dayColumnRef
=
useRef
(
''
)
const
dayColumnRef
=
useRef
(
''
)
useEffect
(()
=>
{
useEffect
(()
=>
{
setColumnDaySize
(
prev
=>
{
return
{
height
:
dayColumnRef
.
current
.
offsetHeight
,
width
:
dayColumnRef
.
current
.
offsetWidth
}
})
setColumnDaySize
(
prev
=>
{
return
{
height
:
dayColumnRef
.
current
.
offsetHeight
,
width
:
dayColumnRef
.
current
.
offsetWidth
}
})
...
...
planner-front/src/components/Calendars/WeekCalendar/WeekCalendarBody/Helpers.js
View file @
572b2feb
...
@@ -10,12 +10,12 @@ export const getCurrentWeekDayString = (dayNumber) => {
...
@@ -10,12 +10,12 @@ export const getCurrentWeekDayString = (dayNumber) => {
export
const
getMonthAndYearToDayColumn
=
(
week
,
weekDay
,
month
,
year
)
=>
{
export
const
getMonthAndYearToDayColumn
=
(
week
,
weekDay
,
month
,
year
)
=>
{
if
(
week
[
0
]
>
week
[
6
])
{
if
(
week
[
0
]
>
week
[
6
])
{
if
(
weekDay
<
week
[
0
])
{
if
(
weekDay
<
week
[
0
])
{
return
{
month
:
month
,
year
:
year
}
if
(
month
+
1
===
12
)
{
}
else
{
return
{
month
:
0
,
year
:
year
+
1
}
if
(
month
===
0
)
{
return
{
month
:
11
,
year
:
year
-
1
}
}
}
return
{
month
:
month
-
1
,
year
:
year
}
return
{
month
:
month
+
1
,
year
:
year
}
}
else
{
return
{
month
:
month
,
year
:
year
}
}
}
}
else
{
}
else
{
return
{
month
:
month
,
year
:
year
}
return
{
month
:
month
,
year
:
year
}
...
...
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