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 {
import {Project} from './Project';
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";
interface ITask{
......@@ -55,7 +55,7 @@ import { DateTimeTask } from './DateTimeTask';
@Column({
type: "enum",
enum: ["opened", "done" , "failed"],
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
}}
/>
......
......@@ -22,6 +22,7 @@ import BasicSelect from "../../UI/Select/Select";
import CalendarMonthIcon from '@mui/icons-material/CalendarMonth';
import KeyboardArrowDownIcon from '@mui/icons-material/KeyboardArrowDown';
import KeyboardArrowUpIcon from '@mui/icons-material/KeyboardArrowUp';
import { TaskStatuses } from "../../../helpers/TableTasksHelpers";
const weekDays = ["Вс","Пн","Вт","Ср","Чт","Пт","Сб" ];
......@@ -314,9 +315,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}
......@@ -330,7 +333,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