diff --git a/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.component.js b/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.component.js
index e07af82ad..e9c49596f 100644
--- a/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.component.js
+++ b/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.component.js
@@ -42,6 +42,7 @@ const CommunicatorDialog = ({
addOrRemoveBoard,
copyBoard,
deleteMyBoard,
+ updateMyBoard,
setRootBoard,
publishBoard,
showNotification
@@ -124,6 +125,7 @@ const CommunicatorDialog = ({
addOrRemoveBoard={addOrRemoveBoard}
copyBoard={copyBoard}
deleteMyBoard={deleteMyBoard}
+ updateMyBoard={updateMyBoard}
publishBoard={publishBoard}
setRootBoard={setRootBoard}
selectedIds={communicatorBoardsIds}
@@ -202,6 +204,7 @@ CommunicatorDialog.propTypes = {
onSearch: PropTypes.func,
addOrRemoveBoard: PropTypes.func.isRequired,
deleteMyBoard: PropTypes.func.isRequired,
+ updateMyBoard: PropTypes.func.isRequired,
copyBoard: PropTypes.func.isRequired,
setRootBoard: PropTypes.func.isRequired,
publishBoard: PropTypes.func.isRequired,
diff --git a/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.container.js b/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.container.js
index 0c9d883e1..3fe5e88b4 100644
--- a/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.container.js
+++ b/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.container.js
@@ -20,7 +20,8 @@ import {
replaceBoard,
createBoard,
updateBoard,
- updateApiObjectsNoChild
+ updateApiObjectsNoChild,
+ updateApiBoard
} from '../../Board/Board.actions';
import messages from './CommunicatorDialog.messages';
@@ -476,6 +477,18 @@ class CommunicatorDialogContainer extends React.Component {
showNotification(intl.formatMessage(messages.boardDeleted));
}
+ async updateMyBoard(board) {
+ const { updateBoard, updateApiBoard, userData } = this.props;
+ updateBoard(board);
+
+ // Loggedin user?
+ if ('name' in userData && 'email' in userData) {
+ try {
+ await updateApiBoard(board);
+ } catch (err) {}
+ }
+ }
+
render() {
const limit = this.state.page * BOARDS_PAGE_LIMIT;
const communicatorBoardsIds = this.props.communicatorBoards.map(b => b.id);
@@ -487,6 +500,7 @@ class CommunicatorDialogContainer extends React.Component {
communicatorBoardsIds,
addOrRemoveBoard: this.addOrRemoveBoard.bind(this),
deleteMyBoard: this.deleteMyBoard.bind(this),
+ updateMyBoard: this.updateMyBoard.bind(this),
publishBoard: this.publishBoard.bind(this),
setRootBoard: this.setRootBoard.bind(this),
copyBoard: this.copyBoard.bind(this),
@@ -541,7 +555,8 @@ const mapDispatchToProps = {
updateBoard,
addBoardCommunicator,
upsertCommunicator,
- updateApiObjectsNoChild
+ updateApiObjectsNoChild,
+ updateApiBoard
};
export default connect(
diff --git a/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.messages.js b/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.messages.js
index c8ad572ad..0aa76ae5f 100644
--- a/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.messages.js
+++ b/src/components/Communicator/CommunicatorDialog/CommunicatorDialog.messages.js
@@ -109,6 +109,10 @@ export default defineMessages({
id: 'cboard.components.CommunicatorDialog.boardInfoDate',
defaultMessage: 'Last edited'
},
+ boardDescription: {
+ id: 'cboard.components.CommunicatorDialog.boardDescription',
+ defaultMessage: 'Description'
+ },
boardPublished: {
id: 'cboard.components.CommunicatorDialog.boardPublished',
defaultMessage:
@@ -156,6 +160,15 @@ export default defineMessages({
defaultMessage:
'This action will delete the board and it cannot be recovered. Do you want to proceed?'
},
+ publishBoard: {
+ id: 'cboard.components.CommunicatorDialog.publishBoard',
+ defaultMessage: 'Board Description'
+ },
+ publishBoardDescription: {
+ id: 'cboard.components.CommunicatorDialog.publishBoardDescription',
+ defaultMessage:
+ 'Please provide a short description about the content of the board and what is the board intended for.'
+ },
accept: {
id: 'cboard.components.CommunicatorDialog.accept',
defaultMessage: 'Accept'
diff --git a/src/components/Communicator/CommunicatorDialog/CommunicatorDialogBoardItem.component.js b/src/components/Communicator/CommunicatorDialog/CommunicatorDialogBoardItem.component.js
index e99e5b689..d85206ae9 100644
--- a/src/components/Communicator/CommunicatorDialog/CommunicatorDialogBoardItem.component.js
+++ b/src/components/Communicator/CommunicatorDialog/CommunicatorDialogBoardItem.component.js
@@ -21,13 +21,20 @@ import DialogActions from '@material-ui/core/DialogActions';
import Button from '@material-ui/core/Button';
import Typography from '@material-ui/core/Typography';
import Tooltip from '@material-ui/core/Tooltip';
+import TextField from '@material-ui/core/TextField';
import CircularProgress from '@material-ui/core/CircularProgress';
+import Slide from '@material-ui/core/Slide';
+import DialogContentText from '@material-ui/core/DialogContentText';
import IconButton from '../../UI/IconButton';
import { TAB_INDEXES } from './CommunicatorDialog.constants';
import messages from './CommunicatorDialog.messages';
import { isCordova } from '../../../cordova-util';
+const Transition = React.forwardRef(function Transition(props, ref) {
+ return