Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Fix: Change base URL to the new FineractCN demo instance and fix all the related bugs #107

Open
wants to merge 3 commits into
base: development
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 2 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
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
*/
public class BaseUrl {

public static final String PROTOCOL_HTTPS = "https://";
public static final String API_ENDPOINT = "pilot.kuelap.io";
public static final String PROTOCOL_HTTPS = "http://";
public static final String API_ENDPOINT = "buffalo.mifos.io:4200";
public static final String PORT = "80";
// "/" in the last of the base url always

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -134,16 +134,18 @@ public void showUserInterface() {

public void showPreviousAddress() {
Address address = customer.getAddress();
etStreet.setText(address.getStreet());
etCity.setText(address.getCity());
if (address.getPostalCode() != null) {
etPostalCode.setText(address.getPostalCode());
if (address != null) {
etStreet.setText(address.getStreet());
etCity.setText(address.getCity());
if (address.getPostalCode() != null) {
etPostalCode.setText(address.getPostalCode());
}
etCountry.setText(address.getCountry());
if (address.getRegion() != null) {
etRegion.setText(address.getRegion());
}
}
etCountry.setText(address.getCountry());
showTextInputLayoutError(tilCountry, null);
if (address.getRegion() != null) {
etRegion.setText(address.getRegion());
}
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,16 @@

import android.content.Intent;
import android.os.Bundle;

import androidx.annotation.Nullable;

import com.google.android.material.appbar.AppBarLayout;
import com.google.android.material.appbar.CollapsingToolbarLayout;

import androidx.coordinatorlayout.widget.CoordinatorLayout;
import androidx.appcompat.app.AppCompatActivity;
import androidx.appcompat.widget.Toolbar;

import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
Expand Down Expand Up @@ -246,14 +250,16 @@ public void showCustomerDetails(Customer customer) {

Address address = customer.getAddress();
StringBuilder addressBuilder = new StringBuilder();
addressBuilder
.append(address.getStreet()).append(", ")
.append(address.getCity()).append(", ");
if (address.getPostalCode() != null) {
if (address != null) {
addressBuilder.append(address.getStreet()).append(", ")
.append(address.getCity()).append(", ");

addressBuilder.append(address.getPostalCode());
addressBuilder.append(", ");

addressBuilder.append(address.getCountry());
}
addressBuilder.append(address.getCountry());

tvAddress.setText(addressBuilder);

if (customer.getContactDetails().size() == 0) {
Expand Down
3 changes: 2 additions & 1 deletion app/src/main/java/org/apache/fineract/utils/DateUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ public static String getDate(String dateString, String inputFormat, String outFo
SimpleDateFormat dateFormat = new SimpleDateFormat(inputFormat, Locale.ENGLISH);
Date date = new Date();
try {
date = dateFormat.parse(dateString);
if (dateString != null)
date = dateFormat.parse(dateString);
} catch (ParseException e) {
Log.d(LOG_TAG, e.getLocalizedMessage());
}
Expand Down
8 changes: 3 additions & 5 deletions app/src/main/res/xml/network_security_config.xml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<network-security-config>
<base-config cleartextTrafficPermitted="true">
<trust-anchors>
<certificates src="system" />
</trust-anchors>
</base-config>
<domain-config cleartextTrafficPermitted="true">
<domain includeSubdomains="true">buffalo.mifos.io</domain>
</domain-config>
</network-security-config>