diff --git a/src/main/app.js b/src/main/app.js index 286c02f..12355b9 100644 --- a/src/main/app.js +++ b/src/main/app.js @@ -395,7 +395,8 @@ function appController(periodService, $scope, currentUser, mechanismsService, //When the dataset group is changed update the filter types and the datasets $scope.$on('DATASETGROUP.changed', function (event, dataSets) { - periodService.filterPeriodTypes(dataSets.getPeriodTypes()); + var oldPeriods = periodService.getPeriodTypes(); + var newPeriods = periodService.filterPeriodTypes(dataSets.getPeriodTypes()); $scope.details.dataSets = dataSets.get(); mechanismsService.categories = dataSets.getCategoryIds(); @@ -412,6 +413,11 @@ function appController(periodService, $scope, currentUser, mechanismsService, if (self.hasTableDetails()) { self.showData = false; self.deSelect(); + + //When the periodType has not changed, force a reload of the table since the dataset group changed + if (oldPeriods.length && newPeriods.length && oldPeriods[0] === newPeriods[0]) { + self.getTableData(); + } } self.updateViewButton(); diff --git a/src/main/manifest.webapp b/src/main/manifest.webapp index 1d56a81..3d1774a 100644 --- a/src/main/manifest.webapp +++ b/src/main/manifest.webapp @@ -1 +1 @@ -{"version":"0.4.2","name":"Data Approval","description":"Approvals app for PEPFAR","icons":{"48":"img/icons/dataapproval.png"},"developer":{"url":"http://www.dhis2.org","name":"Mark Polak","company":"DHIS2 Core Team","email":"markpo@ifi.uio.no"},"launch_path":"index.html?v=0.4.2","default_locale":"en","activities":{"dhis":{"href":"*"}}} \ No newline at end of file +{"version":"0.4.3","name":"Data Approval","description":"Approvals app for PEPFAR","icons":{"48":"img/icons/dataapproval.png"},"developer":{"url":"http://www.dhis2.org","name":"Mark Polak","company":"DHIS2 Core Team","email":"markpo@ifi.uio.no"},"launch_path":"index.html?v=0.4.3","default_locale":"en","activities":{"dhis":{"href":"*"}}} \ No newline at end of file