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