Skip to content

Commit

Permalink
#000 | Merge 6.1 to master
Browse files Browse the repository at this point in the history
  • Loading branch information
himeshr committed Feb 5, 2024
2 parents 25f0b55 + a2cd83c commit 6c23fc4
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 12 deletions.
2 changes: 2 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,8 @@ as_perf: ; $(call _create_config,perf)
as_prod: ; $(call _create_config,prod)
as_prod_dev: ; $(call _create_config,prod_dev)
as_no_env: ; $(call _create_config,no_env)
as_prod_lfe_dev: ; $(call _create_config,prod_lfe_dev)

as_gramin_staging: ; $(call _create_config,gramin_staging)
as_gramin_staging_dev: ; $(call _create_config,gramin_staging_dev)
release_clean: ## If you get dex errors
Expand Down
1 change: 1 addition & 0 deletions makefiles/androidDevice.mk
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ run_app_prerelease_dev: as_prerelease_dev _run_app
run_app_prod: as_prod _run_app
run_app_prod_dev: as_prod_dev _run_app
run_app_no_env: as_no_env _run_app
run_app_prod_lfe_dev: as_prod_lfe_dev _run_app

stop_app:
adb shell am force-stop ${app_android_package_name}
Expand Down
5 changes: 5 additions & 0 deletions packages/openchs-android/config/env/prod_lfe_dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"SERVER_URL": "https://app.lfe.avniproject.org",
"ENV": "ext-dev",
"DISABLE_AUTO_SYNC": true
}
14 changes: 6 additions & 8 deletions packages/openchs-android/src/service/CallService.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ class CallService extends BaseService {
const userSettings = this.getService(UserInfoService).getUserSettings();
const isCallMaskNeeded = _.get(userSettings, "enableCallMasking", false);

if(isCallMaskNeeded) {
if (isCallMaskNeeded) {
this.connectCall(number, maskedCallResponseCb);
}
else {
} else {
immediateCallCb();
}
}
Expand All @@ -33,15 +32,14 @@ class CallService extends BaseService {
.then(({success, message}) => {
if (success) {
maskedCallResponseCb("Requested for masked call. Expect a call on your number.");
}
else {
} else {
maskedCallResponseCb(`Cannot perform masked call at this time. ${message}`);
}
})
.catch(error => {
maskedCallResponseCb("Cannot perform masked call at this time. (Internet connection unavailable/System error)")
}
);
maskedCallResponseCb("Cannot perform masked call at this time. (Internet connection unavailable/System error)")
}
);
}
}

Expand Down
12 changes: 8 additions & 4 deletions packages/openchs-android/src/service/IndividualService.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {
Privilege,
ProgramEncounter,
ProgramEnrolment
} from "avni-models";
} from "openchs-models";
import _ from 'lodash';
import moment from 'moment';
import MediaQueueService from "./MediaQueueService";
Expand All @@ -22,7 +22,7 @@ import PrivilegeService from "./PrivilegeService";
import EntityApprovalStatusService from "./EntityApprovalStatusService";
import GroupSubjectService from "./GroupSubjectService";
import OrganisationConfigService from './OrganisationConfigService';
import {getUnderlyingRealmCollection} from "openchs-models";
import {getUnderlyingRealmCollection, KeyValue} from "openchs-models";
import RealmQueryService from "./query/RealmQueryService";
import {DashboardReportFilter} from "../model/DashboardReportFilters";

Expand Down Expand Up @@ -701,8 +701,12 @@ class IndividualService extends BaseService {
}

findAllWithMobileNumber(mobileNumber) {
return this.getAllNonVoided()
.filter(ind => _.toString(ind.getMobileNumber()).slice(-10) === _.toString(mobileNumber).slice(-10));
const toMatchMobileNumber = _.toString(mobileNumber).slice(-10);
const probableSubjects = this.getAllNonVoided()
.filtered(`(observations.concept.keyValues.key = "${KeyValue.PrimaryContactKey}" or observations.concept.keyValues.key = "${KeyValue.ContactNumberKey}") and (observations.valueJSON CONTAINS "${toMatchMobileNumber}")`);
return probableSubjects.filter((subject) => {
return _.toString(subject.getMobileNumber()).slice(-10) === toMatchMobileNumber;
});
}

getAllBySubjectType(subjectType) {
Expand Down

0 comments on commit 6c23fc4

Please sign in to comment.