From e6481dc43f4fbc925f7aa93bc57ce840db45fbcd Mon Sep 17 00:00:00 2001 From: rlacko <rlacko@sch.bme.hu> Date: Wed, 29 Jan 2020 16:46:28 +0100 Subject: [PATCH] fixed event notes --- src/actions/notes.js | 2 +- src/components/pages/TraineeTableRow.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/actions/notes.js b/src/actions/notes.js index 04362ab..52074a9 100644 --- a/src/actions/notes.js +++ b/src/actions/notes.js @@ -29,7 +29,7 @@ export const postEventNote = ({ eventid, userid, note }) => ( try { const response = await axios.post('/api/v1/notes/', { event: eventid ? eventid : '', - profile: userid ? eventid : '', + profile: userid ? userid : '', note, }); if (response.data.id) { diff --git a/src/components/pages/TraineeTableRow.js b/src/components/pages/TraineeTableRow.js index 2fc9e68..05fbc52 100644 --- a/src/components/pages/TraineeTableRow.js +++ b/src/components/pages/TraineeTableRow.js @@ -81,8 +81,8 @@ class TraineeTableRow extends Component { <Comment> <Comment.Content> <Comment.Author><b>{notes[0].created_by_name}:</b></Comment.Author> - <Comment.Text> - {notes[0].note.length > 30 ? notes[0].note.slice(0, 50).concat('...') + <Comment.Text style={{wordWrap: 'break-word'}}> + {notes[0].note.length > 25 ? notes[0].note.slice(0, 25).concat('...') : notes[0].note } </Comment.Text> @@ -102,7 +102,7 @@ class TraineeTableRow extends Component { content={notes.map((note) => { return ( <Comment.Content> - <Comment.Author>{note.created_by_name}</Comment.Author> + <Comment.Author><b>{note.created_by_name}:</b></Comment.Author> <Comment.Text> {note.note} </Comment.Text> -- GitLab