mirror of
https://github.com/plankanban/planka.git
synced 2025-07-26 00:29:48 +02:00
Initial commit
This commit is contained in:
commit
36fe34e8e1
583 changed files with 91539 additions and 0 deletions
63
client/src/containers/BoardContainer.js
Executable file
63
client/src/containers/BoardContainer.js
Executable file
|
@ -0,0 +1,63 @@
|
|||
import { bindActionCreators } from 'redux';
|
||||
import { connect } from 'react-redux';
|
||||
|
||||
import {
|
||||
filterLabelsForCurrentBoardSelector,
|
||||
filterUsersForCurrentBoardSelector,
|
||||
labelsForCurrentBoardSelector,
|
||||
listIdsForCurrentBoardSelector,
|
||||
membershipsForCurrentProjectSelector,
|
||||
pathSelector,
|
||||
} from '../selectors';
|
||||
import {
|
||||
addLabelToFilterInCurrentBoard,
|
||||
addUserToFilterInCurrentBoard,
|
||||
createLabelInCurrentBoard,
|
||||
createListInCurrentBoard,
|
||||
deleteLabel,
|
||||
moveCard,
|
||||
moveList,
|
||||
removeLabelFromFilterInCurrentBoard,
|
||||
removeUserFromFilterInCurrentBoard,
|
||||
updateLabel,
|
||||
} from '../actions/entry';
|
||||
import Board from '../components/Board';
|
||||
|
||||
const mapStateToProps = (state) => {
|
||||
const { cardId } = pathSelector(state);
|
||||
const allProjectMemberships = membershipsForCurrentProjectSelector(state);
|
||||
const listIds = listIdsForCurrentBoardSelector(state);
|
||||
const allLabels = labelsForCurrentBoardSelector(state);
|
||||
const filterUsers = filterUsersForCurrentBoardSelector(state);
|
||||
const filterLabels = filterLabelsForCurrentBoardSelector(state);
|
||||
|
||||
return {
|
||||
listIds,
|
||||
filterUsers,
|
||||
filterLabels,
|
||||
allProjectMemberships,
|
||||
allLabels,
|
||||
isCardModalOpened: !!cardId,
|
||||
};
|
||||
};
|
||||
|
||||
const mapDispatchToProps = (dispatch) => bindActionCreators(
|
||||
{
|
||||
onListCreate: createListInCurrentBoard,
|
||||
onCardMove: moveCard,
|
||||
onListMove: moveList,
|
||||
onUserToFilterAdd: addUserToFilterInCurrentBoard,
|
||||
onUserFromFilterRemove: removeUserFromFilterInCurrentBoard,
|
||||
onLabelToFilterAdd: addLabelToFilterInCurrentBoard,
|
||||
onLabelFromFilterRemove: removeLabelFromFilterInCurrentBoard,
|
||||
onLabelCreate: createLabelInCurrentBoard,
|
||||
onLabelUpdate: updateLabel,
|
||||
onLabelDelete: deleteLabel,
|
||||
},
|
||||
dispatch,
|
||||
);
|
||||
|
||||
export default connect(
|
||||
mapStateToProps,
|
||||
mapDispatchToProps,
|
||||
)(Board);
|
Loading…
Add table
Add a link
Reference in a new issue