dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #37167
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 19014: minor
------------------------------------------------------------
revno: 19014
committer: Abyot Asalefew Gizaw <abyota@xxxxxxxxx>
branch nick: dhis2
timestamp: Fri 2015-04-24 14:19:02 +0200
message:
minor
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.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/registration/registration-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js 2015-04-23 15:18:14 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js 2015-04-24 12:19:02 +0000
@@ -160,8 +160,15 @@
}
else{
enrollment.enrollment = data.reference;
- $scope.selectedEnrollment = enrollment;
- notifyRegistrtaionCompletion(destination, $scope.tei.trackedEntityInstance);
+ $scope.selectedEnrollment = enrollment;
+ var dhis2Events = EventUtils.autoGenerateEvents($scope.tei.trackedEntityInstance, $scope.selectedProgram, $scope.selectedOrgUnit, enrollment);
+ if(dhis2Events.events.length > 0){
+ DHIS2EventFactory.create(dhis2Events).then(function(data){
+ notifyRegistrtaionCompletion(destination, $scope.tei.trackedEntityInstance);
+ });
+ }else{
+ notifyRegistrtaionCompletion(destination, $scope.tei.trackedEntityInstance);
+ }
}
});
}