diff --git a/app/src/main/java/org/apache/fineract/ui/adapters/IdentificationAdapter.java b/app/src/main/java/org/apache/fineract/ui/adapters/IdentificationAdapter.java
index b4c164ed..dd8a795c 100644
--- a/app/src/main/java/org/apache/fineract/ui/adapters/IdentificationAdapter.java
+++ b/app/src/main/java/org/apache/fineract/ui/adapters/IdentificationAdapter.java
@@ -1,6 +1,7 @@
package org.apache.fineract.ui.adapters;
import android.content.Context;
+
import androidx.recyclerview.widget.RecyclerView;
import android.view.LayoutInflater;
import android.view.View;
@@ -58,6 +59,16 @@ public void onBindViewHolder(ViewHolder holder, int position) {
calendar.set(Calendar.MONTH, identification.getExpirationDate().getMonth() - 1);
calendar.set(Calendar.DAY_OF_MONTH, identification.getExpirationDate().getDay());
holder.tvExpirationDate.setText(DateUtils.convertServerDate(calendar));
+
+ if (calendar.getTime().after(Calendar.getInstance().getTime())) {
+ holder.tvExpiryStatus.setText(context.getResources().getString(R.string.active));
+ holder.tvExpiryStatus.setTextColor(
+ context.getResources().getColor(R.color.deposit_green));
+ } else {
+ holder.tvExpiryStatus.setText(context.getResources().getString(R.string.expired));
+ holder.tvExpiryStatus.setTextColor(
+ context.getResources().getColor(R.color.red_dark));
+ }
}
@Override
@@ -93,6 +104,9 @@ public class ViewHolder extends RecyclerView.ViewHolder implements View.OnClickL
@BindView(R.id.ll_identifier_card)
LinearLayout cvCustomer;
+ @BindView(R.id.tv_expiration_status)
+ TextView tvExpiryStatus;
+
public ViewHolder(View v) {
super(v);
ButterKnife.bind(this, v);
diff --git a/app/src/main/java/org/apache/fineract/ui/online/identification/createidentification/FormIdentificationDetailsFragment.java b/app/src/main/java/org/apache/fineract/ui/online/identification/createidentification/FormIdentificationDetailsFragment.java
index dc705030..a73248cb 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/identification/createidentification/FormIdentificationDetailsFragment.java
+++ b/app/src/main/java/org/apache/fineract/ui/online/identification/createidentification/FormIdentificationDetailsFragment.java
@@ -15,6 +15,7 @@
import android.view.ViewGroup;
import android.widget.DatePicker;
import android.widget.EditText;
+import android.widget.TextView;
import com.stepstone.stepper.Step;
import com.stepstone.stepper.VerificationError;
@@ -60,6 +61,9 @@ public class FormIdentificationDetailsFragment extends FineractBaseFragment impl
@BindView(R.id.et_expiration_date)
EditText etExpirationDate;
+ @BindView(R.id.tv_expiration_status_for_create)
+ TextView tvExpiryStatus;
+
@BindView(R.id.til_issuer)
TextInputLayout tilIssuer;
@@ -153,6 +157,7 @@ private void setDateOfBirth() {
SimpleDateFormat sdf = new SimpleDateFormat(DATE_FORMAT, Locale.ENGLISH);
etExpirationDate.setText(sdf.format(calendar.getTime()));
validateExpirationDate();
+ showExpiryStatus(calendar);
}
@Override
@@ -256,4 +261,14 @@ public void onAttach(Context context) {
+ " must implement OnNavigationBarListener.IdentificationCard");
}
}
+
+ private void showExpiryStatus(Calendar calendar) {
+ if (calendar.getTime().after(Calendar.getInstance().getTime())) {
+ tvExpiryStatus.setText(getResources().getString(R.string.active));
+ tvExpiryStatus.setTextColor(getResources().getColor(R.color.deposit_green));
+ } else {
+ tvExpiryStatus.setText(getResources().getString(R.string.expired));
+ tvExpiryStatus.setTextColor(getResources().getColor(R.color.red_dark));
+ }
+ }
}
diff --git a/app/src/main/java/org/apache/fineract/ui/online/identification/identificationdetails/IdentificationDetailsFragment.java b/app/src/main/java/org/apache/fineract/ui/online/identification/identificationdetails/IdentificationDetailsFragment.java
index cdf21edd..bc8dfdb1 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/identification/identificationdetails/IdentificationDetailsFragment.java
+++ b/app/src/main/java/org/apache/fineract/ui/online/identification/identificationdetails/IdentificationDetailsFragment.java
@@ -68,6 +68,9 @@ public class IdentificationDetailsFragment extends FineractBaseFragment
@BindView(R.id.tv_scans_status)
TextView tvScansStatus;
+ @BindView(R.id.tv_expiration_status_for_details)
+ TextView tvExpiryStatus;
+
@BindView(R.id.rv_scans_uploaded)
RecyclerView rvScansUploaded;
@@ -169,6 +172,7 @@ public void showUserInterface() {
calendar.set(Calendar.MONTH, identificationCard.getExpirationDate().getMonth() - 1);
calendar.set(Calendar.DAY_OF_MONTH, identificationCard.getExpirationDate().getDay());
tvExpirationDate.setText(DateUtils.convertServerDate(calendar));
+ showExpiryStatus(calendar);
}
@Override
@@ -334,4 +338,14 @@ public void onDestroyView() {
hideMifosProgressDialog();
identificationDetailsPresenter.detachView();
}
+
+ private void showExpiryStatus(Calendar calendar) {
+ if (calendar.getTime().after(Calendar.getInstance().getTime())) {
+ tvExpiryStatus.setText(getResources().getString(R.string.active));
+ tvExpiryStatus.setTextColor(getResources().getColor(R.color.deposit_green));
+ } else {
+ tvExpiryStatus.setText(getResources().getString(R.string.expired));
+ tvExpiryStatus.setTextColor(getResources().getColor(R.color.red_dark));
+ }
+ }
}
diff --git a/app/src/main/res/layout/fragment_form_identification_details.xml b/app/src/main/res/layout/fragment_form_identification_details.xml
index a70f6075..45fc5d65 100644
--- a/app/src/main/res/layout/fragment_form_identification_details.xml
+++ b/app/src/main/res/layout/fragment_form_identification_details.xml
@@ -61,23 +61,42 @@
android:layout_width="match_parent"/>
-
+ android:layout_height="wrap_content"
+ android:orientation="horizontal">
-
-
+ android:layout_width="match_parent"
+ app:errorEnabled="true"
+ android:layout_weight="0.5">
+
+
+
+
+
+
-
+
-
+
+
+
+
+
+
തീരുമാനിക്കപ്പെടാത്ത
തടഞ്ഞു
അടച്ചു
+ കാലഹരണപ്പെട്ടു
കുടിയാൻ ഐഡന്റിഫയർ ആവശ്യമാണ്
ഉപയോക്തൃനാമം ആവശ്യമാണ്
പാസ്വേഡ് ആവശ്യമാണ്
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index af22aaa1..b3e7b1c6 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -384,6 +384,9 @@
LOCKED
CLOSED
+
+ Expired
+
1
2