Project managers, board members, auto-update after reconnection, refactoring

This commit is contained in:
Maksim Eltyshev
2021-06-24 01:05:22 +05:00
parent 7956503a46
commit fe91b5241e
478 changed files with 21215 additions and 19484 deletions
+7 -3
View File
@@ -1,19 +1,23 @@
import { bindActionCreators } from 'redux';
import { connect } from 'react-redux';
import { boardsForCurrentProjectSelector, currentUserSelector, pathSelector } from '../selectors';
import {
boardsForCurrentProjectSelector,
isCurrentUserManagerForCurrentProjectSelector,
pathSelector,
} from '../selectors';
import { createBoardInCurrentProject, deleteBoard, moveBoard, updateBoard } from '../actions/entry';
import Boards from '../components/Boards';
const mapStateToProps = (state) => {
const { boardId } = pathSelector(state);
const { isAdmin } = currentUserSelector(state);
const boards = boardsForCurrentProjectSelector(state);
const isCurrentUserManager = isCurrentUserManagerForCurrentProjectSelector(state);
return {
items: boards,
currentId: boardId,
isEditable: isAdmin,
canEdit: isCurrentUserManager,
};
};