diff --git a/gradle/wrapper/gradle-wrapper.properties b/gradle/wrapper/gradle-wrapper.properties index fe3b305eba..c72b9a270c 100644 --- a/gradle/wrapper/gradle-wrapper.properties +++ b/gradle/wrapper/gradle-wrapper.properties @@ -1,6 +1,6 @@ -#Tue Jul 21 15:57:20 EAT 2020 +#Fri Feb 26 21:53:31 EAT 2021 distributionBase=GRADLE_USER_HOME distributionPath=wrapper/dists zipStoreBase=GRADLE_USER_HOME zipStorePath=wrapper/dists -distributionUrl=https\://services.gradle.org/distributions/gradle-6.1.1-all.zip +distributionUrl=https\://services.gradle.org/distributions/gradle-6.5-bin.zip diff --git a/opensrp-chw/build.gradle b/opensrp-chw/build.gradle index e4850407f2..f44facf46e 100644 --- a/opensrp-chw/build.gradle +++ b/opensrp-chw/build.gradle @@ -6,7 +6,7 @@ buildscript { } dependencies { classpath 'org.apache.commons:commons-lang3:3.10' - classpath 'com.android.tools.build:gradle:4.0.2' + classpath 'com.android.tools.build:gradle:4.1.2' classpath 'com.google.gms:google-services:4.3.4' classpath 'com.google.firebase:firebase-crashlytics-gradle:2.4.1' } @@ -191,8 +191,8 @@ android { configurations.all { resolutionStrategy { - force 'androidx.appcompat:appcompat:1.0.2' - force 'com.google.android.material:material:1.0.0' + force 'androidx.appcompat:appcompat:1.2.0' + force 'com.google.android.material:material:1.2.0' } } @@ -320,11 +320,12 @@ android { } dependencies { - implementation('org.smartregister:opensrp-client-chw-core:2.0.23-SNAPSHOT@aar') { + implementation('org.smartregister:opensrp-client-chw-core:2.0.24.1-GS-PREVIEW-SNAPSHOT@aar') { transitive = true exclude group: 'com.android.support', module: 'appcompat-v7' exclude group: 'androidx.legacy', module: 'legacy-support-v4' exclude group: 'androidx.appcompat', module: 'appcompat' + exclude group: 'com.google.android.material', module: 'material' exclude group: 'androidx.constraintlayout', module: 'constraintlayout' exclude group: 'com.google.guava', module: 'guava' exclude group: 'com.rengwuxian.materialedittext', module: 'library' diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/ChildRegisterFragment.java b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/ChildRegisterFragment.java index 75e8208061..9706d89e4c 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/ChildRegisterFragment.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/ChildRegisterFragment.java @@ -10,10 +10,10 @@ import org.smartregister.chw.presenter.ChildRegisterFragmentPresenter; import org.smartregister.chw.provider.ChildRegisterProvider; import org.smartregister.commonregistry.CommonPersonObjectClient; -import org.smartregister.configurableviews.model.View; import org.smartregister.cursoradapter.RecyclerViewPaginatedAdapter; import org.smartregister.family.util.Utils; import org.smartregister.view.activity.BaseRegisterActivity; +import org.smartregister.view.contract.IView; import java.util.Set; @@ -44,7 +44,7 @@ public void goToChildDetailActivity(CommonPersonObjectClient patient, boolean la } @Override - public void initializeAdapter(Set visibleColumns) { + public void initializeAdapter(Set visibleColumns) { ChildRegisterProvider childRegisterProvider = new ChildRegisterProvider(getActivity(), commonRepository(), visibleColumns, registerActionHandler, paginationViewHandler); clientAdapter = new RecyclerViewPaginatedAdapter(null, childRegisterProvider, context().commonrepository(this.tablename)); clientAdapter.setCurrentlimit(20); diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileActivityFragment.java b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileActivityFragment.java index 17f10caeb9..c8bd6ee621 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileActivityFragment.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileActivityFragment.java @@ -14,12 +14,12 @@ import org.smartregister.chw.presenter.FamilyProfileActivityPresenter; import org.smartregister.chw.provider.FamilyActivityRegisterProvider; import org.smartregister.commonregistry.CommonPersonObjectClient; -import org.smartregister.configurableviews.model.View; import org.smartregister.cursoradapter.SmartRegisterQueryBuilder; import org.smartregister.family.adapter.FamilyRecyclerViewCustomAdapter; import org.smartregister.family.fragment.BaseFamilyProfileActivityFragment; import org.smartregister.family.util.Constants; import org.smartregister.family.util.Utils; +import org.smartregister.view.contract.IView; import java.util.HashMap; import java.util.Set; @@ -40,7 +40,7 @@ public static BaseFamilyProfileActivityFragment newInstance(Bundle bundle) { } @Override - public void initializeAdapter(Set visibleColumns) { + public void initializeAdapter(Set visibleColumns) { FamilyActivityRegisterProvider familyActivityRegisterProvider = new FamilyActivityRegisterProvider(getActivity(), commonRepository(), visibleColumns, registerActionHandler, paginationViewHandler); clientAdapter = new FamilyRecyclerViewCustomAdapter(null, familyActivityRegisterProvider, context().commonrepository(this.tablename), Utils.metadata().familyActivityRegister.showPagination); clientAdapter.setCurrentlimit(Utils.metadata().familyActivityRegister.currentLimit); diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileDueFragment.java b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileDueFragment.java index 563f4fc3ca..440978a53e 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileDueFragment.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileDueFragment.java @@ -28,6 +28,7 @@ import org.smartregister.family.util.Utils; import org.smartregister.util.FormUtils; import org.smartregister.util.JsonFormUtils; +import org.smartregister.view.contract.IView; import java.util.HashMap; import java.util.Set; @@ -69,7 +70,7 @@ public void setupViews(View view) { } @Override - public void initializeAdapter(Set visibleColumns) { + public void initializeAdapter(Set visibleColumns) { ChwDueRegisterProvider chwDueRegisterProvider = new ChwDueRegisterProvider(this.getActivity(), this.commonRepository(), visibleColumns, this.registerActionHandler, this.paginationViewHandler); this.clientAdapter = new FamilyRecyclerViewCustomAdapter(null, chwDueRegisterProvider, this.context().commonrepository(this.tablename), Utils.metadata().familyDueRegister.showPagination); this.clientAdapter.setCurrentlimit(Utils.metadata().familyDueRegister.currentLimit); diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileMemberFragment.java b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileMemberFragment.java index 7b817ab5bb..fe53a51304 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileMemberFragment.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyProfileMemberFragment.java @@ -14,6 +14,7 @@ import org.smartregister.cursoradapter.SmartRegisterQueryBuilder; import org.smartregister.family.fragment.BaseFamilyProfileMemberFragment; import org.smartregister.family.util.Constants; +import org.smartregister.view.contract.IView; import java.util.Set; @@ -33,7 +34,7 @@ public static BaseFamilyProfileMemberFragment newInstance(Bundle bundle) { } @Override - public void initializeAdapter(Set visibleColumns, String familyHead, String primaryCaregiver) { + public void initializeAdapter(Set visibleColumns, String familyHead, String primaryCaregiver) { ChwMemberRegisterProvider chwMemberRegisterProvider = new ChwMemberRegisterProvider(this.getActivity(), this.commonRepository(), visibleColumns, this.registerActionHandler, this.paginationViewHandler, familyHead, primaryCaregiver); this.clientAdapter = new RecyclerViewPaginatedAdapter(null, chwMemberRegisterProvider, this.context().commonrepository(this.tablename)); this.clientAdapter.setCurrentlimit(20); diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyRegisterFragment.java b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyRegisterFragment.java index 60c060bde6..9e95aa94b5 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyRegisterFragment.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/FamilyRegisterFragment.java @@ -8,10 +8,10 @@ import org.smartregister.chw.core.provider.CoreRegisterProvider; import org.smartregister.chw.core.utils.CoreConstants; import org.smartregister.chw.provider.FamilyRegisterProvider; -import org.smartregister.chw.util.Utils; import org.smartregister.cursoradapter.RecyclerViewPaginatedAdapter; import org.smartregister.cursoradapter.SmartRegisterQueryBuilder; import org.smartregister.family.util.DBConstants; +import org.smartregister.view.contract.IView; import java.util.Set; @@ -20,7 +20,7 @@ public class FamilyRegisterFragment extends CoreFamilyRegisterFragment { @Override - public void initializeAdapter(Set visibleColumns) { + public void initializeAdapter(Set visibleColumns) { CoreRegisterProvider chwRegisterProvider = new FamilyRegisterProvider(getActivity(), commonRepository(), visibleColumns, registerActionHandler, paginationViewHandler); clientAdapter = new RecyclerViewPaginatedAdapter(null, chwRegisterProvider, context().commonrepository(this.tablename)); clientAdapter.setCurrentlimit(20); diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/ReferralRegisterFragment.java b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/ReferralRegisterFragment.java index acedeb0c88..44c447dba1 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/fragment/ReferralRegisterFragment.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/fragment/ReferralRegisterFragment.java @@ -11,7 +11,6 @@ import androidx.loader.content.Loader; import org.apache.commons.lang3.StringUtils; -import org.jetbrains.annotations.Nullable; import org.smartregister.chw.R; import org.smartregister.chw.activity.MalariaFollowUpVisitActivity; import org.smartregister.chw.anc.util.DBConstants; @@ -30,6 +29,7 @@ import org.smartregister.cursoradapter.RecyclerViewPaginatedAdapter; import org.smartregister.cursoradapter.SmartRegisterQueryBuilder; import org.smartregister.view.activity.BaseRegisterActivity; +import org.smartregister.view.contract.IView; import org.smartregister.view.customcontrols.CustomFontTextView; import java.text.MessageFormat; @@ -47,7 +47,7 @@ public class ReferralRegisterFragment extends BaseReferralRegisterFragment { private boolean dueFilterActive = false; @Override - public void initializeAdapter(@Nullable Set visibleColumns) { + public void initializeAdapter(Set visibleColumns) { ReferralRegisterProvider referralRegisterProvider = new ReferralRegisterProvider(getActivity(), paginationViewHandler, registerActionHandler, visibleColumns); clientAdapter = new RecyclerViewPaginatedAdapter(null, referralRegisterProvider, context().commonrepository(this.tablename)); clientAdapter.setCurrentlimit(20); diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ChwAllClientRegisterPresenter.java b/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ChwAllClientRegisterPresenter.java index f117ba9b3b..a564f7de19 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ChwAllClientRegisterPresenter.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ChwAllClientRegisterPresenter.java @@ -7,6 +7,7 @@ import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.tuple.Triple; +import org.json.JSONException; import org.json.JSONObject; import org.smartregister.chw.core.custom_views.NavigationMenu; import org.smartregister.chw.core.presenter.CoreAllClientsRegisterPresenter; @@ -86,7 +87,7 @@ public void onUniqueIdFetched(Triple triple, String enti } - public void startForm(String formName, String entityId, String metadata, String currentLocationId) throws Exception { + public void startForm(String formName, String entityId, String metadata, String currentLocationId) { if (StringUtils.isBlank(entityId)) { Triple triple = Triple.of(formName, metadata, currentLocationId); @@ -94,7 +95,12 @@ public void startForm(String formName, String entityId, String metadata, String return; } - JSONObject form = model.getFormAsJson(formName, entityId, currentLocationId); + JSONObject form = null; + try { + form = model.getFormAsJson(formName, entityId, currentLocationId); + } catch (JSONException e) { + e.printStackTrace(); + } if (getView() != null) getView().startFormActivity(form); diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ReferralFollowupFragmentPresenter.java b/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ReferralFollowupFragmentPresenter.java index a5232ff5f4..784927f679 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ReferralFollowupFragmentPresenter.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ReferralFollowupFragmentPresenter.java @@ -8,13 +8,14 @@ import org.smartregister.chw.referral.util.DBConstants; import org.smartregister.chw.util.ChwDBConstants; import org.smartregister.chw.util.Constants; +import org.smartregister.view.contract.BaseRegisterFragmentContract; import static org.smartregister.chw.referral.util.Constants.ReferralType; import static org.smartregister.chw.referral.util.Constants.Tables; public class ReferralFollowupFragmentPresenter extends BaseReferralRegisterFragmentPresenter { - public ReferralFollowupFragmentPresenter(BaseReferralRegisterFragmentContract.View view, BaseReferralRegisterFragmentContract.Model model, String viewConfigurationIdentifier) { + public ReferralFollowupFragmentPresenter(BaseRegisterFragmentContract.View view, BaseReferralRegisterFragmentContract.Model model, String viewConfigurationIdentifier) { super(view, model, viewConfigurationIdentifier); } diff --git a/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ReferralRegisterFragmentPresenter.java b/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ReferralRegisterFragmentPresenter.java index 6f572e630f..3d7aafeced 100644 --- a/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ReferralRegisterFragmentPresenter.java +++ b/opensrp-chw/src/main/java/org/smartregister/chw/presenter/ReferralRegisterFragmentPresenter.java @@ -4,6 +4,7 @@ import org.smartregister.chw.R; import org.smartregister.chw.core.utils.ChwDBConstants; import org.smartregister.chw.core.utils.CoreConstants; +import org.smartregister.chw.fragment.ReferralRegisterFragment; import org.smartregister.chw.referral.contract.BaseReferralRegisterFragmentContract; import org.smartregister.chw.referral.presenter.BaseReferralRegisterFragmentPresenter; import org.smartregister.chw.referral.util.DBConstants; @@ -14,7 +15,7 @@ public class ReferralRegisterFragmentPresenter extends BaseReferralRegisterFragmentPresenter { - public ReferralRegisterFragmentPresenter(BaseReferralRegisterFragmentContract.View view, BaseReferralRegisterFragmentContract.Model model, String viewConfigurationIdentifier) { + public ReferralRegisterFragmentPresenter(ReferralRegisterFragment view, BaseReferralRegisterFragmentContract.Model model, String viewConfigurationIdentifier) { super(view, model, viewConfigurationIdentifier); }