adaptive
This commit is contained in:
parent
3db87fca20
commit
03071a7f91
@ -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(
|
||||
<div className='trackerSelectColumn' onClick={() => setOpenSelect(!openSelect)}>
|
||||
<p>Выберите колонку</p>
|
||||
<img className={openSelect ? 'open' : ''} src={arrowDown} alt='arrow' />
|
||||
{openSelect &&
|
||||
<div className='trackerSelectColumn__dropDown'>
|
||||
{columns.map((column) => {
|
||||
return <p key={column.id} onClick={() => {
|
||||
dispatch(moveProjectTask({
|
||||
startWrapperIndex: {index: currentColumn, task},
|
||||
columnId: column.id
|
||||
}))
|
||||
}
|
||||
}>{column.title}</p>
|
||||
export const TrackerSelectColumn = ({ columns, task, currentColumn }) => {
|
||||
const dispatch = useDispatch();
|
||||
const [openSelect, setOpenSelect] = useState(false);
|
||||
return (
|
||||
<div
|
||||
className="trackerSelectColumn"
|
||||
onClick={() => setOpenSelect(!openSelect)}
|
||||
>
|
||||
<p>Выберите колонку</p>
|
||||
<img className={openSelect ? "open" : ""} src={arrowDown} alt="arrow" />
|
||||
{openSelect && (
|
||||
<div className="trackerSelectColumn__dropDown">
|
||||
{columns.map((column) => {
|
||||
return (
|
||||
<p
|
||||
key={column.id}
|
||||
onClick={() => {
|
||||
dispatch(
|
||||
moveProjectTask({
|
||||
startWrapperIndex: { index: currentColumn, task },
|
||||
columnId: column.id,
|
||||
})
|
||||
}
|
||||
</div>
|
||||
}
|
||||
);
|
||||
}}
|
||||
>
|
||||
{column.title}
|
||||
</p>
|
||||
);
|
||||
})}
|
||||
</div>
|
||||
)
|
||||
)}
|
||||
</div>
|
||||
);
|
||||
};
|
||||
|
||||
export default TrackerSelectColumn;
|
||||
|
||||
|
@ -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 = () => {
|
||||
</div>
|
||||
</div>
|
||||
<TrackerSelectColumn
|
||||
columns={projectBoard.columns.filter((item) => item.id !== column.id)}
|
||||
currentColumn={column.id}
|
||||
task={task} />
|
||||
columns={projectBoard.columns.filter(
|
||||
(item) => item.id !== column.id
|
||||
)}
|
||||
currentColumn={column.id}
|
||||
task={task}
|
||||
/>
|
||||
</div>
|
||||
);
|
||||
})}
|
||||
|
Loading…
Reference in New Issue
Block a user