Add select to change board of post

This commit is contained in:
riggraz
2019-09-21 12:54:57 +02:00
parent 7874015580
commit 7729057180
13 changed files with 222 additions and 33 deletions

View File

@@ -2,6 +2,7 @@ import { connect } from 'react-redux';
import { requestPost } from '../actions/requestPost';
import { requestComments } from '../actions/requestComments';
import { changePostBoard } from '../actions/changePostBoard';
import { changePostStatus } from '../actions/changePostStatus';
import { State } from '../reducers/rootReducer';
@@ -18,6 +19,10 @@ const mapDispatchToProps = (dispatch) => ({
dispatch(requestPost(postId));
},
changePostBoard(postId: number, newBoardId: number, authenticityToken: string) {
dispatch(changePostBoard(postId, newBoardId, authenticityToken));
},
changePostStatus(postId: number, newPostStatusId: number, authenticityToken: string) {
if (isNaN(newPostStatusId)) newPostStatusId = null;