← Back to team overview

dhis2-devs team mailing list archive

[Branch ~dhis2-devs-core/dhis2/trunk] Rev 16187: tracker capture - removed unused code

 

------------------------------------------------------------
revno: 16187
committer: Abyot Asalefew Gizaw abyota@xxxxxxxxx
branch nick: dhis2
timestamp: Fri 2014-07-18 20:24:39 +0200
message:
  tracker capture - removed unused code
modified:
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js
  dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.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-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js	2014-07-18 16:47:49 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment-controller.js	2014-07-18 18:24:39 +0000
@@ -194,6 +194,7 @@
                     $scope.autoGenerateEvents();                    
                     $scope.broadCastSelections('dashboardWidgets'); 
                     
+                    $scope.showEnrollmentDiv = false;
                     $scope.outerForm.submitted = false;      
                 });
             }
@@ -268,29 +269,7 @@
         //$scope.showEnrollmentHistoryDiv = !$scope.showEnrollmentHistoryDiv;
         console.log('need to figure out how to deal with previous enrollments'); 
     };
-    
-    $scope.getEventsForRescheduling = function(){
         
-        DHIS2EventFactory.getEventsByStatus($scope.selectedTei.trackedEntityInstance, $scope.selectedOrgUnit.id, $scope.selectedProgram.id, 'ACTIVE', 'SCHEDULE').then(function(data){
-            if(angular.isObject(data)){
-                angular.forEach(data, function(ev){                    
-                    if(ev.enrollment === $scope.selectedEnrollment.enrollment){                        
-                        ev.name = $scope.selectedProgramWithStage[ev.programStage].name;                        
-                        ev.dueDate = DateUtils.format(ev.dueDate);                        
-                        ev.statusColor = EventUtils.getEventStatusColor(ev);                          
-                        $scope.eventsForRescheduling.push(ev);
-                        ev = EventUtils.setEventOrgUnitName(ev);
-                    }                                                                                 
-                });
-            }  
-            
-            if($scope.eventsForRescheduling.length > 0 ){
-                $scope.eventsForRescheduling = orderByFilter($scope.eventsForRescheduling, '-eventDate');
-                $scope.eventsForRescheduling.reverse();
-            }
-        });        
-    };
-    
     $scope.autoGenerateEvents = function(){
         if($scope.selectedTei && $scope.selectedProgram && $scope.selectedOrgUnit && $scope.selectedEnrollment){            
             $scope.dhis2Events = {events: []};

=== modified file 'dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html'
--- dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html	2014-07-18 16:47:49 +0000
+++ dhis-2/dhis-web/dhis-web-tracker-capture/src/main/webapp/dhis-web-tracker-capture/components/enrollment/enrollment.html	2014-07-18 18:24:39 +0000
@@ -148,19 +148,6 @@
         </div>
         <!-- operations on historical enrollment ends -->
         
-        <div ng-if="showReSchedulingDiv && eventsForRescheduling.length > 0">
-            <table class="table-borderless table-striped">
-                <tr class="col-md-12" ng-repeat="ev in eventsForRescheduling">
-                    <td class="col-md-6">
-                        {{ev.name}}
-                    </td>
-                    <td class="col-md-6">
-                        <input type="text" class="form-control" ng-date ng-model="ev.dueDate" blur-or-change="saveScheduledDate(ev)"/>
-                    </td>
-                </tr>                                
-            </table>  
-        </div>
-        
         <div ng-if="selectedProgram && !selectedEnrollment && !showEnrollmentDiv && !hasEnrollmentHistory">
             <div class="alert alert-warning">{{'not_yet_enrolled_enrollment'| translate}}</div> 
         </div>