diff --git a/src/components/TrackerSelectColumn/TrackerSelectColumn.jsx b/src/components/TrackerSelectColumn/TrackerSelectColumn.jsx index 08452e86..3fd9fcab 100644 --- a/src/components/TrackerSelectColumn/TrackerSelectColumn.jsx +++ b/src/components/TrackerSelectColumn/TrackerSelectColumn.jsx @@ -5,32 +5,41 @@ import { moveProjectTask } from "@redux/projectsTrackerSlice"; import arrowDown from "assets/icons/arrows/selectArrow.png"; -import './trackerSelectColumn.scss' +import "./trackerSelectColumn.scss"; -export const TrackerSelectColumn = ({columns, task, currentColumn}) => { - const dispatch = useDispatch(); - const [openSelect, setOpenSelect] = useState(false) - return( -
setOpenSelect(!openSelect)}> -

Выберите колонку

- arrow - {openSelect && -
- {columns.map((column) => { - return

{ - dispatch(moveProjectTask({ - startWrapperIndex: {index: currentColumn, task}, - columnId: column.id - })) - } - }>{column.title}

+export const TrackerSelectColumn = ({ columns, task, currentColumn }) => { + const dispatch = useDispatch(); + const [openSelect, setOpenSelect] = useState(false); + return ( +
setOpenSelect(!openSelect)} + > +

Выберите колонку

+ arrow + {openSelect && ( +
+ {columns.map((column) => { + return ( +

{ + dispatch( + moveProjectTask({ + startWrapperIndex: { index: currentColumn, task }, + columnId: column.id, }) - } -

- } + ); + }} + > + {column.title} +

+ ); + })}
- ) + )} +
+ ); }; export default TrackerSelectColumn; - diff --git a/src/pages/ProjectTracker/ProjectTracker.js b/src/pages/ProjectTracker/ProjectTracker.js index 8eb2fafe..ff2374de 100644 --- a/src/pages/ProjectTracker/ProjectTracker.js +++ b/src/pages/ProjectTracker/ProjectTracker.js @@ -194,8 +194,8 @@ export const ProjectTracker = () => { } function openTicket(e, task) { - if (window. innerWidth < 900) { - return + if (window.innerWidth < 900) { + return; } setSelectedTicket(task); setModalActiveTicket(true); @@ -687,9 +687,12 @@ export const ProjectTracker = () => {
item.id !== column.id)} - currentColumn={column.id} - task={task} /> + columns={projectBoard.columns.filter( + (item) => item.id !== column.id + )} + currentColumn={column.id} + task={task} + /> ); })}