dhis2-devs team mailing list archive
-
dhis2-devs team
-
Mailing list archive
-
Message #43809
[Branch ~dhis2-devs-core/dhis2/trunk] Rev 22211: tracker-capture: allow for searching of TEIs based on program enrollment incident date
------------------------------------------------------------
revno: 22211
committer: Abyot Asalefew Gizaw <abyot@xxxxxxxxx>
branch nick: dhis2
timestamp: Wed 2016-03-09 15:50:20 +0100
message:
tracker-capture: allow for searching of TEIs based on program enrollment incident date
modified:
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js
dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/advanced-search.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-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties 2016-03-08 15:39:09 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/i18n/i18n_app.properties 2016-03-09 14:50:20 +0000
@@ -134,6 +134,7 @@
complete_enrollment=Complete enrollment
incomplete_enrollment=Incomplete enrollment
enrollment_date=Enrollment date
+incident_date=Incident date
notes=Notes
relationship=Relationship
relationships=Relationships
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2016-02-22 16:07:38 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/controllers.js 2016-03-09 14:50:20 +0000
@@ -51,7 +51,7 @@
$scope.searchFilterExists = false;
$scope.defaultOperators = OperatorFactory.defaultOperators;
$scope.boolOperators = OperatorFactory.boolOperators;
- $scope.enrollment = {programStartDate: '', programEndDate: '', operator: $scope.defaultOperators[0]};
+ $scope.enrollment = {enrollmentStartDate: '', enrollmentEndDate: '', incidentStartDate: '', incidentEndDate: '', operator: $scope.defaultOperators[0]};
$scope.searchMode = { listAll: 'LIST_ALL', freeText: 'FREE_TEXT', attributeBased: 'ATTRIBUTE_BASED' };
$scope.optionSets = null;
$scope.attributesById = null;
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2016-03-08 16:35:53 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/scripts/services.js 2016-03-09 14:50:20 +0000
@@ -1427,22 +1427,22 @@
if(enrollment){
var q = '';
- if(enrollment.operator === OperatorFactory.defaultOperators[0]){
- if(enrollment.programExactDate && enrollment.programExactDate !== ''){
- query.hasValue = true;
- q += '&programStartDate=' + DateUtils.formatFromUserToApi(enrollment.programExactDate) + '&programEndDate=' + DateUtils.formatFromUserToApi(enrollment.programExactDate);
- }
- }
- if(enrollment.operator === OperatorFactory.defaultOperators[1]){
- if(enrollment.programStartDate && enrollment.programStartDate !== ''){
- query.hasValue = true;
- q += '&programStartDate=' + DateUtils.formatFromUserToApi(enrollment.programStartDate);
- }
- if(enrollment.programEndDate && enrollment.programEndDate !== ''){
- query.hasValue = true;
- q += '&programEndDate=' + DateUtils.formatFromUserToApi(enrollment.programEndDate);
- }
- }
+ if(enrollment.programEnrollmentStartDate && enrollment.programEnrollmentStartDate !== ''){
+ query.hasValue = true;
+ q += '&programEnrollmentStartDate=' + DateUtils.formatFromUserToApi(enrollment.programEnrollmentStartDate);
+ }
+ if(enrollment.programEnrollmentEndDate && enrollment.programEnrollmentEndDate !== ''){
+ query.hasValue = true;
+ q += '&programEnrollmentEndDate=' + DateUtils.formatFromUserToApi(enrollment.programEnrollmentEndDate);
+ }
+ if(enrollment.programIncidentStartDate && enrollment.programIncidentStartDate !== ''){
+ query.hasValue = true;
+ q += '&programIncidentStartDate=' + DateUtils.formatFromUserToApi(enrollment.programIncidentStartDate);
+ }
+ if(enrollment.programIncidentEndDate && enrollment.programIncidentEndDate !== ''){
+ query.hasValue = true;
+ q += '&programIncidentEndDate=' + DateUtils.formatFromUserToApi(enrollment.programIncidentEndDate);
+ }
if(q){
if(query.url){
query.url = query.url + q;
=== modified file 'dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/advanced-search.html'
--- dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/advanced-search.html 2016-02-15 09:46:27 +0000
+++ dhis-2/dhis-web/dhis-web-apps/src/main/webapp/dhis-web-tracker-capture/views/advanced-search.html 2016-03-09 14:50:20 +0000
@@ -14,24 +14,28 @@
</td>
</tr>
<tr ng-if="selectedProgram">
- <td>{{'enrollment_date'| translate}}</td>
- <td>
- <div class="dataelement-filter">
- <div class="filter-operator">
- <select ng-model="enrollment.operator" class="form-control-select2" ng-options="operator | translate for operator in defaultOperators">
- </select>
- </div>
- <div class="filter-value" ng-show="enrollment.operator === defaultOperators[0]">
- <input type="text" placeholder="{{'exact_date'| translate}}" class="form-control-select2" d2-date max-date="0" ng-model="enrollment.programExactDate"/>
- </div>
- <div class="filter-value" ng-show="enrollment.operator === defaultOperators[1]">
- <div class="container-1-2">
- <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programStartDate"/>
- </div>
- <div class="container-1-2">
- <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programEndDate"/>
- </div>
- </div>
+ <td>{{selectedProgram.enrollmentDateLabel}}</td>
+ <td>
+ <div class="dataelement-filter">
+ <div class="container-1-2">
+ <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programEnrollmentStartDate"/>
+ </div>
+ <div class="container-1-2">
+ <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programEnrollmentEndDate"/>
+ </div>
+ </div>
+ </td>
+ </tr>
+ <tr ng-if="selectedProgram && selectedProgram.displayIncidentDate">
+ <td>{{selectedProgram.incidentDateLabel}}</td>
+ <td>
+ <div class="dataelement-filter">
+ <div class="container-1-2">
+ <input type="text" placeholder="{{'start_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programIncidentStartDate"/>
+ </div>
+ <div class="container-1-2">
+ <input type="text" placeholder="{{'end_date'| translate}}" class="form-control-select2" d2-date ng-model="enrollment.programIncidentEndDate"/>
+ </div>
</div>
</td>
</tr>