diff --git a/src/components/UI/TrackerModal/TrackerModal.jsx b/src/components/UI/TrackerModal/TrackerModal.jsx
index 026d1093..9951b10b 100644
--- a/src/components/UI/TrackerModal/TrackerModal.jsx
+++ b/src/components/UI/TrackerModal/TrackerModal.jsx
@@ -7,7 +7,8 @@ import {
getValueModalType,
setProject,
setProjectBoardFetch,
- editProjectName
+ editProjectName,
+ getColumnTitle,
} from "../../../redux/projectsTrackerSlice";
import "./trackerModal.scss";
@@ -18,7 +19,8 @@ export const TrackerModal = ({
selectedTab,
defautlInput,
titleProject,
- projectId
+ projectId,
+ titleColumn
}) => {
const dispatch = useDispatch();
const projectBoard = useSelector(getProjectBoard);
@@ -27,6 +29,8 @@ export const TrackerModal = ({
const [emailWorker, setEmailWorker] = useState("");
const [projectName, setProjectName] = useState(defautlInput);
+ const [editTitleColumn, setEditTitleColumn] = useState(titleColumn);
+
const [valueColumn, setValueColumn] = useState("");
const [nameProject, setNameProject] = useState("");
@@ -80,11 +84,11 @@ export const TrackerModal = ({
method: "PUT",
data: {
project_id: projectId,
- name: projectName
+ name: projectName,
},
}).then((res) => {
- setActive(false)
- dispatch(editProjectName({id: projectId, name: projectName}))
+ setActive(false);
+ dispatch(editProjectName({ id: projectId, name: projectName }));
});
}
@@ -232,7 +236,6 @@ export const TrackerModal = ({
)}
- {/* TODO: fix state */}
{modalType === "editColumn" && (
diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js
index 59c3697d..842f85a0 100644
--- a/src/pages/ProjectTracker/ProjectTracker.js
+++ b/src/pages/ProjectTracker/ProjectTracker.js
@@ -16,6 +16,7 @@ import {
setProjectBoardFetch,
setToggleTab,
activeLoader,
+ setColumnTitle,
} from "../../redux/projectsTrackerSlice";
import ModalTicket from "../../components/UI/ModalTicket/ModalTicket";
@@ -191,6 +192,12 @@ export const ProjectTracker = () => {
+
+
{loader &&
}
{!loader && (
@@ -198,12 +205,6 @@ export const ProjectTracker = () => {
Проект : {projectBoard.name}
-
-
{
@@ -269,6 +270,12 @@ export const ProjectTracker = () => {
wrapperHover[column.id] ? "tasks__board__hover" : ""
}`}
>
+
{/**/}
{column.title}
diff --git a/src/redux/projectsTrackerSlice.js b/src/redux/projectsTrackerSlice.js
index 754adcc1..9efb3268 100644
--- a/src/redux/projectsTrackerSlice.js
+++ b/src/redux/projectsTrackerSlice.js
@@ -6,7 +6,7 @@ const initialState = {
projectBoard: {},
toggleTab: 1,
modalType: "",
- boardLoader: false
+ boardLoader: false,
};
export const setProjectBoardFetch = createAsyncThunk("userInfo", (id) =>
@@ -29,12 +29,12 @@ export const projectsTrackerSlice = createSlice({
deleteProject: (state, action) => {
state.projects.forEach((project) => {
if (project.id === action.payload.id) {
- project.status = 10
+ project.status = 10;
}
- })
+ });
},
activeLoader: (state) => {
- state.boardLoader = true
+ state.boardLoader = true;
},
moveProjectTask: (state, action) => {
state.projectBoard.columns.forEach((column, index) => {
@@ -58,9 +58,9 @@ export const projectsTrackerSlice = createSlice({
editProjectName: (state, action) => {
state.projects.forEach((project) => {
if (project.id === action.payload.id) {
- project.name = action.payload.name
+ project.name = action.payload.name;
}
- })
+ });
},
modalToggle: (state, action) => {
state.modalType = action.payload;
@@ -69,7 +69,7 @@ export const projectsTrackerSlice = createSlice({
extraReducers: {
[setProjectBoardFetch.fulfilled]: (state, action) => {
state.projectBoard = action.payload;
- state.boardLoader = false
+ state.boardLoader = false;
},
},
});
@@ -82,13 +82,14 @@ export const {
setToggleTab,
modalToggle,
activeLoader,
- editProjectName
+ editProjectName,
+ setColumnTitle,
} = projectsTrackerSlice.actions;
export const getProjects = (state) => state.tracker.projects;
export const getProjectBoard = (state) => state.tracker.projectBoard;
export const getToggleTab = (state) => state.tracker.toggleTab;
export const getValueModalType = (state) => state.tracker.modalType;
-export const getBoarderLoader = (state) => state.tracker.boardLoader
+export const getBoarderLoader = (state) => state.tracker.boardLoader;
export default projectsTrackerSlice.reducer;