diff --git a/client/src/js/components/bhPatientGroupSelect.js b/client/src/js/components/bhPatientGroupSelect.js index f05c09273b..1c8c6e74c2 100644 --- a/client/src/js/components/bhPatientGroupSelect.js +++ b/client/src/js/components/bhPatientGroupSelect.js @@ -13,20 +13,17 @@ angular.module('bhima.components') }); PatientGroupSelectController.$inject = [ - 'PatientGroupService' + 'PatientGroupService', 'NotifyService' ]; /** * Patient Group selection component * */ -function PatientGroupSelectController(PatientGroups) { +function PatientGroupSelectController(PatientGroups, Notify) { var $ctrl = this; - $ctrl.$onInit = function onInit() { - // fired when a patient group has been selected - $ctrl.onSelectCallback = $ctrl.onSelectCallback || angular.noop; - + $ctrl.$onInit = function onInit() { // default for label $ctrl.label = $ctrl.label || 'PATIENT_GROUP.PATIENT_GROUP'; @@ -34,7 +31,8 @@ function PatientGroupSelectController(PatientGroups) { PatientGroups.read() .then(function (pgs) { $ctrl.patientGroups = pgs; - }); + }) + .catch(Notify.handleError); }; $ctrl.onSelect = function ($item, $model) { diff --git a/client/src/modules/patients/registry/registry.html b/client/src/modules/patients/registry/registry.html index b1ee8d463c..932aa90f82 100644 --- a/client/src/modules/patients/registry/registry.html +++ b/client/src/modules/patients/registry/registry.html @@ -62,7 +62,7 @@ -
+
{ helpers.navigate('#!/patients/groups'); element.all(by.css('[class="fa fa-list"]')).get(2).click(); - expectNumberOfGridRows(4); + expectNumberOfGridRows(2); }); it('Check link betwen Debtor Groups -> Patient Registry', () => {