скорректировала вывод дат и времени под новый формат модели Таска

parent e76b3f24
......@@ -15,7 +15,7 @@ const CustomTableCell = ({task,
}) => {
const styles = { width: "auto", height: "10px"};
const divStyle={display:"flex",justifyContent:"space-between", flexDirection:"column",fontSize:"12px"}
const duration = moment.duration(moment(task.dateTimeDue).diff(moment(task.dateTimeStart)));
const duration = moment.duration(moment(task.dateTimeTasks[0]?.dateTimeDue).diff(moment(task.dateTimeTasks[0]?.dateTimeStart)));
const hours = Math.round(duration.asHours());
if (task) {
......
......@@ -377,21 +377,20 @@ console.log(tasks)
{...{
task,
name: "dateTimeStart",
value: moment(task.dateTimeStart)
value: moment(task.dateTimeTasks[0]?.dateTimeStart)
.utc()
.format("DD-MM-YYYY "),
value2:moment(task.dateTimeStart)
value2:moment(task.dateTimeTasks[0]?.dateTimeStart)
.utc()
.format("hh:mm A")+"-"+
moment(task.dateTimeDue)
moment(task.dateTimeTasks[0]?.dateTimeDue)
.utc()
.format("hh:mm A"),
user:user
}}>
<span>"время завершения"+ {moment(task.dateTimeDue)
{/* <span>"время завершения"+ {moment(task.dateTimeDue)
.utc()
.format("hh:mm A")}</span>
.format("hh:mm A")}</span> */}
</CustomTableCell>
</>
......@@ -419,8 +418,9 @@ console.log(tasks)
<CustomTableCell
{...{
task,
name: "dateTimeDue",
value: moment(task.dateTimeDue)
name: "dateTimeDeadLine",
value: moment(task.dateTimeDeadLine
)
.utc()
.format("DD-MM-YYYY hh:mm A"),
user:user
......
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