Skip to content

Commit

Permalink
OTC-581: Custom message is now displayed when no policy is active.
Browse files Browse the repository at this point in the history
  • Loading branch information
wzgliniecki committed Jun 15, 2022
1 parent fa6eb4b commit 57448d5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
16 changes: 10 additions & 6 deletions app/src/main/java/org/openimis/imispolicies/Enquire.java
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,16 @@ private void getInsureeInfo() {

}


Policy.put("Heading", jsonObject.getString("productCode"));
Policy.put("Heading1", jsonObject.getString("expiryDate") + " " + jsonObject.getString("status"));
Policy.put("SubItem1", jsonObject.getString("productName"));
Policy.put("SubItem2", Ded);
Policy.put("SubItem3", Ceiling);
if (jsonObject.getString("expiryDate").equals("null")){
Policy.put("Heading", getResources().getString(R.string.EnquireNoPolicies));
}
else{
Policy.put("Heading", jsonObject.getString("productCode"));
Policy.put("Heading1", jsonObject.getString("expiryDate") + " " + jsonObject.getString("status"));
Policy.put("SubItem1", jsonObject.getString("productName"));
Policy.put("SubItem2", Ded);
Policy.put("SubItem3", Ceiling);
}

String TotalAdmissionsLeft = buildEnquireValue(jsonObject, "totalAdmissionsLeft", R.string.totalAdmissionsLeft);
String TotalVisitsLeft = buildEnquireValue(jsonObject, "totalVisitsLeft", R.string.totalVisitsLeft);
Expand Down
1 change: 1 addition & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -459,4 +459,5 @@
<string name="WithoutPolicy">without a policy</string>
<string name="WithoutPremium">without a premium</string>
<string name="HttpResponse">HTTP response: %1$d — %2$s</string>
<string name="EnquireNoPolicies">No policies registered.</string>
</resources>

0 comments on commit 57448d5

Please sign in to comment.