fix
This commit is contained in:
parent
83f0c67017
commit
906dd0ec90
@ -20,17 +20,16 @@ export const TrackerModal = ({
|
||||
defautlInput,
|
||||
titleProject,
|
||||
projectId,
|
||||
titleColumn
|
||||
}) => {
|
||||
const dispatch = useDispatch();
|
||||
const projectBoard = useSelector(getProjectBoard);
|
||||
|
||||
const modalType = useSelector(getValueModalType);
|
||||
|
||||
const titleColumn = useSelector(getColumnTitle);
|
||||
|
||||
const [emailWorker, setEmailWorker] = useState("");
|
||||
const [projectName, setProjectName] = useState(defautlInput);
|
||||
const [editTitleColumn, setEditTitleColumn] = useState("");
|
||||
const [editTitleColumn, setEditTitleColumn] = useState(titleColumn);
|
||||
|
||||
const [valueColumn, setValueColumn] = useState("");
|
||||
const [nameProject, setNameProject] = useState("");
|
||||
@ -242,19 +241,8 @@ export const TrackerModal = ({
|
||||
<div className="title-project">
|
||||
<h4>Введите новое название</h4>
|
||||
<div className="input-container">
|
||||
{/* {Boolean(projectBoard?.columns) &&
|
||||
Boolean(projectBoard.columns.length) &&
|
||||
projectBoard.columns.map((column) => {
|
||||
// console.log(column.title);
|
||||
// console.log("Lol" + titleColumn.title);
|
||||
if (column.title === titleColumn) {
|
||||
console.log(column.title);
|
||||
|
||||
}
|
||||
})} */}
|
||||
<input
|
||||
className="name-project"
|
||||
placeholder={titleColumn}
|
||||
value={editTitleColumn}
|
||||
onChange={(e) => setEditTitleColumn(e.target.value)}
|
||||
/>
|
||||
|
@ -270,6 +270,12 @@ export const ProjectTracker = () => {
|
||||
wrapperHover[column.id] ? "tasks__board__hover" : ""
|
||||
}`}
|
||||
>
|
||||
<TrackerModal
|
||||
active={modalAdd}
|
||||
setActive={setModalAdd}
|
||||
selectedTab={selectedTab}
|
||||
titleColumn={column.title}
|
||||
/>
|
||||
<div className="board__head">
|
||||
{/*<span className={wrapperIndex === 3 ? "done" : ""}>*/}
|
||||
<span>{column.title}</span>
|
||||
@ -303,7 +309,6 @@ export const ProjectTracker = () => {
|
||||
[column.id]: false,
|
||||
}));
|
||||
dispatch(modalToggle("editColumn"));
|
||||
dispatch(setColumnTitle(column.title));
|
||||
setModalAdd(true);
|
||||
}}
|
||||
>
|
||||
|
@ -6,7 +6,6 @@ const initialState = {
|
||||
projectBoard: {},
|
||||
toggleTab: 1,
|
||||
modalType: "",
|
||||
titleColumn: "",
|
||||
boardLoader: false,
|
||||
};
|
||||
|
||||
@ -66,9 +65,6 @@ export const projectsTrackerSlice = createSlice({
|
||||
modalToggle: (state, action) => {
|
||||
state.modalType = action.payload;
|
||||
},
|
||||
setColumnTitle: (state, action) => {
|
||||
state.titleColumn = action.payload;
|
||||
},
|
||||
},
|
||||
extraReducers: {
|
||||
[setProjectBoardFetch.fulfilled]: (state, action) => {
|
||||
@ -94,7 +90,6 @@ 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 getColumnTitle = (state) => state.tracker.titleColumn;
|
||||
export const getBoarderLoader = (state) => state.tracker.boardLoader;
|
||||
|
||||
export default projectsTrackerSlice.reducer;
|
||||
|
Loading…
Reference in New Issue
Block a user