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
a60811ad
Commit
a60811ad
authored
Dec 05, 2022
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#89
fix hour round up
parent
2c6f4ba7
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
1 deletion
+9
-1
TableRowTask.js
...components/MyTasksCompoments/TableRowTask/TableRowTask.js
+9
-1
No files found.
planner-front/src/components/MyTasksCompoments/TableRowTask/TableRowTask.js
View file @
a60811ad
...
@@ -41,15 +41,23 @@ const TableRowTask= ({
...
@@ -41,15 +41,23 @@ const TableRowTask= ({
const
[
open
,
setOpen
]
=
React
.
useState
(
false
);
const
[
open
,
setOpen
]
=
React
.
useState
(
false
);
const
roudHourUp
=
(
dateIso
)
=>
{
let
m
=
moment
(
dateIso
);
let
roundUp
=
m
.
minute
()
||
m
.
second
()
||
m
.
millisecond
()
?
m
.
add
(
1
,
'hour'
).
startOf
(
'hour'
)
:
m
.
startOf
(
'hour'
);
return
roundUp
}
const
timeTransform
=
(
dateIso
)
=>
{
const
timeTransform
=
(
dateIso
)
=>
{
return
moment
.
utc
(
dateIso
).
format
(
"HH:"
+
"00"
);
const
exp
=
roudHourUp
(
moment
.
utc
(
dateIso
)).
format
(
"HH:"
+
"00"
)
return
exp
;
}
}
const
getDayOfWeek
=
(
dateIso
)
=>
{
const
getDayOfWeek
=
(
dateIso
)
=>
{
const
date
=
moment
.
utc
(
dateIso
);
const
date
=
moment
.
utc
(
dateIso
);
return
weekDays
[
date
.
day
()];
return
weekDays
[
date
.
day
()];
}
}
return
(
return
(
<>
<>
<
TableRow
hover
key
=
{
task
.
id
}
>
<
TableRow
hover
key
=
{
task
.
id
}
>
...
...
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