#89 added cosmetics to fallout list of dates

parent 2c79ffcc
......@@ -22,7 +22,7 @@ import CalendarMonthIcon from '@mui/icons-material/CalendarMonth';
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
const weekDays = ["Пн","Вт","Ср","Чт","Пт","Сб","Вс" ];
const TableRowTask= ({
user,
......@@ -51,6 +51,10 @@ const TableRowTask= ({
const timeTransform = (dateIso)=>{
return moment.utc(dateIso).format("HH:"+"00");
}
const getDayOfWeek = (dateIso) => {
const date = new Date(dateIso);
return weekDays[date.getDay()];
}
return (
<>
......@@ -301,8 +305,8 @@ const TableRowTask= ({
<Table size="small" aria-label="purchases">
<TableHead>
<TableRow>
<TableCell colSpan={10} >Дата создания события</TableCell>
<TableCell align="right">дд-мм-гг</TableCell>
<TableCell colSpan={10} >Дата создания</TableCell>
<TableCell align="right">День недели</TableCell>
<TableCell align="right">Начало</TableCell>
<TableCell align="center" colSpan={1}>Окончание</TableCell>
</TableRow>
......@@ -311,10 +315,14 @@ const TableRowTask= ({
{task.dateTimeTasks.map((dateTimeTask, index) => (
<TableRow key={index}>
<TableCell component="th" scope="row" colSpan={10}>
{dateTimeTransform(dateTimeTask.createdAt)}
{moment(task.createdAt)
.utc()
.format("DD/MM")}
</TableCell>
<TableCell align="right">
{dateTransform(dateTimeTask.dateTimeStart)}
{getDayOfWeek(dateTimeTask.dateTimeStart)}, {moment(dateTimeTask.dateTimeStart)
.utc()
.format("DD/MM")}
</TableCell>
<TableCell align="right">
{timeTransform(dateTimeTask.dateTimeStart)}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment