dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #41768
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21307: Program rules triggered immediately when event date and profile info is updated
------------------------------------------------------------
revno: 21307
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2015-12-03 23:41:49 +0100
message:
Program rules triggered immediately when event date and profile info is updated
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js
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/dataentry/dataentry-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 2015-11-27 09:35:48 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 2015-12-03 22:41:49 +0000
@@ -81,6 +81,12 @@
$scope.$on('eventcreated', function (event, args) {
$scope.addNewEvent(args.event);
});
+
+ $scope.$on('teiupdated', function(event, args){
+ var selections = CurrentSelection.get();
+ $scope.selectedTei = selections.tei;
+ $scope.executeRules();
+ });
//listen for rule effect changes
$scope.$on('ruleeffectsupdated', function (event, args) {
@@ -652,6 +658,7 @@
eventToSave.statusColor = EventUtils.getEventStatusColor(eventToSave);
sortEventsByStage('UPDATE');
$scope.validatedDateSetForEvent = {date: eventToSave.eventDate, event: eventToSave};
+ $scope.executeRules();
});
};
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js 2015-09-11 15:16:03 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/profile/profile-controller.js 2015-12-03 22:41:49 +0000
@@ -26,7 +26,7 @@
$scope.enrollmentEditing = args.enrollmentEditing;
});
- var listenToBroadCast = function(){
+ var listenToBroadCast = function(){
$scope.editingDisabled = true;
selections = CurrentSelection.get();
$scope.selectedTei = angular.copy(selections.tei);
=== 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-10-15 14:25:38 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/registration/registration-controller.js 2015-12-03 22:41:49 +0000
@@ -169,6 +169,7 @@
if( $scope.registrationMode === 'PROFILE' ){
reloadProfileWidget();
+ $rootScope.$broadcast('teiupdated', {});
}
else{
if( $scope.selectedProgram ){