Skip to content

Commit

Permalink
#1524 | Set default value for duration param in indService.recentlyRe…
Browse files Browse the repository at this point in the history
…gisteredV2
  • Loading branch information
himeshr committed Sep 27, 2024
1 parent bf76253 commit a2bc5c5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 9 deletions.
14 changes: 7 additions & 7 deletions packages/openchs-android/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion packages/openchs-android/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
"lodash": "4.17.21",
"moment": "2.29.4",
"native-base": "3.4.9",
"openchs-models": "1.32.13",
"openchs-models": "1.32.15",
"jshashes": "1.0.8",
"prop-types": "15.8.1",
"react": "18.2.0",
Expand Down
5 changes: 4 additions & 1 deletion packages/openchs-android/src/service/IndividualService.js
Original file line number Diff line number Diff line change
Expand Up @@ -169,9 +169,12 @@ class IndividualService extends BaseService {
this.allScheduledVisitsIn = this.allScheduledVisitsIn.bind(this);
this.allOverdueVisitsIn = this.allOverdueVisitsIn.bind(this);
this.recentlyRegistered = this.recentlyRegistered.bind(this);
this.recentlyRegisteredV2 = this.recentlyRegisteredV2.bind(this);
this.recentlyCompletedVisitsIn = this.recentlyCompletedVisitsIn.bind(this);
this.recentlyEnrolled = this.recentlyEnrolled.bind(this);
this.allIn = this.allIn.bind(this);
this.allInV2 = this.allInV2.bind(this);
this.dueChecklists = this.dueChecklists.bind(this);
}

getSchema() {
Expand Down Expand Up @@ -595,7 +598,7 @@ class IndividualService extends BaseService {
return filterSubjects(subjects, subjectCriteria, reportFilters, this.getService(CustomFilterService));
}

recentlyRegisteredV2(date, reportFilters, subjectCriteria, duration) {
recentlyRegisteredV2(date, reportFilters, subjectCriteria, duration = new Duration(1, Duration.Day)) {
const {tillDate, fromDate} = getDateRange(date, duration);

let subjects = this.db.objects(Individual.schema.name)
Expand Down

0 comments on commit a2bc5c5

Please sign in to comment.