Skip to content

Commit

Permalink
MI | Update Bidan parana register #433
Browse files Browse the repository at this point in the history
  • Loading branch information
mib-iqbal committed Apr 26, 2017
1 parent 376d4d9 commit ace26a8
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 6 deletions.
3 changes: 1 addition & 2 deletions opensrp-app/src/main/java/org/ei/opensrp/AllConstants.java
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ public class AllConstants {
public static final String PROFILE_IMAGES_DOWNLOAD_PATH = "/multimedia/profileimage";
public static final String PROFILE_IMAGES_UPLOAD_PATH = "/multimedia/upload";


public static final String REPORT_CATEGORY = "reportCategory";
public static final String INDICATOR_DETAIL = "indicatorDetail";
public static final String CATEGORY_DESCRIPTION = "categoryDescription";
Expand Down Expand Up @@ -336,7 +335,7 @@ public static class CloudantSync {
public static final String REPLICATION_ERROR = "REPLICATION_ERROR";
public static final String DOCUMENTS_REPLICATED = "DOCUMENTS_REPLICATED";
public static final String BATCHES_REPLICATED = "BATCHES_REPLICATED";
public static final String COUCHDB_PORT = "5984";
public static final String COUCHDB_PORT = "5983";

public static final String COUCH_DATABASE_NAME = "opensrp";
public static final String COUCH_DATABASE_USER = "admin";
Expand Down
2 changes: 1 addition & 1 deletion opensrp-indonesia/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ android {
buildToolsVersion androidBuildToolsVersion

defaultConfig {
applicationId "org.ei.opensrp.indonesia.demo"
applicationId "org.ei.opensrp.indonesia.ec_parana"
minSdkVersion 16
targetSdkVersion 21

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,11 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
viewHolder.wife_age = (TextView) convertView.findViewById(R.id.wife_age);


viewHolder.parana1 = (LinearLayout) convertView.findViewById(R.id.parana1);
viewHolder.parana2 = (LinearLayout) convertView.findViewById(R.id.parana2);
viewHolder.parana3 = (LinearLayout) convertView.findViewById(R.id.parana3);
viewHolder.parana4 = (LinearLayout) convertView.findViewById(R.id.parana4);

viewHolder.mmn_date = (TextView) convertView.findViewById(R.id.lbl_tgl);
viewHolder.txt_total = (TextView) convertView.findViewById(R.id.txt_total);

Expand Down Expand Up @@ -125,7 +130,6 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
AllCommonsRepository kiRepository = org.ei.opensrp.Context.getInstance().allCommonsRepositoryobjects("ibu");

CommonPersonObject kiobject = kiRepository.findByCaseID(pc.entityId());


viewHolder.wife_name.setText(pc.getColumnmaps().get("namalengkap")!=null?pc.getColumnmaps().get("namalengkap"):"");
viewHolder.husband_name.setText(pc.getColumnmaps().get("namaSuami")!=null?pc.getColumnmaps().get("namaSuami"):"");
Expand Down Expand Up @@ -154,8 +158,14 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
Status_parana(pc.getDetails().get("paranaStatus2"),pc.getDetails().get("tanggal_sesi2"),viewHolder.tgl2,viewHolder.sesi2);
Status_parana(pc.getDetails().get("paranaStatus3"),pc.getDetails().get("tanggal_sesi3"),viewHolder.tgl3,viewHolder.sesi3);
Status_parana(pc.getDetails().get("paranaStatus4"),pc.getDetails().get("tanggal_sesi4"),viewHolder.tgl4,viewHolder.sesi4);
String invitation = pc.getDetails().get("date_invitation")!=null?pc.getDetails().get("date_invitation"):"";


viewHolder.parana1.setBackgroundColor(context.getResources().getColor(R.color.status_bar_text_almost_white));
viewHolder.parana2.setBackgroundColor(context.getResources().getColor(R.color.status_bar_text_almost_white));
viewHolder.parana3.setBackgroundColor(context.getResources().getColor(R.color.status_bar_text_almost_white));
viewHolder.parana4.setBackgroundColor(context.getResources().getColor(R.color.status_bar_text_almost_white));

String invitation = pc.getDetails().get("date_invitation")!=null?pc.getDetails().get("date_invitation"):"";
if(StringUtils.isNotBlank(pc.getDetails().get("date_invitation"))) {
String _invitation = invitation;
String _due_invitation = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
>

<LinearLayout
android:id="@+id/parana1"
android:background="@color/status_bar_text_almost_white"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
Expand Down Expand Up @@ -111,6 +112,7 @@
>

<LinearLayout
android:id="@+id/parana2"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="5dp"
Expand Down Expand Up @@ -148,6 +150,7 @@
>

<LinearLayout
android:id="@+id/parana3"
android:background="@color/status_bar_text_almost_white"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
Expand Down Expand Up @@ -187,6 +190,7 @@
>

<LinearLayout
android:id="@+id/parana4"
android:layout_width="fill_parent"
android:layout_height="fill_parent"
android:layout_marginTop="5dp"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,7 @@ public void getView(SmartRegisterClient smartRegisterClient, View convertView) {
date = date.withDayOfMonth(1);
dateNow = dateNow.withDayOfMonth(1);
int days = Days.daysBetween(date,dateNow).getDays();
Log.logInfo("asdasdsadsasadasdasd"+days);
Log.logInfo(""+days);
//int months = Months.monthsBetween(dateNow, date).ge();
if(days < 14) {
if(pc.getDetails().get("paranaStatus1") == null){
Expand Down

0 comments on commit ace26a8

Please sign in to comment.