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

Fix/edit operative plan bug #1031

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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