------------------------------------------------------------ revno: 16204 committer: Abyot Asalefew Gizaw aby...@gmail.com branch nick: dhis2 timestamp: Mon 2014-07-21 14:51:09 +0200 message: tracker capture - in program reports, when no event data is recorded it is enough to display visit not made information than empty form 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/i18n/en.json dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css
-- 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-15 08:28:50 +0000 +++ 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 @@ -58,14 +58,14 @@ <span class="bold">{{'due_date'| translate}}:</span> {{dhis2Event.dueDate}} </div> <div class="col-sm-2"> - <span class="bold">{{'visit'| translate}} {{'_date'| translate}}:</span> {{dhis2Event.eventDate}} + <span class="bold">{{'visit'| translate}} {{'_date'| translate}}:</span> {{dhis2Event.eventDate ? dhis2Event.eventDate:'no_visit_made' | translate}} </div> <div class="col-sm-2"> <span class="bold">{{'status'| translate}}:</span> {{dhis2Event.status}} </div> <div class='row vertical-spacing'></div> <div class='col-sm-6'> - <table class="table table-bordered table-compact"> + <table class="table table-bordered table-compact" ng-if="dhis2Event.visited"> <tr class="col-sm-12"> <th class="col-md-5"> {{'data_element'| translate}} @@ -88,8 +88,9 @@ {{dhis2Event[prStDe.dataElement.id].providedElsewhere ? 'provided_elsewhere' : ''| translate}} </td> </tr> - </table> + </table> </div> + <div class="alert alert-warning visit-details col-sm-6" ng-if="!dhis2Event.visited">{{'visit_not_made'| translate}}</div> <div class='row vertical-spacing'></div> <div ng-if="dhis2Event.notes"> <h4 class='col-sm-12'>{{'notes'| translate}}</h4> @@ -104,7 +105,6 @@ </tr> </table> </div> - </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-15 09:20:54 +0000 +++ 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 @@ -218,14 +218,22 @@ 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.name = $scope.programStageNames[ev.programStage].name; ev.programName = $scope.programNames[ev.program].name; if(angular.isUndefined($scope.report[ev.program].enrollments)){ $scope.report[ev.program] = {enrollments: {}}; } ev.statusColor = EventUtils.getEventStatusColor(ev); - ev.eventDate = DateUtils.format(ev.eventDate); + + if(ev.eventDate){ + ev.eventDate = DateUtils.format(ev.eventDate); + } + else{ + ev.visited = false; + } + ev.dueDate = DateUtils.format(ev.dueDate); if(ev.enrollment){ @@ -337,6 +345,7 @@ angular.forEach(ev.notes, function(note){ note.storedDate = moment(note.storedDate).format('DD.MM.YYYY @ hh:mm A'); }); + if(ev.dataValues){ angular.forEach(ev.dataValues, function(dv){ if(dv.dataElement){ === modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-07-18 13:06:27 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/i18n/en.json 2014-07-21 12:51:09 +0000 @@ -19,7 +19,7 @@ "not_yet_enrolled_report": "Not yet enrolled. Reporting not possible", "no_data_report": "No record exists for reporting", "empty_notes": "Empty notes list.", - "no_event_is_yet_created": "No event is available for data entry. Please create one from the link above.", + "no_event_is_yet_created": "No event is available for data entry. Please create one.", "event_creation": "Please create one from below", "not_selected": "Not selected", "create": "Create", @@ -118,11 +118,12 @@ "data_exists": "Data exists", "data_registerd": "No data registered", "no_visit_made": "No visit made", + "visit_not_made": "Visit not yet conducted", "_visit": "visit", "visit": "Visit", "visits": "Visits", "current_selections": "Current selections", - "org_unit": "Organisation unit", + "org_unit": "Org unit", "SELECTED": "Selected", "CHILDREN": "Immediate children", "DESCENDANTS": "All children", === modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css' --- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-07-21 09:39:19 +0000 +++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/styles/style.css 2014-07-21 12:51:09 +0000 @@ -487,6 +487,11 @@ margin-top: 15px !important; } +.visit-details { + margin-top: -5px; + margin-left: 15px; +} + .add-note { margin-bottom: 30px; margin-left: -5px;
_______________________________________________ Mailing list: https://launchpad.net/~dhis2-devs Post to : dhis2-devs@lists.launchpad.net Unsubscribe : https://launchpad.net/~dhis2-devs More help : https://help.launchpad.net/ListHelp