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
2c6f4ba7
Commit
2c6f4ba7
authored
Dec 05, 2022
by
Евгений Положенцев
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#89
fix day of week
parent
8bcc12db
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
11 deletions
+5
-11
TableRowTask.js
...components/MyTasksCompoments/TableRowTask/TableRowTask.js
+5
-11
No files found.
planner-front/src/components/MyTasksCompoments/TableRowTask/TableRowTask.js
View file @
2c6f4ba7
...
@@ -22,7 +22,7 @@ import CalendarMonthIcon from '@mui/icons-material/CalendarMonth';
...
@@ -22,7 +22,7 @@ import CalendarMonthIcon from '@mui/icons-material/CalendarMonth';
import
KeyboardArrowDownIcon
from
'@mui/icons-material/KeyboardArrowDown'
;
import
KeyboardArrowDownIcon
from
'@mui/icons-material/KeyboardArrowDown'
;
import
KeyboardArrowUpIcon
from
'@mui/icons-material/KeyboardArrowUp'
;
import
KeyboardArrowUpIcon
from
'@mui/icons-material/KeyboardArrowUp'
;
const
weekDays
=
[
"
Пн"
,
"Вт"
,
"Ср"
,
"Чт"
,
"Пт"
,
"Сб"
,
"Вс
"
];
const
weekDays
=
[
"
Вс"
,
"Пн"
,
"Вт"
,
"Ср"
,
"Чт"
,
"Пт"
,
"Сб
"
];
const
TableRowTask
=
({
const
TableRowTask
=
({
user
,
user
,
...
@@ -40,20 +40,14 @@ const TableRowTask= ({
...
@@ -40,20 +40,14 @@ const TableRowTask= ({
})
=>
{
})
=>
{
const
[
open
,
setOpen
]
=
React
.
useState
(
false
);
const
[
open
,
setOpen
]
=
React
.
useState
(
false
);
const
dateTimeTransform
=
(
dateIso
)
=>
{
const
event
=
new
Date
(
dateIso
);
return
event
.
toLocaleString
(
'ru-KZ'
,
{
timeZone
:
'UTC'
})
}
const
dateTransform
=
(
dateIso
)
=>
{
let
date
=
new
Date
(
dateIso
);
return
date
.
getDate
()
+
'-'
+
(
date
.
getMonth
()
+
1
)
+
'-'
+
date
.
getFullYear
().
toString
().
slice
(
-
2
);
}
const
timeTransform
=
(
dateIso
)
=>
{
const
timeTransform
=
(
dateIso
)
=>
{
return
moment
.
utc
(
dateIso
).
format
(
"HH:"
+
"00"
);
return
moment
.
utc
(
dateIso
).
format
(
"HH:"
+
"00"
);
}
}
const
getDayOfWeek
=
(
dateIso
)
=>
{
const
getDayOfWeek
=
(
dateIso
)
=>
{
const
date
=
new
Date
(
dateIso
);
const
date
=
moment
.
utc
(
dateIso
);
return
weekDays
[
date
.
getD
ay
()];
return
weekDays
[
date
.
d
ay
()];
}
}
return
(
return
(
...
...
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