From 2c03fa29f44ee8bcb92a51b38bffa8fe2c3a4381 Mon Sep 17 00:00:00 2001 From: parvathy00 Date: Fri, 19 Jul 2024 17:51:41 +0530 Subject: [PATCH] Parvathy | BAH-3058 | Fix. Auto Refresh After Status Change --- src/controllers/manage/list/appointmentsListViewController.js | 1 + .../manage/list/appointmentsListViewController.spec.js | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/controllers/manage/list/appointmentsListViewController.js b/src/controllers/manage/list/appointmentsListViewController.js index 7c54339a9..144d969bd 100644 --- a/src/controllers/manage/list/appointmentsListViewController.js +++ b/src/controllers/manage/list/appointmentsListViewController.js @@ -413,6 +413,7 @@ angular.module('bahmni.appointments') closeConfirmBox(); messagingService.showMessage('info', message); $scope.filteredAppointments = appointmentsFilter($scope.appointments, $stateParams.filterParams); + $state.reload(); }); }; diff --git a/test/controllers/manage/list/appointmentsListViewController.spec.js b/test/controllers/manage/list/appointmentsListViewController.spec.js index 74d8695ee..4f7f33d8e 100644 --- a/test/controllers/manage/list/appointmentsListViewController.spec.js +++ b/test/controllers/manage/list/appointmentsListViewController.spec.js @@ -29,7 +29,7 @@ describe('AppointmentsListViewController', function () { } }; }); - $state = jasmine.createSpyObj('$state', ['go']); + $state = jasmine.createSpyObj('$state', ['go', 'reload']); confirmBox = jasmine.createSpy('confirmBox'); messagingService = jasmine.createSpyObj('messagingService', ['showMessage']); $translate = jasmine.createSpyObj('$translate', ['instant', 'storageKey', 'storage', 'preferredLanguage']);