Skip to content

Commit

Permalink
Schedule | Fix Daily docket notes bug (#7609)
Browse files Browse the repository at this point in the history
Resolves #7574

### Description
This PR fixes the notes field bug and now user can edit and save notes.

### Acceptance Criteria
- [ ] Currently when we edit the notes field, we save the edits on a field called editedNotes. The value of the notes field is editedNotes if it's set, and notes if it's not set. The problem is that the user is no longer able to delete the notes field because editedNotes isn't displayed when it's empty. We need to display editedNotes when editedNotes is set to ''.

### Testing Plan
1. Go to daily docket page in schedule.
<img width="1582" alt="screen shot 2018-10-30 at 12 48 05 pm" src="https://user-images.githubusercontent.com/23080951/47735439-e6077200-dc42-11e8-9b85-fbee8b9784d6.png">
  • Loading branch information
Sandra Jones authored and va-bot committed Oct 30, 2018
1 parent 39214f9 commit 4ed9d4c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/app/hearingSchedule/components/DailyDocket.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ export default class DailyDocket extends React.Component {
name="Notes"
onChange={this.onHearingNotesUpdate(hearing.id)}
textAreaStyling={notesFieldStyling}
value={hearing.editedNotes || hearing.notes || ''}
value={_.isUndefined(hearing.editedNotes) ? hearing.notes : hearing.editedNotes || ''}
/>;
};

Expand Down

0 comments on commit 4ed9d4c

Please sign in to comment.