dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #32468
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16569: tracker capture - reports WIP
------------------------------------------------------------
revno: 16569
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2014-08-29 14:39:37 +0200
message:
tracker capture - reports WIP
removed:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reports.html
added:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-summary-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-summary.html
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/i18n/en.json
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
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/styles/style.css
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/report-types.html
--
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/relationship/relationship-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js 2014-07-15 09:20:54 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/relationship/relationship-controller.js 2014-08-29 12:39:37 +0000
@@ -238,7 +238,7 @@
}
//process tei grid
- $scope.trackedEntityList = TEIGridService.format(data);
+ $scope.trackedEntityList = TEIGridService.format(data,false);
$scope.showTrackedEntityDiv = true;
$scope.teiFetched = true;
});
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-summary-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-summary-controller.js 2014-08-27 15:40:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-summary-controller.js 2014-08-29 12:39:37 +0000
@@ -64,17 +64,18 @@
};
//watch for selection of program
- $scope.$watch('selectedProgram', function() {
+ $scope.$watch('selectedProgram', function() {
if( angular.isObject($scope.selectedProgram)){
$scope.reportStarted = false;
$scope.dataReady = false;
}
});
- $scope.generateReport = function(){
+ $scope.generateReport = function(program, report, ouMode){
- $scope.reportStarted = true;
- $scope.dataReady = false;
+ $scope.selectedProgram = program;
+ $scope.report = report;
+ $scope.selectedOuMode = ouMode;
//check for form validity
$scope.outerForm.submitted = true;
@@ -82,13 +83,17 @@
return false;
}
+ $scope.reportStarted = true;
+ $scope.dataReady = false;
+
$scope.programStages = [];
angular.forEach($scope.selectedProgram.programStages, function(stage){
$scope.programStages[stage.id] = stage;
});
AttributesFactory.getByProgram($scope.selectedProgram).then(function(atts){
- $scope.gridColumns = TEIGridService.generateGridColumns(atts, $scope.selectedOuMode.name);
+ $scope.gridColumns = TEIGridService.generateGridColumns(atts, $scope.selectedOuMode.name);
+ console.log('The columns are: ', $scope.gridColumns);
});
//fetch TEIs for the selected program and orgunit/mode
@@ -98,17 +103,14 @@
'program=' + $scope.selectedProgram.id,
null,
$scope.pager,
- false).then(function(data){
- if(data.rows){
- $scope.teiCount = data.rows.length;
- }
-
+ false).then(function(data){
//process tei grid
- $scope.teiList = TEIGridService.format(data);
-
- DHIS2EventFactory.getByOrgUnitAndProgram($scope.selectedOrgUnit.id, $scope.selectedOuMode.name, $scope.selectedProgram.id).then(function(eventList){
- $scope.dhis2Events = [];
+ var teis = TEIGridService.format(data,true);
+ $scope.teiList = [];
+
+ DHIS2EventFactory.getByOrgUnitAndProgram($scope.selectedOrgUnit.id, $scope.selectedOuMode.name, $scope.selectedProgram.id, report.startDate, report.endDate).then(function(eventList){
+ $scope.dhis2Events = [];
angular.forEach(eventList, function(ev){
if(ev.trackedEntityInstance){
ev.name = $scope.programStages[ev.programStage].name;
@@ -117,9 +119,17 @@
ev.eventDate = DateUtils.format(ev.eventDate);
if($scope.dhis2Events[ev.trackedEntityInstance]){
+ if(teis.rows[ev.trackedEntityInstance]){
+ $scope.teiList.push(teis.rows[ev.trackedEntityInstance]);
+ delete teis.rows[ev.trackedEntityInstance];
+ }
$scope.dhis2Events[ev.trackedEntityInstance].push(ev);
}
else{
+ if(teis.rows[ev.trackedEntityInstance]){
+ $scope.teiList.push(teis.rows[ev.trackedEntityInstance]);
+ delete teis.rows[ev.trackedEntityInstance];
+ }
$scope.dhis2Events[ev.trackedEntityInstance] = [ev];
}
ev = EventUtils.setEventOrgUnitName(ev);
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-summary.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-summary.html 2014-08-27 15:40:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/program-summary.html 2014-08-29 12:39:37 +0000
@@ -4,8 +4,8 @@
<div id="leftBar">
<div class="left-bar-menu" ng-controller="LeftBarMenuController">
<ul class="nav nav-pills nav-stacked">
- <li><a href ng-click="showHome()">{{'registration_and_data_entry' | translate}}</a></li>
- <li><a href ng-click="showReportTypes()">{{'reports' | translate}}</a></li>
+ <li><a href ng-click="showHome()">{{'registration_and_data_entry'| translate}}</a></li>
+ <li><a href ng-click="showReportTypes()">{{'reports'| translate}}</a></li>
</ul>
</div>
<div id="orgUnitTree" style="margin-top:20px">
@@ -19,77 +19,21 @@
</div>
<div id="mainPage" class="bordered-div">
- <h2>{{'program_summary_report' | translate}}</h2>
+ <h2>{{'program_summary_report'| translate}}</h2>
<form name="outerForm" novalidate>
- <div class="row">
- <div class="col-sm-8 col-md-6">
- <table class="table table-borderless table-striped">
- <tr>
- <td class='col-sm-4 col-md-3 vertical-center'>
- {{'program' | translate}}
- </td>
- <td class='col-sm-4 col-md-3'>
- <select ng-model="selectedProgram"
- class="form-control"
- ng-options="program as program.name for program in programs | orderBy: 'name'"
- ng-disabled="programs.length < 1">
- <option value="">{{programs.length > 0 ? 'please_select_a_program' : 'no_program_exists' | translate}}</option>
- </select>
- </td>
- </tr>
- <tr>
- <td class='col-sm-4 col-md-3 vertical-center'>{{'org_unit'| translate}}</td>
- <td class='col-sm-4 col-md-3'>
- <label><input type="radio" ng-model="selectedOuMode.name" name="selected" value="SELECTED"> {{'SELECTED'| translate}}</label><br/>
- <label><input type="radio" ng-model="selectedOuMode.name" name="children" value="CHILDREN"> {{'CHILDREN'| translate}}</label><br/>
- <label><input type="radio" ng-model="selectedOuMode.name" name="descendants" value="DESCENDANTS"> {{'DESCENDANTS'| translate}}</label><br/>
- <label><input type="radio" ng-model="selectedOuMode.name" name="accessible" value="ACCESSIBLE"> {{'ACCESSIBLE'| translate}}</label>
- </td>
- </tr>
- </table>
- </div>
- </div>
- <div class="row">
- <div class="col-sm-8 col-md-6">
- <table class="table-borderless">
- <tr>
- <td>
- <input type="text" name="reportStartDate" placeholder="{{'start_date'| translate}} (yyyy-mm-dd)" class="form-control" ng-date ng-model="report.startDate" max="today" ng-required="true"/>
- <span ng-show="outerForm.submitted && outerForm.reportStartDate.$invalid" style="color:red;font-size:12px">{{'required'| translate}} (yyyy-mm-dd)</span>
- </td>
- <td>
- <input type="text" name="reportEndDate" placeholder="{{'end_date'| translate}} (yyyy-mm-dd)" class="form-control" ng-date ng-model="report.endDate" max="today" ng-required="true"/>
- <span ng-show="outerForm.submitted && outerForm.reportEndDate.$invalid" style="color:red;font-size:12px">{{'required'| translate}} (yyyy-mm-dd)</span>
- </td>
- </tr>
- </table>
- </div>
- <div class="col-md-6 trim">
- <button type="button" class="btn btn-primary" ng-click="generateReport()" ng-disabled="!selectedProgram">{{'go'| translate}}</button>
- </div>
- </div>
- </form>
- <div class="row" ng-if="programs.length < 1">
- <div class="col-sm-8 col-md-6 vertical-spacing">
- <div class="alert alert-warning">{{'no_program_exists_report'| translate}}</div>
- </div>
- </div>
- <div class="row" ng-if="programs.length > 0 && !selectedProgram">
- <div class="col-sm-8 col-md-6 vertical-spacing">
- <div class="alert alert-warning">{{'please_select_program_report'| translate}}</div>
- </div>
- </div>
+ <div ng-include="'components/report/reportForm.html'"></div>
+ </form>
<img src="../images/ajax-loader-bar.gif" ng-if="!dataReady && reportStarted"/>
<div ng-if="dataReady">
- <div ng-switch="teiCount">
+ <div ng-switch="teiList.length">
<div ng-switch-when="undefined">
<div class="alert alert-warning vertical-spacing">
- {{'no'| translate}} {{selectedProgram.trackedEntity.name|| 'records' | translate}} {{'found'| translate}}
+ {{'no_data_found'| translate}}
</div>
</div>
<div ng-switch-when="0">
<div class="alert alert-warning vertical-spacing">
- {{'no'| translate}} {{selectedProgram.trackedEntity.name|| 'records' | translate}} {{'found'| translate}}
+ {{'no_data_found'| translate}}
</div>
</div>
<div ng-switch-default>
@@ -100,38 +44,38 @@
<thead>
<tr>
<th>{{selectedProgram.trackedEntity.name}}</th>
- <th>{{selectedProgram.name}} {{'visit' | translate}}</th>
+ <th>{{selectedProgram.name}} {{'_records'| translate}}</th>
</tr>
</thead>
- <tr ng-repeat="tei in teiList.rows">
+ <tr ng-repeat="tei in teiList">
<td>
- <span ng-repeat="gridColumn in gridColumns">
+ <span ng-repeat="gridColumn in gridColumns" ng-if="gridColumn.displayInListNoProgram">
<span class="bold">{{gridColumn.name}}:</span> {{tei[gridColumn.id]}}<br>
</span>
</td>
- <td class='vertical-center'>
- <div class='bold inline-block' ng-if='!dhis2Events[tei.id]'>{{'no_visit_made' | translate}}</div>
- <div class="inline-block" ng-repeat="ev in dhis2Events[tei.id] | orderBy: 'eventDate'">
- <div class="block align-center">{{ev.orgUnitName}}</div>
- <div class="empty-stage-container"
- title="{{'no_data' | translate}}"
+ <td>
+ <span class='bold inline-block' ng-if='!dhis2Events[tei.id]'>{{'no_visit_made'| translate}}</span>
+ <span class="inline-block" ng-repeat="ev in dhis2Events[tei.id]| orderBy: 'eventDate'">
+ <span class="block align-center">{{ev.orgUnitName}}</span>
+ <span class="empty-stage-container"
+ title="{{'no_data'| translate}}"
ng-class="{'{{ev.statusColor}}': true}"
ng-if='!ev.dataValues'>
{{ev.name}}<br/>
{{ev.eventDate}}<br>
- {{'no_data' | translate}}
- </div>
- <div class="stage-container"
- title="{{'details' | translate}}"
+ {{'no_data'| translate}}
+ </span>
+ <span class="stage-container"
+ title="{{'details'| translate}}"
ng-class="{'{{ev.statusColor}}': true}"
ng-if='ev.dataValues'
ng-click="showEventDetails(ev, tei)">
{{ev.name}}<br/>
{{ev.eventDate}}<br>
- {{'data_exists' | translate}}
- </div>
- <span><i class="fa fa-arrow-right" ng-show="$index < dhis2Events[tei.id].length - 1"></i></span>
- </div>
+ <!--{{'data_exists'| translate}}-->
+ </span>
+ <i class="fa fa-arrow-right" ng-show="$index < dhis2Events[tei.id].length - 1"></i>
+ </span>
</td>
</tr>
</table>
=== added file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html 1970-01-01 00:00:00 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reportForm.html 2014-08-29 12:39:37 +0000
@@ -0,0 +1,66 @@
+
+<div class="row">
+ <div class="col-sm-8 col-md-6">
+ <table class="table table-borderless table-striped">
+ <tr>
+ <td class='col-sm-4 col-md-3 vertical-center'>
+ {{'program'| translate}}
+ </td>
+ <td class='col-sm-4 col-md-3'>
+ <select ng-model="selectedProgram"
+ class="form-control"
+ ng-options="program as program.name for program in programs | orderBy: 'name'"
+ ng-disabled="programs.length < 1">
+ <option value="">{{programs.length > 0 ? 'please_select_a_program' : 'no_program_exists'| translate}}</option>
+ </select>
+ </td>
+ </tr>
+ <tr>
+ <td class='col-sm-4 col-md-3 vertical-center'>{{'org_unit'| translate}}</td>
+ <td class='col-sm-4 col-md-3'>
+ <label><input type="radio" ng-model="selectedOuMode.name" name="selected" value="SELECTED"> {{'SELECTED'| translate}}</label><br/>
+ <label><input type="radio" ng-model="selectedOuMode.name" name="children" value="CHILDREN"> {{'CHILDREN'| translate}}</label><br/>
+ <label><input type="radio" ng-model="selectedOuMode.name" name="descendants" value="DESCENDANTS"> {{'DESCENDANTS'| translate}}</label><br/>
+ <label><input type="radio" ng-model="selectedOuMode.name" name="accessible" value="ACCESSIBLE"> {{'ACCESSIBLE'| translate}}</label>
+ </td>
+ </tr>
+ </table>
+ </div>
+</div>
+<div class="row">
+ <div class="col-sm-8 col-md-6">
+ <table class="table-borderless">
+ <tr>
+ <td>
+ <input type="text"
+ name="reportStartDate"
+ placeholder="{{'start_date'| translate}} (yyyy-mm-dd)"
+ class="form-control"
+ ng-date
+ ng-model="report.startDate"
+ max="today"
+ ng-required="true"/>
+ <span ng-show="outerForm.submitted && outerForm.reportStartDate.$invalid" style="color:red;font-size:12px">{{'required'| translate}} (yyyy-mm-dd)</span>
+ </td>
+ <td>
+ <input type="text" name="reportEndDate" placeholder="{{'end_date'| translate}} (yyyy-mm-dd)" class="form-control" ng-date ng-model="report.endDate" max="today" ng-required="true"/>
+ <span ng-show="outerForm.submitted && outerForm.reportEndDate.$invalid" style="color:red;font-size:12px">{{'required'| translate}} (yyyy-mm-dd)</span>
+ </td>
+ </tr>
+ </table>
+ </div>
+ <div class="col-md-6 trim">
+ <button type="button" class="btn btn-primary" ng-click="generateReport(selectedProgram, report, selectedOuMode)" ng-disabled="!selectedProgram">{{'go'| translate}}</button>
+ </div>
+</div>
+
+<div class="row" ng-if="programs.length < 1">
+ <div class="col-sm-8 col-md-6 vertical-spacing">
+ <div class="alert alert-warning">{{'no_program_exists_report'| translate}}</div>
+ </div>
+</div>
+<div class="row" ng-if="programs.length > 0 && !selectedProgram">
+ <div class="col-sm-8 col-md-6 vertical-spacing">
+ <div class="alert alert-warning">{{'please_select_program_report'| translate}}</div>
+ </div>
+</div>
\ No newline at end of file
=== removed file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reports.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reports.html 2014-08-27 12:55:29 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/reports.html 1970-01-01 00:00:00 +0000
@@ -1,25 +0,0 @@
-<div id="leftBar">
- <div class="left-bar-menu" ng-controller="LeftBarMenuController">
- <ul class="nav nav-pills nav-stacked">
- <li><a href ng-click="showHome()">{{'registration_and_data_entry' | translate}}</a></li>
- <li><a href ng-click="showReportTypes()">{{'reports' | translate}}</a></li>
- </ul>
- </div>
-</div>
-<div id="mainPage">
- <h2>{{'tracker_reports' | translate}}</h2>
- <div class="row">
- <div class="col-md-6 report-type-container" ng-click="summaryReport()">
- <h2><i class="fa fa-list-alt"></i> <span class="horizonal-spacing">{{'program_summary' | translate}}</span></h2>
- {{'program_summary_description' | translate}}
- </div>
- <div class="col-md-6 report-type-container" ng-click="upcomingEvents()">
- <h2><i class="fa fa-clock-o"></i> <span class="horizonal-spacing">{{'upcoming_events' | translate}}</span></h2>
- {{'upcoming_events_description' | translate}}
- </div>
- <div class="col-md-6 report-type-container" ng-click="overdueEvents()">
- <h2><i class="fa fa-exclamation-circle"></i> <span class="horizonal-spacing">{{'overdue_events' | translate}}</span></h2>
- {{'overdue_events_description' | translate}}
- </div>
- </div>
-</div>
\ No newline at end of file
=== 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-08-27 15:40:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/report/upcoming-events-controller.js 2014-08-29 12:39:37 +0000
@@ -103,9 +103,8 @@
$scope.teiCount = data.rows.length;
}
-
//process tei grid
- $scope.teiList = TEIGridService.format(data);
+ $scope.teiList = TEIGridService.format(data, false);
DHIS2EventFactory.getByOrgUnitAndProgram($scope.selectedOrgUnit.id, $scope.selectedOuMode.name, $scope.selectedProgram.id).then(function(eventList){
$scope.dhis2Events = [];
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-08-27 12:55:29 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-08-29 12:39:37 +0000
@@ -118,16 +118,17 @@
"registration_and_data_entry": "Registration and Data Entry",
"program_summary_report": "Program Summary Report",
"program_summary": "Program Summary",
- "program_summary_description": "Generate a summary report for a particular program, organisation unit and time frame. The report provides an overview of data recorded for a list of tracked entity instances.",
+ "program_summary_description": "Generate a summary report for a particular program, organisation unit and time frame. The report presents a list of tracked entity instances and the services they got from the selected program.",
"upcoming_events": "Upcoming Events",
"upcoming_events_description": "Generate a report that lists tracked entity instances and their upcoming events that require attention. The events displayed are those that are scheduled in due time.",
"overdue_events": "Overdue Events",
- "overdue_events_description": "Generate a report of overdue events for a selected program and organisation unit. The report displays list of tracked entity instances and their events that are not conducted on their scheduled due dates.",
+ "overdue_events_description": "Generate a report of overdue events for a selected program and organisation unit. The report displays list of tracked entity instances and their events that are not conducted on scheduled due dates.",
"report": "Report",
"_report": "report",
"visit_schedule": "Visit Schedule",
"lost_to_followup": "Lost to Follow-up",
"registered_data": "Registered data",
+ "no_data_found": "No data found",
"no_data": "No data",
"data_exists": "Data exists",
"data_registerd": "No data registered",
@@ -185,6 +186,7 @@
"records": "Records",
"record": "Record",
"_record": "record",
+ "_records": "records",
"found": "Found",
"move_to_selected": "Move to selected",
"move_all_to_selected": "Move all to selected",
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-08-27 11:18:35 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2014-08-29 12:39:37 +0000
@@ -252,7 +252,7 @@
}
//process tei grid
- $scope.trackedEntityList = TEIGridService.format(data);
+ $scope.trackedEntityList = TEIGridService.format(data,false);
$scope.showTrackedEntityDiv = true;
$scope.teiFetched = true;
$scope.doSearch = 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-08-25 15:28:05 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-08-29 12:39:37 +0000
@@ -533,8 +533,8 @@
});
return promise;
},
- getByOrgUnitAndProgram: function(orgUnit, ouMode, program){
- var promise = $http.get( '../api/events.json?' + 'orgUnit=' + orgUnit + '&ouMode='+ ouMode + '&program=' + program + '&paging=false').then(function(response){
+ getByOrgUnitAndProgram: function(orgUnit, ouMode, program, startDate, endDate){
+ var promise = $http.get( '../api/events.json?' + 'orgUnit=' + orgUnit + '&ouMode='+ ouMode + '&program=' + program + '&startDate=' + startDate + '&endDate=' + endDate + '&paging=false').then(function(response){
return response.data.events;
});
return promise;
@@ -1052,7 +1052,7 @@
.service('TEIGridService', function(OrgUnitService, DateUtils){
return {
- format: function(grid){
+ format: function(grid, map){
if(!grid || !grid.rows){
return;
}
@@ -1093,12 +1093,17 @@
}
if(!isEmpty){
- entityList.push(entity);
+ if(map){
+ entityList[entity.id] = entity;
+ }
+ else{
+ entityList.push(entity);
+ }
}
});
});
return {headers: attributes, rows: entityList, pager: grid.metaData.pager};
- },
+ },
generateGridColumns: function(attributes, ouMode){
var columns = attributes ? angular.copy(attributes) : [];
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-08-27 10:38:27 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-08-29 12:39:37 +0000
@@ -766,9 +766,14 @@
}
.report-type-container{
+
padding: 10px;
}
+.validation-error {
+ color: #b94a48 !important;
+}
+
.report-type-container:hover, .report-type-container:focus{
background-color: #ebebeb;
cursor: pointer;
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/report-types.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/report-types.html 2014-08-27 15:40:36 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/report-types.html 2014-08-29 12:39:37 +0000
@@ -1,25 +1,25 @@
<div id="leftBar">
<div class="left-bar-menu" ng-controller="LeftBarMenuController">
<ul class="nav nav-pills nav-stacked">
- <li><a href ng-click="showHome()">{{'registration_and_data_entry' | translate}}</a></li>
- <li><a href ng-click="showReportTypes()">{{'reports' | translate}}</a></li>
+ <li><a href ng-click="showHome()">{{'registration_and_data_entry'| translate}}</a></li>
+ <li><a href ng-click="showReportTypes()">{{'reports'| translate}}</a></li>
</ul>
</div>
</div>
<div id="mainPage">
- <h2>{{'tracker_reports' | translate}}</h2>
- <div class="row">
+ <h1>{{'tracker_reports'| translate}}</h1>
+ <div class="row col-md-10">
<div class="col-md-6 report-type-container" ng-click="programSummary()">
- <h2><i class="fa fa-list-alt"></i> <span class="horizonal-spacing">{{'program_summary' | translate}}</span></h2>
- {{'program_summary_description' | translate}}
+ <h2><small><i class="fa fa-list-alt fa-3x black"></i></small><span class="horizonal-spacing">{{'program_summary'| translate}}</span></h2>
+ {{'program_summary_description'| translate}}
</div>
<div class="col-md-6 report-type-container" ng-click="upcomingEvents()">
- <h2><i class="fa fa-clock-o"></i> <span class="horizonal-spacing">{{'upcoming_events' | translate}}</span></h2>
- {{'upcoming_events_description' | translate}}
+ <h2><small><i class="fa fa-clock-o fa-3x black"></i></small><span class="horizonal-spacing">{{'upcoming_events'| translate}}</span></h2>
+ {{'upcoming_events_description'| translate}}
</div>
<div class="col-md-6 report-type-container" ng-click="overdueEvents()">
- <h2><i class="fa fa-bell-o"></i> <span class="horizonal-spacing">{{'overdue_events' | translate}}</span></h2>
- {{'overdue_events_description' | translate}}
- </div>
+ <h2><small><i class="fa fa-bell-o fa-3x black"></i></small><span class="horizonal-spacing">{{'overdue_events'| translate}}</span></h2>
+ {{'overdue_events_description'| translate}}
+ </div>
</div>
</div>
\ No newline at end of file