Merge branch 'task-146-enhance/task_statuses_wider' into 'development'

Task 146 enhance/task statuses wider

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