diff --git a/src/components/Common/ModalLayout/ModalLayout.jsx b/src/components/Common/ModalLayout/ModalLayout.jsx
index 542e2967..3c7d2872 100644
--- a/src/components/Common/ModalLayout/ModalLayout.jsx
+++ b/src/components/Common/ModalLayout/ModalLayout.jsx
@@ -18,7 +18,9 @@ export const ModalLayout = ({
>
e.stopPropagation()}
>
diff --git a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx
index fb0497a5..efddad92 100644
--- a/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx
+++ b/src/components/Modal/Tracker/TrackerModal/TrackerModal.jsx
@@ -1,11 +1,10 @@
import ClassicEditor from "@ckeditor/ckeditor5-build-classic";
import { CKEditor } from "@ckeditor/ckeditor5-react";
-import React, { useEffect, useState } from "react";
-import { useDispatch, useSelector } from "react-redux";
import ru from "date-fns/locale/ru";
-import DatePicker, {registerLocale} from "react-datepicker";
+import React, { useEffect, useState } from "react";
+import DatePicker, { registerLocale } from "react-datepicker";
import "react-datepicker/dist/react-datepicker.css";
-import {getCorrectDate} from "@components/Calendar/calendarHelper";
+import { useDispatch, useSelector } from "react-redux";
import { getProfileInfo } from "@redux/outstaffingSlice";
import {
@@ -23,22 +22,24 @@ import {
setProjectBoardFetch,
} from "@redux/projectsTrackerSlice";
-import {getCorrectRequestDate, urlForLocal} from "@utils/helper";
+import { getCorrectRequestDate, urlForLocal } from "@utils/helper";
import { apiRequest } from "@api/request";
import { useNotification } from "@hooks/useNotification";
+import { getCorrectDate } from "@components/Calendar/calendarHelper";
import BaseButton from "@components/Common/BaseButton/BaseButton";
import ModalLayout from "@components/Common/ModalLayout/ModalLayout";
+import arrowCreateTask from "assets/icons/arrows/arrowCreateTask.svg";
+import arrowRight from "assets/icons/arrows/arrowRightCreateTask.svg";
import arrowDown from "assets/icons/arrows/selectArrow.png";
+import calendarImg from "assets/icons/createTaskCalendar.svg";
import avatarMok from "assets/images/avatarMok.png";
-import arrowCreateTask from "assets/icons/arrows/arrowCreateTask.svg"
-import calendarImg from "assets/icons/createTaskCalendar.svg"
-import arrowRight from "assets/icons/arrows/arrowRightCreateTask.svg"
import "./trackerModal.scss";
+
registerLocale("ru", ru);
export const TrackerModal = ({
@@ -78,8 +79,8 @@ export const TrackerModal = ({
const [selectColumnPriorityOpen, setSelectColumnPriorityOpen] =
useState(false);
const { showNotification } = useNotification();
- const [deadLineDate, setDeadLineDate] = useState('')
- const [datePickerOpen, setDatePickerOpen] = useState(false)
+ const [deadLineDate, setDeadLineDate] = useState("");
+ const [datePickerOpen, setDatePickerOpen] = useState(false);
const [startDate, setStartDate] = useState(new Date());
function createTab() {
@@ -124,7 +125,7 @@ export const TrackerModal = ({
user_id: localStorage.getItem("id"),
column_id: selectedTab,
priority: priorityTask,
- dead_line: deadLineDate ? getCorrectRequestDate(deadLineDate) : ''
+ dead_line: deadLineDate ? getCorrectRequestDate(deadLineDate) : "",
},
}).then((res) => {
if (res.status === 500) {
@@ -154,7 +155,7 @@ export const TrackerModal = ({
setDescriptionTicket("");
dispatch(setProjectBoardFetch(projectBoard.id));
}
- setDeadLineDate('')
+ setDeadLineDate("");
showNotification({
show: true,
text: "Задача создана",
@@ -402,124 +403,132 @@ export const TrackerModal = ({
{modalType === "createTiketProject" && (
<>
-
+
Этап
-
+
Backlog
-
+
-
-
+
+
Введите название и описание задачи
setValueTiket(e.target.value)}
- placeholder="Название задачи"
+ maxLength="100"
+ className="name-project"
+ value={valueTiket}
+ onChange={(e) => setValueTiket(e.target.value)}
+ placeholder="Название задачи"
/>
{
- const data = editor.getData();
- setDescriptionTicket(data);
- }}
+ editor={ClassicEditor}
+ data={descriptionTicket}
+ config={{
+ toolbar: [
+ "heading",
+ "|",
+ "bold",
+ "italic",
+ "link",
+ "bulletedList",
+ "numberedList",
+ ],
+ removePlugins: ["BlockQuote"],
+ placeholder: "Описание задачи",
+ }}
+ onChange={(event, editor) => {
+ const data = editor.getData();
+ setDescriptionTicket(data);
+ }}
/>
-
-
+
+
Создатель : {profileInfo?.fio}
setSelectExecutorTaskOpen(!selectExecutorTaskOpen)}
- className={
- selectExecutorTaskOpen
- ? "select__executor select__executor--open"
- : "select__executor"
- }
+ onClick={() =>
+ setSelectExecutorTaskOpen(!selectExecutorTaskOpen)
+ }
+ className={
+ selectExecutorTaskOpen
+ ? "select__executor select__executor--open"
+ : "select__executor"
+ }
>
{selectedExecutorTask.user_id ? (
- <>
-
{selectedExecutorTask.user.fio}
-
- >
+ <>
+
{selectedExecutorTask.user.fio}
+
+ >
) : (
-
{selectedExecutorTask}
+
{selectedExecutorTask}
)}
{selectExecutorTaskOpen && (
-
- {correctProjectUsers.length ? (
- correctProjectUsers.map((person) => {
- return (
-
setSelectedExecutorTask(person)}
- className="executor"
- key={person.user_id}
- >
-
{person.user.fio}
-
-
- );
- })
- ) : (
-
Нет пользователей
- )}
-
+
+ {correctProjectUsers.length ? (
+ correctProjectUsers.map((person) => {
+ return (
+
setSelectedExecutorTask(person)}
+ className="executor"
+ key={person.user_id}
+ >
+
{person.user.fio}
+
+
+ );
+ })
+ ) : (
+
Нет пользователей
+ )}
+
)}
-
-
+
+
Срок исполнения
-
-
setDatePickerOpen(!datePickerOpen)}>{deadLineDate ? getCorrectDate(deadLineDate) : "Дата не выбрана"}
+
+
setDatePickerOpen(!datePickerOpen)}>
+ {deadLineDate
+ ? getCorrectDate(deadLineDate)
+ : "Дата не выбрана"}
+
{
- setDatePickerOpen(false);
- setStartDate(date);
- setDeadLineDate(date);
- }}
+ className="datePicker"
+ open={datePickerOpen}
+ locale="ru"
+ selected={startDate}
+ onChange={(date) => {
+ setDatePickerOpen(false);
+ setStartDate(date);
+ setDeadLineDate(date);
+ }}
/>