From 1a4fe541cfd99621ce443db6ef6b1e25b20cda40 Mon Sep 17 00:00:00 2001 From: Kyle Conel Date: Wed, 3 Jan 2024 20:08:33 -0500 Subject: [PATCH] Lock all nodes from being dragged when timer page timer is running This will be temporary. Ideally, we only want to lock the one that is being timed. --- src/components/KanbanBoard/KanbanBoard.jsx | 2 +- src/main/main.ts | 2 +- src/pages/ProjectPage/BoardInnerList.jsx | 2 ++ src/pages/ProjectPage/ProjectPage.jsx | 1 + src/pages/ProjectPage/node.jsx | 2 +- src/pages/ProjectPage/parent.jsx | 2 ++ src/pages/Timer/TimerPage.jsx | 6 +++--- 7 files changed, 11 insertions(+), 6 deletions(-) diff --git a/src/components/KanbanBoard/KanbanBoard.jsx b/src/components/KanbanBoard/KanbanBoard.jsx index 53681e6..961a03e 100644 --- a/src/components/KanbanBoard/KanbanBoard.jsx +++ b/src/components/KanbanBoard/KanbanBoard.jsx @@ -138,7 +138,6 @@ class KanbanBoard extends Component { > {this.props.parentOrder.map((parentId, index) => { const parent = this.props.parents[parentId]; - return ( parent && ( this.createNewParent('New Parent')} + isTimerRunning={this.state.isTimerRunning} mustFocusNodeTitle={this.state.mustFocusNodeTitle} mustFocusParentTitle={this.state.mustFocusParentTitle} nodes={this.state.nodes} diff --git a/src/pages/ProjectPage/node.jsx b/src/pages/ProjectPage/node.jsx index 35b4d83..f35ee63 100644 --- a/src/pages/ProjectPage/node.jsx +++ b/src/pages/ProjectPage/node.jsx @@ -50,7 +50,7 @@ const Node = (props) => { {(provided, snapshot) => (
{node && ( { isDraggingOver={snapshot.isDraggingOver} > { - state.timerRunning = false; + state.isTimerRunning = false; }); }; @@ -155,7 +155,7 @@ class TimerPage extends Component { ); sharedIndividualProjectState.setState((state) => { - state.timerRunning = true; + state.isTimerRunning = true; }); }; @@ -211,7 +211,7 @@ class TimerPage extends Component { nodes={this.buildTreeData()} updateSelectedNode={this.updateSelectedNode} currentNode={this.state.currentNodeSelectedInTimer} - isTimerRunning={this.state.timerRunning} + isTimerRunning={this.state.isTimerRunning} />