#146 setup mytask on translated statuses of tasks

parent 00ed8c90
......@@ -14,7 +14,7 @@ import {
import {Project} from './Project';
import { DateTimeTask } from './DateTimeTask';
export type taskFinishType = "opened"| "in-progress" | "done" |"failed"|"cancelled";
export type taskFinishType = "opened"| "progress" | "done" |"failed"|"cancelled";
export type priorityType = "A" | "B" |"C";
interface ITask{
......@@ -55,7 +55,7 @@ import { DateTimeTask } from './DateTimeTask';
@Column({
type: "enum",
enum: ["opened", "done" , "failed","in-progress","cancelled"],
enum: ["opened", "done" , "failed","progress","cancelled"],
default: "opened"
})
accomplish!: taskFinishType
......
......@@ -22,7 +22,7 @@ const CalendarStandartCell = ({ children, xs, hours, dayNumber, createTaskInCell
}
},[copyTask, copyModeTask, year, month, dayNumber, hours])
console.log(copyTask)
// console.log(copyTask)
const cellClass = useMemo(() => {
const backgroundColor = isDeadLine ? '#fa9b9be3' : 'null'
return ({
......
......@@ -25,6 +25,7 @@ import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
import { useNavigate } from "react-router-dom";
import { useDispatch } from "react-redux";
import { activateCreateCopyTasksMode } from "../../../store/actions/tasksActions";
import { TaskStatuses } from "../../../helpers/TableTasksHelpers";
const weekDays = ["Вс","Пн","Вт","Ср","Чт","Пт","Сб" ];
......@@ -232,9 +233,11 @@ const TableRowTask= ({
<TableCell>
<BasicSelect
items={[
{ value: "opened", title: "opened" },
{ value: "done", title: "done" },
{ value: "failed", title: "failed" },
{ value: "opened", title: "создано" },
{ value: "done", title: "выполнено" },
{ value: "failed", title: "просрочено" },
{ value: "progress", title: "в работе" },
{ value: "cancelled", title: "отменено" },
]}
task={task}
onChange={onChange}
......@@ -248,7 +251,7 @@ const TableRowTask= ({
{...{
task,
name: "accomplish",
value: task.accomplish,
value: TaskStatuses[task.accomplish],
user:user
}}
/>
......
......@@ -44,7 +44,7 @@ export default function EnhancedTable() {
}, [
tasks?.length,
addTaskForm, setAddTaskForm, dispatch]);
console.log('tasks ', tasks, 'projects ', projects,"recievedTasks ", recievedTasks )
// console.log('tasks ', tasks, 'projects ', projects,"recievedTasks ", recievedTasks )
......
export const TaskStatuses = {
'done': 'выполнено',
'cancelled': 'отменено',
'progress': 'в работе',
'failed': 'просрочено',
'opened': 'создано'
};
\ No newline at end of file
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