dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #31707
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16205: tracker capture - minor layout fix for event details in program report
------------------------------------------------------------
revno: 16205
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Mon 2014-07-21 15:20:58 +0200
message:
tracker capture - minor layout fix for event details in program report
modified:
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html
dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report-controller.js
dhis-2/dhis-web/dhis-web-tracker-capture/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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html 2014-07-21 12:51:09 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/program-details.html 2014-07-21 13:20:58 +0000
@@ -45,9 +45,10 @@
</tr>
</table>
</div>
-
- <div class='vertical-spacing' ng-repeat='dhis2Event in report.enrollments[enrollment.enrollment]'>
- <h3 class='col-sm-12'>{{'visits'| translate}}</h3>
+
+ <h2 class='col-sm-12'>{{'visits'| translate}}</h2>
+ <div class='vertical-spacing' ng-repeat="dhis2Event in report.enrollments[enrollment.enrollment] | orderBy:'sortingDate':reverse">
+ <!--<h3 class='col-sm-12'>{{'visits'| translate}}</h3>-->
<div class="col-sm-2">
<span class="bold">{{'name'| translate}}:</span> {{dhis2Event.name}}
</div>
@@ -65,7 +66,7 @@
</div>
<div class='row vertical-spacing'></div>
<div class='col-sm-6'>
- <table class="table table-bordered table-compact" ng-if="dhis2Event.visited">
+ <table class="table table-bordered table-compact" ng-if="dhis2Event.visited && dhis2Event.dataValues">
<tr class="col-sm-12">
<th class="col-md-5">
{{'data_element'| translate}}
@@ -91,6 +92,7 @@
</table>
</div>
<div class="alert alert-warning visit-details col-sm-6" ng-if="!dhis2Event.visited">{{'visit_not_made'| translate}}</div>
+ <div class="alert alert-warning visit-details col-sm-6" ng-if="!dhis2Event.dataValues">{{'no_data'| translate}}</div>
<div class='row vertical-spacing'></div>
<div ng-if="dhis2Event.notes">
<h4 class='col-sm-12'>{{'notes'| translate}}</h4>
@@ -105,6 +107,7 @@
</tr>
</table>
</div>
+ <hr class="visit-details" ng-show="$index < report.enrollments[enrollment.enrollment].length - 1">
</div>
</div>
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report-controller.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report-controller.js 2014-07-21 12:51:09 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/report/report-controller.js 2014-07-21 13:20:58 +0000
@@ -218,8 +218,10 @@
DHIS2EventFactory.getEventsByProgram($scope.selectedTei.trackedEntityInstance, orgUnitId, programId).then(function(eventList){
angular.forEach(eventList, function(ev){
- if(ev.program){
+ if(ev.program){
ev.visited = true;
+ ev.dueDate = DateUtils.format(ev.dueDate);
+ ev.sortingDate = ev.dueDate;
ev.name = $scope.programStageNames[ev.programStage].name;
ev.programName = $scope.programNames[ev.program].name;
if(angular.isUndefined($scope.report[ev.program].enrollments)){
@@ -229,12 +231,11 @@
if(ev.eventDate){
ev.eventDate = DateUtils.format(ev.eventDate);
+ ev.sortingDate = ev.eventDate;
}
else{
ev.visited = false;
- }
-
- ev.dueDate = DateUtils.format(ev.dueDate);
+ }
if(ev.enrollment){
if($scope.report[ev.program].enrollments[ev.enrollment]){
=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-07-18 16:47:49 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2014-07-21 13:20:58 +0000
@@ -533,7 +533,7 @@
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){
+ var promise = $http.get( '../api/events.json?' + 'orgUnit=' + orgUnit + '&ouMode='+ ouMode + '&program=' + program + '&paging=false').then(function(response){
return response.data.events;
});
return promise;