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

Lmh multiple fixes #1927

Draft
wants to merge 29 commits into
base: lmh_issue_fixes_vts_2.0
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
678ccc8
add descriptions for report labels
LZRS Sep 30, 2021
ed4625f
make different lmh ui screen for bluetooth sync (#1913)
LZRS Oct 4, 2021
c967abc
remove vaccine from list of administered, if unchecked/invalid (#1910)
LZRS Oct 4, 2021
84941d1
update date theme for each of generated date pickers
LZRS Sep 10, 2021
5342eaa
add tests for date fix
LZRS Sep 21, 2021
9dd595c
remove onclicklistener on title_layout (#1885)
LZRS Oct 4, 2021
575ffb7
move bottom navigation to side menu
LZRS Oct 4, 2021
c8afc0a
Merge remote-tracking branch 'origin/lmh_fix_reports_ui' into lmh-mov…
LZRS Oct 4, 2021
7acf282
change icons for reports and 'add new family'
LZRS Oct 5, 2021
2a9e6f1
reset build.gradle file changes
LZRS Oct 5, 2021
2bf0587
LMH1-103: set fitsSystemsWindows true for p2p page
LZRS Oct 12, 2021
773b7e5
LMH1-12: disable toolbar click for family register
LZRS Oct 12, 2021
a287cb6
LMH1-108: remove 'windowTranslucentStatus' attribute
LZRS Oct 12, 2021
6268b18
LMH1-104: update 'child client' menu title to enable selection
LZRS Oct 13, 2021
58b0693
LMH1-85: hide ID field in family forms
LZRS Oct 13, 2021
b62ec38
LMH1-58: update adding family members to be intuitive
LZRS Oct 18, 2021
180df9b
LMH1-98: fix navigate back to family profile, for child
LZRS Oct 25, 2021
f18a895
LMH1-64: set initial checkbox state to be false
LZRS Oct 25, 2021
a86c3cb
LMH1-73: grey out form next/save when form fields missing
LZRS Oct 27, 2021
5b4020b
LMH1-73: grey out save for family member forms
LZRS Oct 27, 2021
ab1c878
LMH1-61: consistent placement of buttons for forms
LZRS Oct 28, 2021
c1b2c1d
LMH1-111: revert 'hidden=true' for registration forms
LZRS Nov 1, 2021
7484824
Update chw-core to v1.5.25-LMH-Beta-06-SNAPSHOT
LZRS Nov 4, 2021
c118d5d
LMH1-114: Add the text 'years' to child under 11
LZRS Nov 8, 2021
93b92af
LMH1-27: Correct error message when date is missing
LZRS Nov 9, 2021
fa6c0d5
LMH1-116: rename reports menu title to Dashboard
LZRS Nov 10, 2021
dbe1c0d
LMH1-99: add check for pending vaccines when listing due
LZRS Nov 16, 2021
4759633
LMH1-125: Rename 'reports' page title to 'dashboard'
LZRS Nov 19, 2021
c547928
LMH1-101: refactor fix on app closing on double tap
LZRS Nov 19, 2021
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
2 changes: 1 addition & 1 deletion opensrp-chw/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -302,7 +302,7 @@ android {
dependencies {
coreLibraryDesugaring 'com.android.tools:desugar_jdk_libs:1.1.5'

implementation('org.smartregister:opensrp-client-chw-core:1.5.25-LMH-Beta-01-SNAPSHOT@aar') {
implementation('org.smartregister:opensrp-client-chw-core:1.5.25-LMH-Beta-07-SNAPSHOT@aar') {
transitive = true
exclude group: 'com.android.support', module: 'appcompat-v7'
exclude group: 'androidx.legacy', module: 'legacy-support-v4'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ public boolean showChildrenUnder5() {

@Override
public boolean launchChildClientsAtLogin() {
return true;
return false;
}

@Override
Expand Down Expand Up @@ -156,4 +156,58 @@ public boolean showChildrenAboveTwoDueStatus(){
public boolean showIconsForChildrenUnderTwoAndGirlsAgeNineToEleven(){
return true;
}

@Override
public boolean showBottomNavigation() {
return false;
}

@Override
public boolean disableTitleClickGoBack() {
return true;
}

public boolean showReportsDescription() {
return true;
}

@Override
public boolean showReportsDivider() {
return true;
}

@Override
public boolean hideChildRegisterPreviousNextIcons() {
return true;
}

@Override
public boolean hideFamilyRegisterPreviousNextIcons() {
return true;
}

@Override
public boolean showFamilyRegisterNextInToolbar() {
return true;
}

@Override
public boolean onFamilySaveGoToProfile() {
return true;
}

@Override
public boolean onChildProfileHomeGoToChildRegister() {
return false;
}

@Override
public boolean greyOutFormActionsIfInvalid() {
return true;
}

@Override
public boolean checkExtraForDueInFamily() {
return true;
}
}
Original file line number Diff line number Diff line change
@@ -1,6 +1,14 @@
package org.smartregister.chw.custom_view;

import android.app.Activity;
import android.content.DialogInterface;
import android.graphics.Color;
import android.widget.Button;

import androidx.appcompat.app.AlertDialog;

import org.apache.commons.lang3.tuple.Pair;
import org.smartregister.chw.R;

import java.util.Arrays;
import java.util.List;
Expand Down Expand Up @@ -37,4 +45,23 @@ public String childNavigationMenuCountString() {
" and (SELECT is_closed FROM ec_family_member WHERE base_entity_id = ec_child.mother_entity_id ) = 1)) \n" +
" and (((julianday('now') - julianday(ec_child.dob))/365.25) < 2 or (ec_child.gender = 'Female' and (((julianday('now') - julianday(ec_child.dob))/365.25) BETWEEN 9 AND 11)))\n";
}

@Override
public AlertDialog doLogOutDialog(Activity activity) {
AlertDialog dialog = new AlertDialog.Builder(activity)
.setTitle("Log Out?")
.setMessage("You will be returned to the PIN entry screen.")
.create();
dialog.setOnShowListener(dialog1 -> {
Button positiveButton = ((AlertDialog) dialog1)
.getButton(AlertDialog.BUTTON_POSITIVE);
positiveButton.setTextColor(Color.RED);

Button negativeButton = ((AlertDialog) dialog1)
.getButton(AlertDialog.BUTTON_NEGATIVE);
negativeButton.setTextColor(Color.GRAY);
});

return dialog;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@

import android.os.Bundle;
import android.view.View;
import android.widget.DatePicker;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.annotation.VisibleForTesting;

import org.smartregister.chw.anc.contract.BaseAncHomeVisitContract;
import org.smartregister.chw.anc.domain.VaccineDisplay;
Expand Down Expand Up @@ -42,7 +44,17 @@ public static BaseHomeVisitImmunizationFragmentFlv getInstance(final BaseAncHome

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
DatePickerUtils.themeDatePicker(singleDatePicker, new char[]{'d', 'm', 'y'});
callDatePickerUtilsThemeDatePicker(singleDatePicker, new char[]{'d', 'm', 'y'});
super.onViewCreated(view, savedInstanceState);
}

@VisibleForTesting
void callDatePickerUtilsThemeDatePicker(DatePicker datePicker, char[] ymdOrder){
DatePickerUtils.themeDatePicker(datePicker, ymdOrder);
}

@Override
protected void setDatePickerTheme(DatePicker picker) {
callDatePickerUtilsThemeDatePicker(picker, new char[]{'d', 'm', 'y'});
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@

import org.smartregister.chw.R;
import org.smartregister.chw.core.model.NavigationOption;
import org.smartregister.chw.core.utils.CoreConstants;
import org.smartregister.chw.util.Constants;

import java.util.ArrayList;
import java.util.List;

public class NavigationModelFlv extends DefaultNavigationModelFlv {

private List<NavigationOption> navigationOptions = new ArrayList<>();
private final List<NavigationOption> navigationOptions = new ArrayList<>();

@Override
public List<NavigationOption> getNavigationItems() {

if (navigationOptions.size() == 0) {
navigationOptions.add(new NavigationOption(R.mipmap.sidemenu_families, R.mipmap.sidemenu_families_active, R.string.menu_all_families, Constants.DrawerMenu.ALL_FAMILIES, 0));
navigationOptions.add(new NavigationOption(R.mipmap.sidemenu_children, R.mipmap.sidemenu_children_active, R.string.menu_child_clients, Constants.DrawerMenu.CHILD_CLIENTS, 0));
navigationOptions.add(new NavigationOption(R.mipmap.sidemenu_families, R.mipmap.sidemenu_families, R.string.menu_all_families, Constants.DrawerMenu.ALL_FAMILIES, 0));
navigationOptions.add(new NavigationOption(R.drawable.ic_add_new_family_white, R.drawable.ic_add_new_family_white, R.string.menu_add_new_family, Constants.DrawerMenu.ADD_NEW_FAMILY, -1));
navigationOptions.add(new NavigationOption(R.mipmap.sidemenu_children, R.mipmap.sidemenu_children, R.string.menu_child_clients, Constants.DrawerMenu.CHILD_CLIENTS, 0));
navigationOptions.add(new NavigationOption(R.drawable.ic_reports, R.drawable.ic_reports, R.string.reports_dashboard, Constants.DrawerMenu.REPORTS, -1));
}

return navigationOptions;
Expand Down
9 changes: 9 additions & 0 deletions opensrp-chw/src/lmh/res/drawable/ic_add_new_family_white.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M18,13h-5v5c0,0.55 -0.45,1 -1,1s-1,-0.45 -1,-1v-5H6c-0.55,0 -1,-0.45 -1,-1s0.45,-1 1,-1h5V6c0,-0.55 0.45,-1 1,-1s1,0.45 1,1v5h5c0.55,0 1,0.45 1,1s-0.45,1 -1,1z"
android:fillColor="#FFFFFF"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24.0"
android:viewportHeight="24.0">
<path
android:fillColor="#FF757575"
android:pathData="M10,6L8.59,7.41 13.17,12l-4.58,4.59L10,18l6,-6z" />
</vector>
14 changes: 14 additions & 0 deletions opensrp-chw/src/lmh/res/drawable/ic_reports.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="24dp"
android:height="24dp"
android:viewportWidth="24"
android:viewportHeight="24">
<path
android:pathData="M6.5,18C6.1022,18 5.7206,18.158 5.4393,18.4393C5.158,18.7206 5,19.1022 5,19.5C5,20.0523 4.5523,20.5 4,20.5C3.4477,20.5 3,20.0523 3,19.5C3,18.5717 3.3688,17.6815 4.0251,17.0251C4.6815,16.3687 5.5717,16 6.5,16H20C20.5523,16 21,16.4477 21,17C21,17.5523 20.5523,18 20,18H6.5Z"
android:fillColor="#BFBFBF"
android:fillType="evenOdd"/>
<path
android:pathData="M6.5,3C6.1022,3 5.7206,3.158 5.4393,3.4393C5.158,3.7206 5,4.1022 5,4.5V19.5C5,19.8978 5.158,20.2794 5.4393,20.5607C5.7206,20.842 6.1022,21 6.5,21H19V3H6.5ZM6.5,1H20C20.5523,1 21,1.4477 21,2V22C21,22.5523 20.5523,23 20,23H6.5C5.5717,23 4.6815,22.6313 4.0251,21.9749C3.3688,21.3185 3,20.4283 3,19.5V4.5C3,3.5717 3.3688,2.6815 4.0251,2.0251C4.6815,1.3687 5.5717,1 6.5,1Z"
android:fillColor="#BFBFBF"
android:fillType="evenOdd"/>
</vector>
10 changes: 10 additions & 0 deletions opensrp-chw/src/lmh/res/drawable/ic_transfer_data_receive.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="25">
<path
android:pathData="M17.2929,17.0529C17.4804,16.8654 17.7348,16.76 18,16.76C18.2652,16.76 18.5196,16.8654 18.7071,17.0529C18.8946,17.2404 19,17.4948 19,17.76V20.5C19,21.2956 18.6839,22.0587 18.1213,22.6213C17.5587,23.1839 16.7956,23.5 16,23.5H6C5.2043,23.5 4.4413,23.1839 3.8787,22.6213C3.3161,22.0587 3,21.2956 3,20.5V4.5C3,3.7043 3.3161,2.9413 3.8787,2.3787C4.4413,1.8161 5.2043,1.5 6,1.5H16C16.7956,1.5 17.5587,1.8161 18.1213,2.3787C18.6839,2.9413 19,3.7043 19,4.5V4.72V4.93C19,5.1952 18.8946,5.4496 18.7071,5.6371C18.5196,5.8246 18.2652,5.93 18,5.93C17.7348,5.93 17.4804,5.8246 17.2929,5.6371C17.1054,5.4496 17,5.1952 17,4.93V4.5V4.36C16.9983,4.2353 16.9702,4.1124 16.9174,3.9994C16.8646,3.8864 16.7884,3.7859 16.6939,3.7046C16.5993,3.6233 16.4886,3.5629 16.3689,3.5277C16.2493,3.4924 16.1235,3.483 16,3.5H6C5.8765,3.483 5.7507,3.4924 5.6311,3.5277C5.5114,3.5629 5.4007,3.6233 5.3061,3.7046C5.2116,3.7859 5.1354,3.8864 5.0826,3.9994C5.0298,4.1124 5.0017,4.2353 5,4.36V18.12C5.0032,18.2442 5.0324,18.3663 5.0857,18.4786C5.139,18.5908 5.2152,18.6906 5.3094,18.7716C5.4036,18.8527 5.5137,18.913 5.6326,18.9489C5.7516,18.9848 5.8767,18.9954 6,18.98H16C16.1217,18.9953 16.2452,18.9853 16.3628,18.9506C16.4804,18.9159 16.5896,18.8573 16.6835,18.7784C16.7774,18.6996 16.854,18.6021 16.9084,18.4923C16.9629,18.3824 16.9941,18.2625 17,18.14V17.76C17,17.4948 17.1054,17.2404 17.2929,17.0529ZM11.3829,22.1367C11.5037,22.085 11.6119,22.0076 11.7,21.91C11.7976,21.8219 11.875,21.7137 11.9268,21.5929C11.9785,21.4721 12.0035,21.3414 12,21.21C11.9883,20.948 11.8817,20.6992 11.7,20.51C11.5131,20.3268 11.2618,20.2241 11,20.2241C10.7382,20.2241 10.4869,20.3268 10.3,20.51C10.25,20.56 10.225,20.61 10.2,20.66C10.175,20.71 10.15,20.76 10.1,20.81C10.0205,20.9273 9.985,21.069 10,21.21C9.9965,21.3414 10.0215,21.4721 10.0733,21.5929C10.125,21.7137 10.2024,21.8219 10.3,21.91C10.4,22.01 10.5,22.11 10.6,22.11C10.7173,22.1895 10.859,22.225 11,22.21C11.1314,22.2135 11.2621,22.1885 11.3829,22.1367ZM14.1601,10.5H20.0001C20.113,10.4738 20.2304,10.4733 20.3435,10.4988C20.4566,10.5243 20.5625,10.5749 20.6533,10.647C20.7441,10.7191 20.8175,10.8108 20.8679,10.9152C20.9183,11.0196 20.9445,11.1341 20.9445,11.25C20.9445,11.366 20.9183,11.4804 20.8679,11.5848C20.8175,11.6892 20.7441,11.7809 20.6533,11.853C20.5625,11.9251 20.4566,11.9758 20.3435,12.0012C20.2304,12.0267 20.113,12.0263 20.0001,12H14.1501L16.1501,14C16.2274,14.0703 16.2892,14.156 16.3315,14.2516C16.3738,14.3471 16.3956,14.4505 16.3956,14.555C16.3956,14.6595 16.3738,14.7629 16.3315,14.8585C16.2892,14.954 16.2274,15.0397 16.1501,15.11C16.0816,15.1885 15.997,15.2515 15.9022,15.2946C15.8073,15.3377 15.7043,15.36 15.6001,15.36C15.4959,15.36 15.3929,15.3377 15.298,15.2946C15.2032,15.2515 15.1186,15.1885 15.0501,15.11L11.7301,11.79C11.6468,11.7216 11.5901,11.626 11.5701,11.52C11.5098,11.3382 11.5098,11.1418 11.5701,10.96C11.5901,10.854 11.6468,10.7585 11.7301,10.69L15.0601,7.39C15.1286,7.3115 15.2132,7.2486 15.308,7.2055C15.4029,7.1623 15.5059,7.14 15.6101,7.14C15.7143,7.14 15.8173,7.1623 15.9122,7.2055C16.007,7.2486 16.0916,7.3115 16.1601,7.39C16.2374,7.4603 16.2992,7.546 16.3415,7.6416C16.3838,7.7371 16.4056,7.8405 16.4056,7.945C16.4056,8.0495 16.3838,8.1529 16.3415,8.2485C16.2992,8.344 16.2374,8.4297 16.1601,8.5L14.1601,10.5Z"
android:fillColor="#006EB8"
android:fillType="evenOdd"/>
</vector>
10 changes: 10 additions & 0 deletions opensrp-chw/src/lmh/res/drawable/ic_transfer_data_send.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android"
android:width="36dp"
android:height="36dp"
android:viewportWidth="24"
android:viewportHeight="25">
<path
android:pathData="M21,10.55V10.71C21,10.9752 20.8946,11.2296 20.7071,11.4171C20.5196,11.6046 20.2652,11.71 20,11.71C19.7348,11.71 19.4804,11.6046 19.2929,11.4171C19.1054,11.2296 19,10.9752 19,10.71V10.5V9.5H14C13.7348,9.5 13.4804,9.3946 13.2929,9.2071C13.1054,9.0196 13,8.7652 13,8.5V3.5H6C5.7348,3.5 5.4804,3.6054 5.2929,3.7929C5.1054,3.9804 5,4.2348 5,4.5V20.5C5.0088,20.7519 5.1123,20.9912 5.29,21.17C5.3826,21.2645 5.4931,21.3397 5.6149,21.3912C5.7368,21.4427 5.8677,21.4694 6,21.47H18C18.2638,21.4662 18.5154,21.3584 18.7,21.17C18.8813,20.9928 18.9886,20.7533 19,20.5C19,20.2348 19.1054,19.9804 19.2929,19.7929C19.4804,19.6054 19.7348,19.5 20,19.5C20.2652,19.5 20.5196,19.6054 20.7071,19.7929C20.8946,19.9804 21,20.2348 21,20.5V20.7C21.0047,20.7599 21.0047,20.8201 21,20.88C20.907,21.6081 20.5504,22.2769 19.9975,22.7597C19.4447,23.2425 18.734,23.5059 18,23.5H6C5.2043,23.5 4.4413,23.1839 3.8787,22.6213C3.3161,22.0587 3,21.2956 3,20.5V4.5C3,3.7043 3.3161,2.9413 3.8787,2.3787C4.4413,1.8161 5.2043,1.5 6,1.5H14C14.2575,1.501 14.5046,1.6013 14.69,1.78L20.69,7.78C20.7894,7.8762 20.8677,7.992 20.92,8.12C20.9712,8.2402 20.9984,8.3693 21,8.5V10.55ZM15,4.92V7.5H17.58L15,4.92ZM15.9817,19.5914C15.8861,19.5491 15.8004,19.4873 15.7301,19.41C15.6569,19.3407 15.5984,19.2573 15.5581,19.1649C15.5178,19.0725 15.4965,18.9729 15.4956,18.8721C15.4947,18.7713 15.5141,18.6713 15.5526,18.5781C15.5912,18.485 15.6482,18.4006 15.7201,18.33L17.7201,16.33H11.8601C11.7583,16.3327 11.6569,16.3147 11.5622,16.277C11.4676,16.2392 11.3816,16.1826 11.3095,16.1106C11.2375,16.0385 11.1808,15.9525 11.1431,15.8578C11.1054,15.7632 11.0874,15.6618 11.0901,15.56C11.0874,15.4576 11.1054,15.3558 11.143,15.2606C11.1806,15.1654 11.2371,15.0788 11.309,15.006C11.3809,14.9331 11.4668,14.8755 11.5615,14.8367C11.6562,14.7979 11.7578,14.7786 11.8601,14.78H17.7301L15.7301,12.78C15.5829,12.6328 15.5002,12.4331 15.5002,12.225C15.5002,12.0168 15.5829,11.8171 15.7301,11.67C15.8773,11.5228 16.077,11.4401 16.2851,11.4401C16.4933,11.4401 16.6929,11.5228 16.8401,11.67L20.1501,14.99C20.2401,15.0541 20.3012,15.1511 20.3201,15.26C20.3715,15.4397 20.3715,15.6302 20.3201,15.81C20.312,15.8656 20.2927,15.9191 20.2635,15.9672C20.2343,16.0153 20.1958,16.057 20.1501,16.09L16.8401,19.41C16.7698,19.4873 16.6841,19.5491 16.5886,19.5914C16.493,19.6337 16.3896,19.6555 16.2851,19.6555C16.1806,19.6555 16.0772,19.6337 15.9817,19.5914Z"
android:fillColor="#006EB8"
android:fillType="evenOdd"/>
</vector>
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_pressed="true" android:color="@android:color/white"/>
<item android:color="#006EB8"/>
</selector>
Loading