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

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