=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events-controller.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events-controller.js 2015-03-06 14:43:54 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events-controller.js 2015-03-06 14:54:40 +0000 @@ -12,7 +12,6 @@ ProgramFactory, CurrentSelection, OptionSetService, - TEIService, storage) { $scope.today = DateUtils.getToday(); @@ -134,37 +133,10 @@ } angular.forEach(data.eventRows, function(row){ - var overdueEvent = {}; - TEIService.reconstructForUser(row.attributes, attributes, $scope.attributesById, $scope.optionSets) + var overdueEvent = {}; angular.forEach(row.attributes, function(att){ - - /*if(att.type === 'trueOnly'){ - if(att.value === 'true'){ - att.value = true; - } - else{ - att.value = ''; - } - } - else{ - var val = att.value; - if(val){ - if(att.type === 'date'){ - val = DateUtils.formatFromApiToUser(val); - } - if(att.type === 'optionSet' && - attsById[att.attribute] && - attsById[att.attribute].optionSet && - attsById[att.attribute].optionSet.id && - optionSets[attsById[att.attribute].optionSet.id]){ - val = OptionSetService.getName(optionSets[attsById[att.attribute].optionSet.id].options, val); - } - att.value = val; - } - }*/ - - overdueEvent[att.attribute] = val; - + var val = AttributesFactory.formatAttributeValue(att, $scope.attributesById, $scope.optionSets, 'USER'); + overdueEvent[att.attribute] = val; }); overdueEvent.dueDate = DateUtils.formatFromApiToUser(row.dueDate); === modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events-controller.js' --- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events-controller.js 2015-03-06 14:43:54 +0000 +++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events-controller.js 2015-03-06 14:54:40 +0000 @@ -40,7 +40,6 @@ }); CurrentSelection.setAttributesById($scope.attributesById); - $scope.broadCastSelections(); }); //load programs associated with the selected org unit. @@ -119,7 +118,8 @@ angular.forEach(data.eventRows, function(row){ var upcomingEvent = {}; angular.forEach(row.attributes, function(att){ - upcomingEvent[att.attribute] = att.value; + var val = AttributesFactory.formatAttributeValue(att, $scope.attributesById, $scope.optionSets, 'USER'); + upcomingEvent[att.attribute] = val; }); upcomingEvent.dueDate = DateUtils.formatFromApiToUser(row.dueDate);