Skip to content
This repository has been archived by the owner on Jan 9, 2023. It is now read-only.

Commit

Permalink
Merge pull request #1031 from eHealthAfrica/fix/edit-operative-plan-bug
Browse files Browse the repository at this point in the history
Fix/edit operative plan bug
  • Loading branch information
tangollama committed Mar 27, 2017
2 parents 7078f86 + 51a6c3e commit 5eaeccc
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
7 changes: 6 additions & 1 deletion app/patients/operative-plan/controller.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,12 @@ export default AbstractEditController.extend(OperativePlanStatuses, PatientSubmo
let newPlan = get(this, 'newPlan');
if (newPlan) {
let patient = get(this, 'model.patient');
patient.save().then(this._finishAfterUpdate.bind(this));
patient.save().then(this._finishAfterUpdate.bind(this)).then(()=> {
let editTitle = get(this, 'i18n').t('operativePlan.titles.editTitle');
let sectionDetails = {};
sectionDetails.currentScreenTitle = editTitle;
this.send('setSectionHeader', sectionDetails);
});
} else {
this._finishAfterUpdate();
}
Expand Down
1 change: 1 addition & 0 deletions tests/acceptance/operative-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@ test('Plan and report creation', function(assert) {
click('.modal-footer button:contains(Ok)');
});
andThen(() => {
assert.equal(find('.view-current-title').text(), 'Edit Operative Plan', 'Edit operative plan title is correct');
assert.equal(find(`.procedure-listing td.procedure-description:contains(${PROCEDURE_FIX_ARM})`).length, 1, 'Procedure from typeahead gets added to procedure list on save');
click('button:contains(Return)');
});
Expand Down

0 comments on commit 5eaeccc

Please sign in to comment.