@@ -113,6 +113,7 @@ export function ProductionBoardKanbanComponent({
|
||||
return null;
|
||||
};
|
||||
|
||||
// TODO, refine and use action
|
||||
const onDragEnd = async ({ draggableId, type, source, reason, mode, destination, combine }) => {
|
||||
//cardId, sourceLaneId, targetLaneId, position, cardDetails
|
||||
logImEXEvent("kanban_drag_end");
|
||||
|
||||
@@ -210,7 +210,7 @@ const BoardContainer = ({
|
||||
...otherProps
|
||||
},
|
||||
[
|
||||
"onCardMoveAcrossLanes",
|
||||
// "onCardMoveAcrossLanes",
|
||||
"onLaneScroll",
|
||||
"onLaneDelete",
|
||||
"onLaneUpdate",
|
||||
@@ -237,7 +237,6 @@ const BoardContainer = ({
|
||||
|
||||
const onLaneDrag = ({ draggableId, type, source, reason, mode, destination, combine }) => {
|
||||
if (!type || type !== "lane" || !source || !destination) return;
|
||||
|
||||
dispatch(
|
||||
actions.moveCardAcrossLanes({
|
||||
fromLaneId: Number.parseInt(source.droppableId),
|
||||
|
||||
@@ -4,7 +4,6 @@ import PropTypes from "prop-types";
|
||||
import { bindActionCreators } from "redux";
|
||||
import { connect } from "react-redux";
|
||||
import isEqual from "lodash/isEqual";
|
||||
import cloneDeep from "lodash/cloneDeep";
|
||||
import { v1 } from "uuid";
|
||||
|
||||
import * as actions from "../../../redux/trello/trello.actions.js";
|
||||
@@ -102,7 +101,7 @@ function Lane({
|
||||
const [currentPageFinal, setCurrentPageFinal] = useState(currentPage);
|
||||
const [addCardMode, setAddCardMode] = useState(false);
|
||||
const [collapsed, setCollapsed] = useState(false);
|
||||
const [isDraggingOver, setIsDraggingOver] = useState(false);
|
||||
// const [isDraggingOver, setIsDraggingOver] = useState(false);
|
||||
|
||||
const laneRef = useRef(null);
|
||||
|
||||
@@ -196,13 +195,13 @@ function Lane({
|
||||
onCardAdd(card, laneId);
|
||||
};
|
||||
|
||||
const onDragStart = ({ payload }) => {
|
||||
handleDragStart && handleDragStart(payload.id, payload.laneId);
|
||||
};
|
||||
|
||||
const shouldAcceptDrop = (sourceContainerOptions) => {
|
||||
return droppable && sourceContainerOptions.groupName === groupName;
|
||||
};
|
||||
// const onDragStart = ({ payload }) => {
|
||||
// handleDragStart && handleDragStart(payload.id, payload.laneId);
|
||||
// };
|
||||
//
|
||||
// const shouldAcceptDrop = (sourceContainerOptions) => {
|
||||
// return droppable && sourceContainerOptions.groupName === groupName;
|
||||
// };
|
||||
|
||||
const updateCard = (updatedCard) => {
|
||||
actions.updateCard({ laneId: id, card: updatedCard });
|
||||
@@ -223,7 +222,7 @@ function Lane({
|
||||
collapsibleLanes && setCollapsed(!collapsed);
|
||||
};
|
||||
|
||||
const groupName = `TrelloBoard${boardId}Lane`;
|
||||
// const groupName = `TrelloBoard${boardId}Lane`;
|
||||
|
||||
const renderDragContainer = (isDraggingOver) => {
|
||||
const stableCards = collapsed ? [] : cards;
|
||||
@@ -346,7 +345,8 @@ function Lane({
|
||||
{...passedProps}
|
||||
>
|
||||
{renderHeader({ id, cards, ...passedProps })}
|
||||
{renderDragContainer(isDraggingOver)}
|
||||
{renderDragContainer()}
|
||||
{/*{renderDragContainer(isDraggingOver)}*/}
|
||||
{loading && <components.Loader />}
|
||||
{showFooter && <components.LaneFooter onClick={toggleLaneCollapsed} collapsed={collapsed} />}
|
||||
</components.Section>
|
||||
|
||||
@@ -13,8 +13,7 @@ import JobCreateContext from "../../pages/jobs-create/jobs-create.context";
|
||||
export default function JobsCreateComponent({ form }) {
|
||||
const [pageIndex, setPageIndex] = useState(0);
|
||||
|
||||
// const [errorMessage, setErrorMessage] = useState(null);
|
||||
const [errorMessage] = useState(null);
|
||||
const [errorMessage, setErrorMessage] = useState(null);
|
||||
|
||||
const [state] = useContext(JobCreateContext);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user