- Clear stage (progress update), moving branches to verify some outputs.

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-06-19 14:06:39 -04:00
parent b0a5f2d998
commit 36f7b7a1a1
5 changed files with 119 additions and 91 deletions

View File

@@ -8,6 +8,7 @@ import isEqual from "lodash/isEqual";
import Lane from "./Lane";
import { PopoverWrapper } from "react-popopo";
import * as actions from "../../../redux/trello/trello.actions.js";
import { isFunction } from "lodash";
/**
* BoardContainer is a React component that represents a Trello-like board.
@@ -234,11 +235,34 @@ 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),
toLaneId: Number.parseInt(destination.droppableId),
cardId: draggableId,
index: destination.index
})
);
// onCardMoveAcrossLanes(payload.laneId, laneId, payload.id, addedIndex);
};
const combinedDragEnd = (...params) => {
// Early Gate
if (!params || !params[0]) return;
onLaneDrag(params[0]);
if (isFunction(onDragEnd)) {
onDragEnd(params[0]);
}
};
return (
<components.BoardWrapper style={style} orientation={orientation} draggable={false}>
<PopoverWrapper>
<DragDropContext
onDragEnd={onDragEnd}
onDragEnd={combinedDragEnd}
onDragUpdate={onDragUpdate}
onDragStart={onDragStart}
onBeforeDragStart={onBeforeDragStart}