#123 setup filter from not defined title projects

parent 1ac76af3
......@@ -216,7 +216,6 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
)
const projectsList= projectsRawId.map(project=> {return project.id})
const tasks = await dataSource
.getRepository(Task)
.find(
......@@ -229,6 +228,9 @@ router.get('/my',auth, async (req: Request, res: Response):Promise<Response>=>{
executor:{
id:user.id
},
project:{
id:In(projectsList)
}
}
}
)
......
......@@ -25,6 +25,15 @@ const CustomTableCell = ({
flexDirection: "column",
fontSize: "12px",
};
if (name==='dateTimeDeadLine'){
console.log('dateTimeDeadLine ', name, ' ', value)
}
const divTwoStyle = {
display: "flex",
flexDirection: "row",
fontSize: "12px",
};
const duration = moment.duration(
moment(task?.dateTimeTasks[0]?.dateTimeDue).diff(
......@@ -55,10 +64,17 @@ const CustomTableCell = ({
/>
) : name !== "dateTimeStart" ? (
<span>{value}</span>
) : (
) :name === "dateTimeDeadLine"&& value==='Invalid date' ?
<span>''</span>
:(
<div style={divStyle}>
<span>{value}</span>
<span>{value2}</span>
<div style={divTwoStyle}>
<span title={
moment(task.dateTimeTasks[0]?.dateTimeStart)
.utc()
.format("DD/MM/YY")}
>{value}</span> <span> &nbsp;</span>
<span>({value2})</span></div>
<span>часы:{hours}</span>
</div>
)}
......
......@@ -13,7 +13,7 @@ import {
} from "@mui/material";
import { useState } from "react";
import { useDispatch, useSelector } from "react-redux";
import { AddBox } from "@mui/icons-material";
import { AddBox, Luggage } from "@mui/icons-material";
import moment from "moment";
import CustomTableCell from "./CustomTableCell";
import MaterialUIPickers from "./DateTimePicker/DateTimePicker";
......@@ -39,8 +39,8 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
accomplish: "opened",
priority: "B",
author: { id: user.id },
authorDisplayName: user.displayName,
executors: [],
// authorDisplayName: user.displayName,
executor:null,
isEditMode: true,
});
......@@ -71,6 +71,7 @@ export default function NewTaskForm({ projects, setAddTaskForm }) {
};
const onDateChange = (id, value, property) => {
console.log('value ', value, 'property ', property)
const newTask = {
...task,
[property]: moment.parseZone(value, "DD/MM/YYYY", true).format(),
......
......@@ -197,13 +197,13 @@ const TableRowTask= ({
name: "dateTimeStart",
value: moment(task.dateTimeTasks[0]?.dateTimeStart)
.utc()
.format("DD-MM-YY "),
.format("DD/MM "),
value2:moment(task.dateTimeTasks[0]?.dateTimeStart)
.utc()
.format("kk:mm")+" - "+
.format("kk:00")+" - "+
moment(task.dateTimeTasks[0]?.dateTimeDue)
.utc()
.format("kk:mm"),
.format("kk:00"),
user:user
}}>
</CustomTableCell>
......@@ -228,7 +228,7 @@ const TableRowTask= ({
value: moment(task.dateTimeDeadLine
)
.utc()
.format("DD-MM-YY kk:mm"),
.format("DD/MM kk:mm"),
user:user
}}
/>
......
......@@ -211,7 +211,7 @@ export default function EnhancedTable() {
) : null}
<TableContainer>
<Table sx={{ minWidth: 600 }} aria-labelledby="tableTitle">
<Table sx={{ minWidth: 600 }} aria-labelledby="tableTitle" size='small'>
<EnhancedTableHead
order={order}
orderBy={orderBy}
......
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