Skip to content

Commit

Permalink
fix. awaiting appointment list after applying filter (#331)
Browse files Browse the repository at this point in the history
  • Loading branch information
Arjun-Go authored May 14, 2024
1 parent f79f636 commit 2f07f80
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/controllers/manage/appointmentsFilterController.js
Original file line number Diff line number Diff line change
Expand Up @@ -260,6 +260,7 @@ angular.module('bahmni.appointments')
payload.withoutDates = true;
spinner.forPromise(appointmentsService.search(payload).then(function (response) {
$rootScope.appointmentsData = response.data;
$rootScope.$broadcast("awaitingFilterResponse", response);
}));
}
};
Expand Down
4 changes: 4 additions & 0 deletions src/controllers/manage/list/appointmentsListViewController.js
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,10 @@ angular.module('bahmni.appointments')
$scope.reverseSort = !$scope.reverseSort;
};

$rootScope.$on('awaitingFilterResponse', function (event, response) {
$scope.filteredAppointments = response.data;
});

$scope.printPage = function () {
var printTemplateUrl = appService.getAppDescriptor().getConfigValue("printListViewTemplateUrl") || 'views/manage/list/defaultListPrint.html';
printer.print(printTemplateUrl, {
Expand Down

0 comments on commit 2f07f80

Please sign in to comment.