dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #33693
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 17248: minor changes to overdue and upcoming event repots
------------------------------------------------------------
revno: 17248
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2014-10-23 18:54:30 +0200
message:
minor changes to overdue and upcoming event repots
modified:
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/upcoming-events-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
--
lp:dhis2
https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk
Your team DHIS 2 developers is subscribed to branch lp:dhis2.
To unsubscribe from this branch go to https://code.launchpad.net/~dhis2-devs-core/dhis2/trunk/+edit-subscription
=== 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 2014-10-13 14:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/overdue-events-controller.js 2014-10-23 16:54:30 +0000
@@ -92,6 +92,7 @@
$scope.reportFinished = false;
$scope.reportStarted = true;
$scope.overdueEvents = [];
+
EventReportService.getEventReport($scope.selectedOrgUnit.id, $scope.selectedOuMode, $scope.selectedProgram.id, null, null, 'ACTIVE','OVERDUE', $scope.pager).then(function(data){
if( data.pager ){
@@ -112,7 +113,8 @@
overdueEvent.dueDate = DateUtils.formatFromApiToUser(row.dueDate);
overdueEvent.event = row.event;
- overdueEvent.eventName = row.eventName;
+ overdueEvent.eventName = $scope.programStages[row.programStage].name;
+ overdueEvent.eventOrgUnitName = row.eventOrgUnitName;
overdueEvent.followup = row.followup;
overdueEvent.program = row.program;
overdueEvent.programStage = row.programStage;
@@ -148,6 +150,8 @@
AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){
$scope.gridColumns = TEIGridService.generateGridColumns(atts, $scope.selectedOuMode);
+ $scope.gridColumns.push({name: $translate('event_orgunit_name'), id: 'eventOrgUnitName', type: 'string', displayInListNoProgram: false, showFilter: false, show: true});
+ $scope.filterTypes['eventOrgUnitName'] = 'string';
$scope.gridColumns.push({name: $translate('event_name'), id: 'eventName', type: 'string', displayInListNoProgram: false, showFilter: false, show: true});
$scope.filterTypes['eventName'] = 'string';
$scope.gridColumns.push({name: $translate('due_date'), id: 'dueDate', type: 'date', displayInListNoProgram: false, showFilter: false, show: true});
=== 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 2014-10-13 14:47:39 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events-controller.js 2014-10-23 16:54:30 +0000
@@ -109,10 +109,11 @@
angular.forEach(row.attributes, function(att){
upcomingEvent[att.attribute] = att.value;
});
-
+
upcomingEvent.dueDate = DateUtils.formatFromApiToUser(row.dueDate);
upcomingEvent.event = row.event;
- upcomingEvent.eventName = row.eventName;
+ upcomingEvent.eventName = $scope.programStages[row.programStage].name;
+ upcomingEvent.eventOrgUnitName = row.eventOrgUnitName;
upcomingEvent.followup = row.followup;
upcomingEvent.program = row.program;
upcomingEvent.programStage = row.programStage;
@@ -144,9 +145,12 @@
$scope.programStages[stage.id] = stage;
});
+
AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){
$scope.gridColumns = TEIGridService.generateGridColumns(atts, $scope.selectedOuMode);
-
+
+ $scope.gridColumns.push({name: $translate('event_orgunit_name'), id: 'eventOrgUnitName', type: 'string', displayInListNoProgram: false, showFilter: false, show: true});
+ $scope.filterTypes['eventOrgUnitName'] = 'string';
$scope.gridColumns.push({name: $translate('event_name'), id: 'eventName', type: 'string', displayInListNoProgram: false, showFilter: false, show: true});
$scope.filterTypes['eventName'] = 'string';
$scope.gridColumns.push({name: $translate('due_date'), id: 'dueDate', type: 'date', displayInListNoProgram: false, showFilter: false, show: true});
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-10-23 14:40:31 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-10-23 16:54:30 +0000
@@ -639,7 +639,7 @@
getEventReport: function(orgUnit, ouMode, program, startDate, endDate, programStatus, eventStatus, pager){
var pgSize = pager ? pager.pageSize : 50;
var pg = pager ? pager.page : 1;
- var url = '../api/events/overdue.json?' + 'orgUnit=' + orgUnit + '&ouMode='+ ouMode + '&program=' + program + '&programStatus=' + programStatus + '&eventStatus='+ eventStatus + '&pageSize=' + pgSize + '&page=' + pg;
+ var url = '../api/events/eventRows.json?' + 'orgUnit=' + orgUnit + '&ouMode='+ ouMode + '&program=' + program + '&programStatus=' + programStatus + '&eventStatus='+ eventStatus + '&pageSize=' + pgSize + '&page=' + pg;
if(startDate && endDate){
url = url + '&startDate=' + startDate + '&endDate=' + endDate ;
}