- Begin to integrate DND with trello

- Resolve all ESLint issues in DND

Signed-off-by: Dave Richer <dave@imexsystems.ca>
This commit is contained in:
Dave Richer
2024-06-13 17:52:03 -04:00
parent a8f2ca5643
commit 4602648fe5
123 changed files with 458 additions and 253 deletions

View File

@@ -82,7 +82,6 @@ export function ProductionBoardKanbanComponent({
const handleDragEnd = async (cardId, sourceLaneId, targetLaneId, position, cardDetails) => {
logImEXEvent("kanban_drag_end");
setIsMoving(true);
const sameColumnTransfer = sourceLaneId === targetLaneId;
@@ -152,6 +151,11 @@ export function ProductionBoardKanbanComponent({
}
};
const onDragEnd = ({ draggableId, type, source, reason, mode, destination, combine }) => {
if (!type || type !== "lane") return;
console.log("onDragEnd", { draggableId, type, source, reason, mode, destination, combine });
};
const totalHrs = data
.reduce(
(acc, val) => acc + (val.labhrs?.aggregate?.sum?.mod_lb_hrs || 0) + (val.larhrs?.aggregate?.sum?.mod_lb_hrs || 0),
@@ -260,7 +264,7 @@ export function ProductionBoardKanbanComponent({
<StickyContainer>
<Board
data={boardLanes}
handleDragEnd={handleDragEnd}
onDragEnd={onDragEnd}
style={{ height: "100%", backgroundColor: "transparent", overflowY: "auto" }}
components={components}
orientation={orientation}
@@ -272,7 +276,7 @@ export function ProductionBoardKanbanComponent({
<div>
<Board
data={boardLanes}
handleDragEnd={handleDragEnd}
onDragEnd={onDragEnd}
style={{ backgroundColor: "transparent", overflowY: "auto" }}
components={components}
collapsibleLanes