From a2bc5c55cd0e8d5d02cc6a59a55f2b0db842b0b6 Mon Sep 17 00:00:00 2001 From: himeshr Date: Fri, 27 Sep 2024 18:30:29 +0530 Subject: [PATCH] #1524 | Set default value for duration param in indService.recentlyRegisteredV2 --- packages/openchs-android/package-lock.json | 14 +++++++------- packages/openchs-android/package.json | 2 +- .../src/service/IndividualService.js | 5 ++++- 3 files changed, 12 insertions(+), 9 deletions(-) diff --git a/packages/openchs-android/package-lock.json b/packages/openchs-android/package-lock.json index 77c8273cf..4f7b2b56d 100644 --- a/packages/openchs-android/package-lock.json +++ b/packages/openchs-android/package-lock.json @@ -36,7 +36,7 @@ "lodash": "4.17.21", "moment": "2.29.4", "native-base": "3.4.9", - "openchs-models": "1.32.13", + "openchs-models": "1.32.15", "prop-types": "15.8.1", "react": "18.2.0", "react-native": "0.72.8", @@ -16554,9 +16554,9 @@ } }, "node_modules/openchs-models": { - "version": "1.32.13", - "resolved": "https://registry.npmjs.org/openchs-models/-/openchs-models-1.32.13.tgz", - "integrity": "sha512-ulilJ3f0x3rA8EAA1ZA2I9wgxdX4uWDzGT/yonkus/g4OOn9f6aJgiBmGTh+IvQHNNutDB+66d8kKRIGrlWHLQ==", + "version": "1.32.15", + "resolved": "https://registry.npmjs.org/openchs-models/-/openchs-models-1.32.15.tgz", + "integrity": "sha512-cwURGMkdqHODxGb/4KJ427Uv2xFpRKtZnJS6pIwS7uV35gwnM3HaTIawY2GTExtF56cSFeWCBGXtlVZrM9q9Ww==", "dependencies": { "uuid": "^9.0.1" }, @@ -35354,9 +35354,9 @@ } }, "openchs-models": { - "version": "1.32.13", - "resolved": "https://registry.npmjs.org/openchs-models/-/openchs-models-1.32.13.tgz", - "integrity": "sha512-ulilJ3f0x3rA8EAA1ZA2I9wgxdX4uWDzGT/yonkus/g4OOn9f6aJgiBmGTh+IvQHNNutDB+66d8kKRIGrlWHLQ==", + "version": "1.32.15", + "resolved": "https://registry.npmjs.org/openchs-models/-/openchs-models-1.32.15.tgz", + "integrity": "sha512-cwURGMkdqHODxGb/4KJ427Uv2xFpRKtZnJS6pIwS7uV35gwnM3HaTIawY2GTExtF56cSFeWCBGXtlVZrM9q9Ww==", "requires": { "uuid": "^9.0.1" } diff --git a/packages/openchs-android/package.json b/packages/openchs-android/package.json index 1fd4bb335..57691ee69 100644 --- a/packages/openchs-android/package.json +++ b/packages/openchs-android/package.json @@ -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", diff --git a/packages/openchs-android/src/service/IndividualService.js b/packages/openchs-android/src/service/IndividualService.js index fc7f3b25b..0c0b5bd30 100644 --- a/packages/openchs-android/src/service/IndividualService.js +++ b/packages/openchs-android/src/service/IndividualService.js @@ -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() { @@ -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)