Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bumps up Dependency versions #367

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions opensrp-giz-malawi/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ android {
buildConfigField "int", "OPENMRS_UNIQUE_ID_BATCH_SIZE", '100'
buildConfigField "int", "OPENMRS_UNIQUE_ID_SOURCE", '2'
buildConfigField "int", "VACCINE_SYNC_TIME", '0'
buildConfigField "int", "DATABASE_VERSION", '12'
buildConfigField "int", "DATABASE_VERSION", '13'
buildConfigField "long", "MAX_SERVER_TIME_DIFFERENCE", "1800000l"
buildConfigField "boolean", "TIME_CHECK", "true"
buildConfigField "int", "DATA_SYNC_DURATION_MINUTES", '15'
Expand Down Expand Up @@ -141,7 +141,7 @@ android {
buildConfigField "int", "OPENMRS_UNIQUE_ID_BATCH_SIZE", '10'
buildConfigField "int", "OPENMRS_UNIQUE_ID_SOURCE", '2'
buildConfigField "int", "VACCINE_SYNC_TIME", '0'
buildConfigField "int", "DATABASE_VERSION", '12'
buildConfigField "int", "DATABASE_VERSION", '13'
buildConfigField "long", "MAX_SERVER_TIME_DIFFERENCE", "1800000l"
buildConfigField "boolean", "TIME_CHECK", "true"
buildConfigField "int", "DATA_SYNC_DURATION_MINUTES", '15'
Expand All @@ -168,7 +168,7 @@ android {
buildConfigField "int", "OPENMRS_UNIQUE_ID_BATCH_SIZE", '100'
buildConfigField "int", "OPENMRS_UNIQUE_ID_SOURCE", '2'
buildConfigField "int", "VACCINE_SYNC_TIME", '0'
buildConfigField "int", "DATABASE_VERSION", '12'
buildConfigField "int", "DATABASE_VERSION", '13'
buildConfigField "long", "MAX_SERVER_TIME_DIFFERENCE", "1800000l"
buildConfigField "boolean", "TIME_CHECK", "true"
buildConfigField "int", "DATA_SYNC_DURATION_MINUTES", '15'
Expand All @@ -191,7 +191,7 @@ android {
buildConfigField "int", "OPENMRS_UNIQUE_ID_BATCH_SIZE", '100'
buildConfigField "int", "OPENMRS_UNIQUE_ID_SOURCE", '2'
buildConfigField "int", "VACCINE_SYNC_TIME", '0'
buildConfigField "int", "DATABASE_VERSION", '12'
buildConfigField "int", "DATABASE_VERSION", '13'
buildConfigField "long", "MAX_SERVER_TIME_DIFFERENCE", "1800000l"
buildConfigField "boolean", "TIME_CHECK", "true"
buildConfigField "int", "DATA_SYNC_DURATION_MINUTES", '15'
Expand Down Expand Up @@ -246,8 +246,7 @@ dependencies {
exclude group: 'org.smartregister', module: 'opensrp-client-configurable-views'
exclude group: 'com.android.support', module: 'appcompat-v7'
}

implementation('org.smartregister:opensrp-client-child:0.5.0-SNAPSHOT@aar') {
implementation('org.smartregister:opensrp-client-child:0.6.9-SNAPSHOT@aar') {
transitive = true
exclude group: 'id.zelory', module: 'compressor'
exclude group: 'org.smartregister', module: 'opensrp-client-core'
Expand Down Expand Up @@ -279,7 +278,7 @@ dependencies {
exclude group: 'io.ona.rdt-capture', module: 'lib'
}

api('org.smartregister:opensrp-client-core:3.3.1-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-core:4.2.13-SNAPSHOT@aar') {
transitive = true
exclude group: 'id.zelory', module: 'compressor'
exclude group: 'com.github.bmelnychuk', module: 'atv'
Expand All @@ -294,7 +293,7 @@ dependencies {
exclude group: 'com.ibm.fhir', module: 'fhir-model'
}

implementation('org.smartregister:opensrp-client-maternity:0.0.7-SNAPSHOT@aar') {
implementation('org.smartregister:opensrp-client-maternity:0.0.8-SNAPSHOT@aar') {
transitive = true
exclude group: 'id.zelory', module: 'compressor'
exclude group: 'org.smartregister', module: 'opensrp-client-core'
Expand All @@ -303,7 +302,7 @@ dependencies {
exclude group: 'com.android.support', module: 'appcompat-v7'
}

api('org.smartregister:opensrp-client-pnc:0.0.5-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-pnc:0.0.6-SNAPSHOT@aar') {
transitive = true
exclude group: 'id.zelory', module: 'compressor'
exclude group: 'org.smartregister', module: 'opensrp-client-core'
Expand All @@ -312,7 +311,7 @@ dependencies {
exclude group: 'com.android.support', module: 'appcompat-v7'
}

api('org.smartregister:opensrp-client-immunization:1.4.43-SNAPSHOT@aar') {
api('org.smartregister:opensrp-client-immunization:3.0.7-SNAPSHOT@aar') {
transitive = true
exclude group: 'id.zelory', module: 'compressor'
exclude group: 'org.smartregister', module: 'opensrp-client-core'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -579,7 +579,7 @@ public ECSyncHelper getEcSyncHelper() {

@VisibleForTesting
protected void fixHardcodedVaccineConfiguration() {
VaccineRepo.Vaccine[] vaccines = ImmunizationLibrary.getInstance().getVaccines();
VaccineRepo.Vaccine[] vaccines = ImmunizationLibrary.getInstance().getVaccines("child");

HashMap<String, VaccineDuplicate> replacementVaccines = new HashMap<>();
replacementVaccines.put("MR 2", new VaccineDuplicate("MR 2", VaccineRepo.Vaccine.mr1, -1, 548, 183, "child"));
Expand All @@ -597,7 +597,7 @@ protected void fixHardcodedVaccineConfiguration() {
}
}

ImmunizationLibrary.getInstance().setVaccines(vaccines);
ImmunizationLibrary.getInstance().setVaccines(vaccines, "child");
}

public DailyTalliesRepository dailyTalliesRepository() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.smartregister.maternity.utils.MaternityConstants;
import org.smartregister.maternity.utils.MaternityDbConstants;

import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collections;
Expand Down Expand Up @@ -130,7 +131,7 @@ public JSONObject populateTransferForm(JSONObject maternityOutComeForm) {
}
}
}
} catch (JSONException e) {
} catch (JSONException | IOException e) {
Timber.e(e);
}
return jsonForm;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,10 @@

import android.view.View;
import android.widget.CompoundButton;
import android.widget.ImageView;
import android.widget.Toast;

import androidx.appcompat.widget.SwitchCompat;
import androidx.appcompat.widget.Toolbar;

import org.smartregister.child.domain.RegisterClickables;
import org.smartregister.child.fragment.BaseChildRegisterFragment;
Expand All @@ -20,7 +20,6 @@
import org.smartregister.giz.presenter.ChildRegisterFragmentPresenter;
import org.smartregister.giz.util.AppExecutors;
import org.smartregister.giz.util.DBQueryHelper;
import org.smartregister.giz.view.NavigationMenu;
import org.smartregister.immunization.job.VaccineSchedulesUpdateJob;
import org.smartregister.view.activity.BaseRegisterActivity;

Expand Down Expand Up @@ -158,13 +157,17 @@ protected void onViewClicked(View view) {
@Override
public void onResume() {
super.onResume();
Toolbar toolbar = view.findViewById(R.id.toolbar);
toolbar.setContentInsetsAbsolute(0, 0);
toolbar.setContentInsetsRelative(0, 0);
toolbar.setContentInsetStartWithNavigation(0);
toolbar.setNavigationIcon(R.drawable.ic_action_menu);

NavigationMenu.getInstance(getActivity(), null, toolbar);
ImageView hamburgerMenu = view.findViewById(R.id.left_menu);
if (hamburgerMenu != null) {
hamburgerMenu.setOnClickListener(new View.OnClickListener() {
@Override
public void onClick(View v) {
if (getActivity() instanceof ChildRegisterActivity) {
((ChildRegisterActivity) getActivity()).openDrawer();
}
}
});
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ public CheckChildDetailsModel invoke() {
this.lostToFollowUp = "";

if (client.has(GizConstants.KEY.CHILD)) {
JSONObject child = GizJsonFormUtils.getJsonObject(client, GizConstants.KEY.CHILD);
JSONObject child = GizJsonFormUtils.getGizJsonObject(client, GizConstants.KEY.CHILD);

// Skip deceased children
if (StringUtils.isNotBlank(GizJsonFormUtils.getJsonString(child, GizConstants.KEY.DEATHDATE))) {
Expand All @@ -105,13 +105,13 @@ public CheckChildDetailsModel invoke() {
}
}

zeirId = GizJsonFormUtils.getJsonString(GizJsonFormUtils.getJsonObject(child, GizConstants.KEY.IDENTIFIERS), ChildJsonFormUtils.ZEIR_ID);
zeirId = GizJsonFormUtils.getJsonString(GizJsonFormUtils.getGizJsonObject(child, GizConstants.KEY.IDENTIFIERS), ChildJsonFormUtils.ZEIR_ID);
if (StringUtils.isNotBlank(zeirId)) {
zeirId = zeirId.replace("-", "");
}

inactive = GizJsonFormUtils.getJsonString(GizJsonFormUtils.getJsonObject(child, GizConstants.KEY.ATTRIBUTES), GizConstants.KEY.INACTIVE);
lostToFollowUp = GizJsonFormUtils.getJsonString(GizJsonFormUtils.getJsonObject(child, GizConstants.KEY.ATTRIBUTES), GizConstants.KEY.LOST_TO_FOLLOW_UP);
inactive = GizJsonFormUtils.getJsonString(GizJsonFormUtils.getGizJsonObject(child, GizConstants.KEY.ATTRIBUTES), GizConstants.KEY.INACTIVE);
lostToFollowUp = GizJsonFormUtils.getJsonString(GizJsonFormUtils.getGizJsonObject(child, GizConstants.KEY.ATTRIBUTES), GizConstants.KEY.LOST_TO_FOLLOW_UP);
}
myResult = false;
return this;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,10 @@ public void onUpgrade(SQLiteDatabase db, int oldVersion, int newVersion) {
case 12:
EventClientRepository.createAdditionalColumns(db);
break;
case 13:
db.execSQL(VaccineRepository.UPDATE_TABLE_ADD_IS_VOIDED_COL);
db.execSQL(VaccineRepository.UPDATE_TABLE_ADD_IS_VOIDED_COL_INDEX);
break;
default:
break;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -186,7 +186,7 @@ public static String getJsonString(JSONObject jsonObject, String field) {
return "";
}

public static JSONObject getJsonObject(JSONObject jsonObject, String field) {
public static JSONObject getGizJsonObject(JSONObject jsonObject, String field) {
try {
if (jsonObject != null && jsonObject.has(field)) {
return jsonObject.getJSONObject(field);
Expand Down
104 changes: 60 additions & 44 deletions opensrp-giz-malawi/src/main/res/layout/tool_bar.xml
Original file line number Diff line number Diff line change
Expand Up @@ -5,49 +5,65 @@
android:layout_height="wrap_content"
xmlns:app="http://schemas.android.com/apk/res-auto">

<androidx.appcompat.widget.Toolbar
android:id="@+id/toolbar"
<RelativeLayout
android:id="@+id/top_left_layout"
android:layout_width="35dp"
android:layout_height="35dp"
android:layout_marginStart="10dp"
android:layout_centerVertical="true">

<!-- These two views here are mandatory in Child & adding them prevents crashes -->
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:visibility="gone"
android:id="@+id/scanQrCode"/>
<ImageView
android:layout_height="0dp"
android:layout_width="0dp"
android:visibility="gone"
android:id="@+id/sync_refresh"/>

<!-- END of useless child views -->

<ImageView
android:id="@+id/left_menu"
android:layout_width="wrap_content"
android:layout_height="match_parent"
android:layout_alignParentBottom="true"
android:layout_margin="3dp"
android:gravity="center"
android:src="@drawable/ic_action_menu" />

</RelativeLayout>

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@color/customAppThemeBlue"
android:minHeight="?attr/actionBarSize"
android:theme="?attr/actionBarTheme"
android:paddingRight="0dp"
android:paddingEnd="0dp"
android:layout_marginRight="0dp"
android:layout_marginEnd="0dp"
tools:layout_editor_absoluteX="-10dp"
tools:layout_editor_absoluteY="2dp">

<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_margin="0dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="@string/title_child"
android:textColor="@color/white"
android:textSize="22sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/register_client"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageButton
android:id="@+id/register_client"
android:layout_width="wrap_content"
android:layout_height="33dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/transparent_gray_background"
android:paddingStart="22dp"
android:src="@drawable/ic_add"
app:layout_constraintRight_toRightOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>

</androidx.appcompat.widget.Toolbar>
android:layout_height="match_parent"
android:layout_margin="0dp">

<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:layout_marginBottom="8dp"
android:text="@string/title_child"
android:textColor="@color/white"
android:textSize="22sp"
app:layout_constraintLeft_toLeftOf="parent"
app:layout_constraintRight_toLeftOf="@id/register_client"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<ImageButton
android:id="@+id/register_client"
android:layout_width="wrap_content"
android:layout_height="33dp"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintTop_toTopOf="parent"
android:background="@drawable/transparent_gray_background"
android:paddingStart="22dp"
android:src="@drawable/ic_add"
app:layout_constraintRight_toRightOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>
</LinearLayout>