dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #42521
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 21738: Bugfix
------------------------------------------------------------
revno: 21738
committer: Markus Bekken <markus.bekken@xxxxxxxxx>
branch nick: dhis2
timestamp: Thu 2016-01-14 18:28:46 +0100
message:
Bugfix
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-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 2016-01-14 15:47:52 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/components/dataentry/dataentry-controller.js 2016-01-14 17:28:46 +0000
@@ -13,6 +13,7 @@
DateUtils,
EventUtils,
orderByFilter,
+ dateFilter,
SessionStorageService,
EnrollmentService,
ProgramStageFactory,
@@ -345,7 +346,7 @@
$scope.stagesCanBeShownAsTable = true;
}
});
-
+ var s = dateFilter(new Date(), 'YYYY-MM-dd');
$scope.programStages = orderByFilter($scope.programStages, '-sortOrder').reverse();
if (!$scope.currentStage) {
$scope.currentStage = $scope.programStages[0];
@@ -442,7 +443,7 @@
$scope.stageCanBeShownAsTable = function (stage) {
if (stage.programStageDataElements
&& stage.programStageDataElements.length < $scope.tableMaxNumberOfDataElements
- && !stage.repeatable) {
+ && stage.repeatable) {
return true;
}
return false;
@@ -1475,7 +1476,14 @@
setStatusColor();
setEventEditing($scope.currentEvent, $scope.currentStage);
-
+
+ for(var i=0;i<$scope.allEventsSorted.length;i++){
+ if($scope.allEventsSorted[i].event === $scope.currentEvent.event){
+ $scope.allEventsSorted[i] = $scope.currentEvent;
+ i=$scope.allEventsSorted.length;
+ }
+ }
+
if ($scope.currentEvent.status === 'COMPLETED') {
if ($scope.currentStage.remindCompleted) {