diff --git a/app/src/main/AndroidManifest.xml b/app/src/main/AndroidManifest.xml
index d28cf451..7b8bd81d 100644
--- a/app/src/main/AndroidManifest.xml
+++ b/app/src/main/AndroidManifest.xml
@@ -86,6 +86,14 @@
+
+
+
+
+
+
+
+
diff --git a/app/src/main/java/org/apache/fineract/data/models/loan/AccountAssignment.kt b/app/src/main/java/org/apache/fineract/data/models/loan/AccountAssignment.kt
index 4a9e876d..cf62fbcb 100644
--- a/app/src/main/java/org/apache/fineract/data/models/loan/AccountAssignment.kt
+++ b/app/src/main/java/org/apache/fineract/data/models/loan/AccountAssignment.kt
@@ -1,13 +1,16 @@
package org.apache.fineract.data.models.loan
+import android.os.Parcelable
import com.google.gson.annotations.SerializedName
+import kotlinx.android.parcel.Parcelize
/**
* @author Rajan Maurya
* On 09/07/17.
*/
-data class AccountAssignment (
- @SerializedName("designator") var designator: String? = null,
- @SerializedName("accountIdentifier") var accountIdentifier: String? = null,
- @SerializedName("ledgerIdentifier") var ledgerIdentifier: String? = null
-)
\ No newline at end of file
+@Parcelize
+data class AccountAssignment(
+ @SerializedName("designator") var designator: String? = null,
+ @SerializedName("accountIdentifier") var accountIdentifier: String? = null,
+ @SerializedName("ledgerIdentifier") var ledgerIdentifier: String? = null
+) : Parcelable
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/fineract/data/models/loan/TermRange.kt b/app/src/main/java/org/apache/fineract/data/models/loan/TermRange.kt
index 5a472c27..5171fa4a 100644
--- a/app/src/main/java/org/apache/fineract/data/models/loan/TermRange.kt
+++ b/app/src/main/java/org/apache/fineract/data/models/loan/TermRange.kt
@@ -1,12 +1,15 @@
package org.apache.fineract.data.models.loan
+import android.os.Parcelable
import com.google.gson.annotations.SerializedName
+import kotlinx.android.parcel.Parcelize
/**
* @author Rajan Maurya
* On 12/07/17.
*/
+@Parcelize
data class TermRange(
@SerializedName("temporalUnit") var temporalUnit: String?,
@SerializedName("maximum") var maximum: Double?
-)
+) : Parcelable
diff --git a/app/src/main/java/org/apache/fineract/data/models/product/BalanceRange.kt b/app/src/main/java/org/apache/fineract/data/models/product/BalanceRange.kt
index 80c90149..cfd0549f 100644
--- a/app/src/main/java/org/apache/fineract/data/models/product/BalanceRange.kt
+++ b/app/src/main/java/org/apache/fineract/data/models/product/BalanceRange.kt
@@ -1,13 +1,16 @@
package org.apache.fineract.data.models.product
+import android.os.Parcelable
import com.google.gson.annotations.SerializedName
+import kotlinx.android.parcel.Parcelize
/**
* @author Rajan Maurya
* On 20/07/17.
*/
-data class BalanceRange (
- @SerializedName("minimum") var minimum: Double? = null,
- @SerializedName("maximum") var maximum: Double? = null
-)
+@Parcelize
+data class BalanceRange(
+ @SerializedName("minimum") var minimum: Double? = null,
+ @SerializedName("maximum") var maximum: Double? = null
+) : Parcelable
diff --git a/app/src/main/java/org/apache/fineract/data/models/product/InterestRange.kt b/app/src/main/java/org/apache/fineract/data/models/product/InterestRange.kt
index f5882f18..59a070d0 100644
--- a/app/src/main/java/org/apache/fineract/data/models/product/InterestRange.kt
+++ b/app/src/main/java/org/apache/fineract/data/models/product/InterestRange.kt
@@ -1,13 +1,16 @@
package org.apache.fineract.data.models.product
+import android.os.Parcelable
import com.google.gson.annotations.SerializedName
+import kotlinx.android.parcel.Parcelize
/**
* @author Rajan Maurya
* On 20/07/17.
*/
-data class InterestRange (
- @SerializedName("minimum") var minimum: Double? = null,
- @SerializedName("maximum") var maximum: Double? = null
-)
+@Parcelize
+data class InterestRange(
+ @SerializedName("minimum") var minimum: Double? = null,
+ @SerializedName("maximum") var maximum: Double? = null
+) : Parcelable
diff --git a/app/src/main/java/org/apache/fineract/data/models/product/Product.kt b/app/src/main/java/org/apache/fineract/data/models/product/Product.kt
index c1e6431c..80c6596c 100644
--- a/app/src/main/java/org/apache/fineract/data/models/product/Product.kt
+++ b/app/src/main/java/org/apache/fineract/data/models/product/Product.kt
@@ -1,6 +1,8 @@
package org.apache.fineract.data.models.product
+import android.os.Parcelable
import com.google.gson.annotations.SerializedName
+import kotlinx.android.parcel.Parcelize
import org.apache.fineract.data.models.loan.AccountAssignment
import org.apache.fineract.data.models.loan.TermRange
import java.util.ArrayList
@@ -9,23 +11,23 @@ import java.util.ArrayList
* @author Rajan Maurya
* On 20/07/17.
*/
-
-data class Product (
- @SerializedName("identifier") val identifier: String? = null,
- @SerializedName("name") val name: String? = null,
- @SerializedName("termRange") val termRange: TermRange? = null,
- @SerializedName("balanceRange") val balanceRange: BalanceRange? = null,
- @SerializedName("interestRange") val interestRange: InterestRange? = null,
- @SerializedName("interestBasis") val interestBasis: InterestBasis? = null,
- @SerializedName("patternPackage") val patternPackage: String? = null,
- @SerializedName("description") val description: String? = null,
- @SerializedName("currencyCode") val currencyCode: String? = null,
- @SerializedName("minorCurrencyUnitDigits") val minorCurrencyUnitDigits: Int = 0,
- @SerializedName("accountAssignments") val accountAssignments: List =
- ArrayList(),
- @SerializedName("parameters") val parameters: String? = null,
- @SerializedName("createdOn") val createdOn: String? = null,
- @SerializedName("createdBy") val createdBy: String? = null,
- @SerializedName("lastModifiedOn") val lastModifiedOn: String? = null,
- @SerializedName("lastModifiedBy") val lastModifiedBy: String? = null
-)
+@Parcelize
+data class Product(
+ @SerializedName("identifier") val identifier: String? = null,
+ @SerializedName("name") val name: String? = null,
+ @SerializedName("termRange") val termRange: TermRange? = null,
+ @SerializedName("balanceRange") val balanceRange: BalanceRange? = null,
+ @SerializedName("interestRange") val interestRange: InterestRange? = null,
+ @SerializedName("interestBasis") val interestBasis: InterestBasis? = null,
+ @SerializedName("patternPackage") val patternPackage: String? = null,
+ @SerializedName("description") val description: String? = null,
+ @SerializedName("currencyCode") val currencyCode: String? = null,
+ @SerializedName("minorCurrencyUnitDigits") val minorCurrencyUnitDigits: Int = 0,
+ @SerializedName("accountAssignments") val accountAssignments: List =
+ ArrayList(),
+ @SerializedName("parameters") val parameters: String? = null,
+ @SerializedName("createdOn") val createdOn: String? = null,
+ @SerializedName("createdBy") val createdBy: String? = null,
+ @SerializedName("lastModifiedOn") val lastModifiedOn: String? = null,
+ @SerializedName("lastModifiedBy") val lastModifiedBy: String? = null
+) : Parcelable
diff --git a/app/src/main/java/org/apache/fineract/injection/component/ActivityComponent.java b/app/src/main/java/org/apache/fineract/injection/component/ActivityComponent.java
index 6c250f80..4545a3b9 100644
--- a/app/src/main/java/org/apache/fineract/injection/component/ActivityComponent.java
+++ b/app/src/main/java/org/apache/fineract/injection/component/ActivityComponent.java
@@ -4,7 +4,7 @@
import org.apache.fineract.injection.module.ActivityModule;
import org.apache.fineract.ui.offline.CustomerPayloadFragment;
import org.apache.fineract.ui.online.DashboardActivity;
-import org.apache.fineract.ui.online.accounting.accounts.AccountsFragment;
+import org.apache.fineract.ui.online.accounting.accounts.accountList.AccountsFragment;
import org.apache.fineract.ui.online.accounting.ledgers.LedgerFragment;
import org.apache.fineract.ui.online.customers.createcustomer.customeractivity
.CreateCustomerActivity;
@@ -50,8 +50,8 @@
import org.apache.fineract.ui.online.login.LoginActivity;
import org.apache.fineract.ui.online.review.AddLoanReviewFragment;
import org.apache.fineract.ui.online.roles.roleslist.RolesFragment;
-import org.apache.fineract.ui.online.teller.TellerFragment;
-import org.apache.fineract.ui.product.ProductFragment;
+import org.apache.fineract.ui.online.teller.tellerList.TellerFragment;
+import org.apache.fineract.ui.product.productList.ProductFragment;
import dagger.Subcomponent;
diff --git a/app/src/main/java/org/apache/fineract/ui/adapters/AccountsAdapter.kt b/app/src/main/java/org/apache/fineract/ui/adapters/AccountsAdapter.kt
index 6205ad7f..3de52f9f 100644
--- a/app/src/main/java/org/apache/fineract/ui/adapters/AccountsAdapter.kt
+++ b/app/src/main/java/org/apache/fineract/ui/adapters/AccountsAdapter.kt
@@ -6,11 +6,13 @@ import androidx.recyclerview.widget.RecyclerView
import android.view.LayoutInflater
import android.view.View
import android.view.ViewGroup
+import android.widget.AdapterView
import android.widget.TextView
import kotlinx.android.synthetic.main.item_account.view.*
import org.apache.fineract.R
import org.apache.fineract.data.models.accounts.Account
import org.apache.fineract.injection.ApplicationContext
+import org.apache.fineract.ui.base.OnItemClickListener
import org.apache.fineract.utils.DateUtils
import org.apache.fineract.utils.StatusUtils
import javax.inject.Inject
@@ -20,6 +22,8 @@ class AccountsAdapter @Inject constructor(@ApplicationContext val context: Conte
var accounts: List = ArrayList()
+ lateinit var onItemClickListener: OnItemClickListener
+
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_account, parent, false)
@@ -55,12 +59,25 @@ class AccountsAdapter @Inject constructor(@ApplicationContext val context: Conte
notifyDataSetChanged()
}
- class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
+ fun setItemClickListener(onItemClickListener: OnItemClickListener) {
+ this.onItemClickListener = onItemClickListener
+ }
+
+ inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), View.OnClickListener {
val tvIdentifier: TextView = itemView.tv_account_identifier
val tvModifiedBy: TextView = itemView.tv_modified_by
val tvModifiedOn: TextView = itemView.tv_modified_on
val tvName: TextView = itemView.tv_name
val ivAccountTypeIndicator: AppCompatImageView = itemView.iv_type_indicator
+
+ init {
+ itemView.ll_account.setOnClickListener(this)
+ }
+
+ override fun onClick(v: View?) {
+ if (onItemClickListener != null)
+ onItemClickListener.onItemClick(v, adapterPosition)
+ }
}
}
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/fineract/ui/adapters/LedgerAdapter.kt b/app/src/main/java/org/apache/fineract/ui/adapters/LedgerAdapter.kt
index 9f369538..78876f01 100644
--- a/app/src/main/java/org/apache/fineract/ui/adapters/LedgerAdapter.kt
+++ b/app/src/main/java/org/apache/fineract/ui/adapters/LedgerAdapter.kt
@@ -11,6 +11,7 @@ import kotlinx.android.synthetic.main.item_ledger.view.*
import org.apache.fineract.R
import org.apache.fineract.data.models.accounts.Ledger
import org.apache.fineract.injection.ApplicationContext
+import org.apache.fineract.ui.base.OnItemClickListener
import org.apache.fineract.utils.DateUtils
import org.apache.fineract.utils.StatusUtils
import javax.inject.Inject
@@ -19,6 +20,7 @@ class LedgerAdapter @Inject constructor(@ApplicationContext val context: Context
: RecyclerView.Adapter() {
private var ledgers: List = ArrayList()
+ private lateinit var onItemClickListener: OnItemClickListener
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
@@ -54,12 +56,26 @@ class LedgerAdapter @Inject constructor(@ApplicationContext val context: Context
notifyDataSetChanged()
}
- class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
+ fun setItemClickListener(onItemClickListener: OnItemClickListener) {
+ this.onItemClickListener = onItemClickListener
+ }
+
+ inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), View.OnClickListener {
val tvLedgerIdentifier: TextView = itemView.tv_ledger_identifier
val tvModifiedBy: TextView = itemView.tv_modified_by
val tvModifiedOn: TextView = itemView.tv_modified_on
val tvTotalValue: TextView = itemView.tv_total_value
val ivAccountTypeIndicator: AppCompatImageView = itemView.iv_type_indicator
+
+ init {
+ itemView.ll_ledger.setOnClickListener(this)
+ }
+
+ override fun onClick(v: View?) {
+ if (onItemClickListener != null) {
+ onItemClickListener.onItemClick(v, adapterPosition)
+ }
+ }
}
}
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/fineract/ui/adapters/ProductAdapter.kt b/app/src/main/java/org/apache/fineract/ui/adapters/ProductAdapter.kt
index 7f06886f..6c4a9725 100644
--- a/app/src/main/java/org/apache/fineract/ui/adapters/ProductAdapter.kt
+++ b/app/src/main/java/org/apache/fineract/ui/adapters/ProductAdapter.kt
@@ -10,6 +10,7 @@ import kotlinx.android.synthetic.main.item_product.view.*
import org.apache.fineract.R
import org.apache.fineract.data.models.product.Product
import org.apache.fineract.injection.ApplicationContext
+import org.apache.fineract.ui.base.OnItemClickListener
import org.apache.fineract.utils.DateUtils
import javax.inject.Inject
@@ -18,6 +19,8 @@ class ProductAdapter @Inject constructor(@ApplicationContext val context: Contex
private var products: List = ArrayList()
+ lateinit var onItemClickListener: OnItemClickListener
+
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_product, parent, false)
@@ -50,11 +53,24 @@ class ProductAdapter @Inject constructor(@ApplicationContext val context: Contex
notifyDataSetChanged()
}
- class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
+ fun setItemClickListener(onItemClickListener: OnItemClickListener) {
+ this.onItemClickListener = onItemClickListener
+ }
+
+ inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), View.OnClickListener {
val tvProductIdentifier: TextView = itemView.tv_product_identifier
val tvModifiedBy: TextView = itemView.tv_modified_by
val tvModifiedOn: TextView = itemView.tv_modified_on
val tvName: TextView = itemView.tv_name
+
+ init {
+ itemView.ll_loan_accounts.setOnClickListener(this)
+ }
+
+ override fun onClick(v: View?) {
+ if (onItemClickListener != null)
+ onItemClickListener.onItemClick(v, adapterPosition)
+ }
}
}
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/fineract/ui/adapters/TellerAdapter.kt b/app/src/main/java/org/apache/fineract/ui/adapters/TellerAdapter.kt
index bcf86bda..2380623d 100644
--- a/app/src/main/java/org/apache/fineract/ui/adapters/TellerAdapter.kt
+++ b/app/src/main/java/org/apache/fineract/ui/adapters/TellerAdapter.kt
@@ -12,6 +12,7 @@ import kotlinx.android.synthetic.main.item_teller.view.*
import org.apache.fineract.R
import org.apache.fineract.data.models.teller.Teller
import org.apache.fineract.injection.ApplicationContext
+import org.apache.fineract.ui.base.OnItemClickListener
import org.apache.fineract.utils.DateUtils
import org.apache.fineract.utils.StatusUtils
import javax.inject.Inject
@@ -21,6 +22,8 @@ class TellerAdapter @Inject constructor(@ApplicationContext val context: Context
var tellers: List = ArrayList()
+ lateinit var onItemClickListener: OnItemClickListener
+
override fun onCreateViewHolder(parent: ViewGroup, viewType: Int): ViewHolder {
val view = LayoutInflater.from(parent?.context).inflate(R.layout.item_teller,
parent, false)
@@ -56,12 +59,26 @@ class TellerAdapter @Inject constructor(@ApplicationContext val context: Context
notifyDataSetChanged()
}
- class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView) {
+ fun setItemClickListener(onItemClickListener: OnItemClickListener) {
+ this.onItemClickListener = onItemClickListener
+ }
+
+ inner class ViewHolder(itemView: View) : RecyclerView.ViewHolder(itemView), View.OnClickListener {
val tellerIdentifier: TextView = itemView.tv_teller_identifier
val tvModifiedBy: TextView = itemView.tv_modified_by
val tvModifiedOn: TextView = itemView.tv_modified_on
val withDrawLimit: TextView = itemView.tv_cashWithdraw_limit
val statusIndicator: AppCompatImageView = itemView.iv_status_indicator
+
+ init {
+ itemView.ll_loan_accounts.setOnClickListener(this)
+ }
+
+ override fun onClick(v: View?) {
+ if (onItemClickListener != null) {
+ onItemClickListener.onItemClick(v, adapterPosition)
+ }
+ }
}
}
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java b/app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java
index 15b4d61f..f3949ef3 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java
+++ b/app/src/main/java/org/apache/fineract/ui/online/DashboardActivity.java
@@ -25,13 +25,13 @@
import org.apache.fineract.ui.base.Toaster;
import org.apache.fineract.ui.offline.CustomerPayloadFragment;
import org.apache.fineract.ui.online.accounting.ledgers.LedgerFragment;
-import org.apache.fineract.ui.online.accounting.accounts.AccountsFragment;
+import org.apache.fineract.ui.online.accounting.accounts.accountList.AccountsFragment;
import org.apache.fineract.ui.online.customers.customerlist.CustomersFragment;
import org.apache.fineract.ui.online.dashboard.DashboardFragment;
import org.apache.fineract.ui.online.launcher.LauncherActivity;
import org.apache.fineract.ui.online.roles.roleslist.RolesFragment;
-import org.apache.fineract.ui.online.teller.TellerFragment;
-import org.apache.fineract.ui.product.ProductFragment;
+import org.apache.fineract.ui.online.teller.tellerList.TellerFragment;
+import org.apache.fineract.ui.product.productList.ProductFragment;
import org.apache.fineract.utils.MaterialDialog;
import javax.inject.Inject;
diff --git a/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/AccountContract.kt b/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountList/AccountContract.kt
similarity index 89%
rename from app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/AccountContract.kt
rename to app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountList/AccountContract.kt
index 9491718e..b904cea5 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/AccountContract.kt
+++ b/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountList/AccountContract.kt
@@ -1,4 +1,4 @@
-package org.apache.fineract.ui.online.accounting.accounts
+package org.apache.fineract.ui.online.accounting.accounts.accountList
import org.apache.fineract.data.models.accounts.Account
import org.apache.fineract.ui.base.MvpView
diff --git a/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/AccountsFragment.kt b/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountList/AccountsFragment.kt
similarity index 86%
rename from app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/AccountsFragment.kt
rename to app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountList/AccountsFragment.kt
index 67c27d8a..a2b02710 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/AccountsFragment.kt
+++ b/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountList/AccountsFragment.kt
@@ -1,13 +1,15 @@
-package org.apache.fineract.ui.online.accounting.accounts
+package org.apache.fineract.ui.online.accounting.accounts.accountList
import android.app.SearchManager
import android.content.Context
+import android.content.Intent
import android.os.Bundle
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.appcompat.widget.SearchView
import android.text.TextUtils
import android.view.*
+import android.widget.Toast
import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.fragment_accounts.*
import kotlinx.android.synthetic.main.layout_exception_handler.*
@@ -16,11 +18,14 @@ import org.apache.fineract.data.models.accounts.Account
import org.apache.fineract.ui.adapters.AccountsAdapter
import org.apache.fineract.ui.base.FineractBaseActivity
import org.apache.fineract.ui.base.FineractBaseFragment
+import org.apache.fineract.ui.base.OnItemClickListener
+import org.apache.fineract.ui.online.accounting.accounts.accountdetails.AccountDetailActivity
+import org.apache.fineract.utils.ConstantKeys
import java.util.*
import javax.inject.Inject
-class AccountsFragment : FineractBaseFragment(), AccountContract.View, SwipeRefreshLayout.OnRefreshListener {
+class AccountsFragment : FineractBaseFragment(), AccountContract.View, SwipeRefreshLayout.OnRefreshListener, OnItemClickListener {
@Inject
lateinit var accountsPresenter: AccountsPresenter
@@ -28,7 +33,7 @@ class AccountsFragment : FineractBaseFragment(), AccountContract.View, SwipeRefr
@Inject
lateinit var accountsAdapter: AccountsAdapter
- lateinit var accountList : List
+ lateinit var accountList: List
companion object {
fun newInstance() = AccountsFragment()
@@ -37,7 +42,7 @@ class AccountsFragment : FineractBaseFragment(), AccountContract.View, SwipeRefr
override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
setHasOptionsMenu(true)
- accountList= ArrayList()
+ accountList = ArrayList()
}
override fun onCreateView(inflater: LayoutInflater, container: ViewGroup?,
@@ -71,6 +76,7 @@ class AccountsFragment : FineractBaseFragment(), AccountContract.View, SwipeRefr
rvAccount.setHasFixedSize(true)
rvAccount.adapter = accountsAdapter
+ accountsAdapter.setItemClickListener(this)
swipeContainer.setColorSchemeColors(*activity!!
.resources.getIntArray(R.array.swipeRefreshColors))
@@ -159,6 +165,16 @@ class AccountsFragment : FineractBaseFragment(), AccountContract.View, SwipeRefr
showFineractErrorUI(getString(R.string.accounts))
}
+ override fun onItemClick(childView: View?, position: Int) {
+ var intent = Intent(context, AccountDetailActivity::class.java)
+ intent.putExtra(ConstantKeys.ACCOUNT, accountList.get(position))
+ startActivity(intent)
+ }
+
+ override fun onItemLongPress(childView: View?, position: Int) {
+
+ }
+
override fun onDestroyView() {
super.onDestroyView()
accountsPresenter.detachView()
diff --git a/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/AccountsPresenter.kt b/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountList/AccountsPresenter.kt
similarity index 97%
rename from app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/AccountsPresenter.kt
rename to app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountList/AccountsPresenter.kt
index d8e61163..f07aa810 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/AccountsPresenter.kt
+++ b/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountList/AccountsPresenter.kt
@@ -1,4 +1,4 @@
-package org.apache.fineract.ui.online.accounting.accounts
+package org.apache.fineract.ui.online.accounting.accounts.accountList
import android.content.Context
import io.reactivex.Observable
diff --git a/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountdetails/AccountDetailActivity.kt b/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountdetails/AccountDetailActivity.kt
new file mode 100644
index 00000000..997c9bb2
--- /dev/null
+++ b/app/src/main/java/org/apache/fineract/ui/online/accounting/accounts/accountdetails/AccountDetailActivity.kt
@@ -0,0 +1,59 @@
+package org.apache.fineract.ui.online.accounting.accounts.accountdetails
+
+import android.os.Bundle
+import kotlinx.android.synthetic.main.activity_account_detail.*
+import org.apache.fineract.R
+import org.apache.fineract.data.models.accounts.Account
+import org.apache.fineract.ui.base.FineractBaseActivity
+import org.apache.fineract.utils.ConstantKeys
+
+class AccountDetailActivity : FineractBaseActivity() {
+
+ lateinit var account: Account
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_account_detail)
+
+ account = intent.getParcelableExtra(ConstantKeys.ACCOUNT)
+ setToolbarTitle(getString(R.string.account_details))
+ showBackButton()
+ populateUserInterface()
+ }
+
+ private fun populateUserInterface() {
+ tvType.text = account.type.toString()
+ tvIdentifier.text = account.identifier
+ tvName.text = account.name
+ tvLedger.text = account.ledger
+ tvState.text = account.state.toString()
+ tvAlternativeAccountNumber.text = account.alternativeAccountNumber
+ tvBalance.text = "$ ${account.balance}"
+ tvReferenceAmount.text = "$ ${account.referenceAccount}"
+ tvCreateOn.text = account.createdOn
+ tvCreatedBy.text = account.createdBy
+ tvLastModifiedBy.text = account.lastModifiedBy
+ tvLastModifiedOn.text = account.lastModifiedOn
+
+ tvHolders.text = "\n"
+ if (account.holders?.size != 0) {
+ var accountIterator = account.holders?.iterator()
+ while (accountIterator!!.hasNext()) {
+ tvHolders.append("${accountIterator.next()}\n")
+ }
+ } else {
+ tvHolders.append("${getString(R.string.no_holder_found)}\n")
+ }
+
+ tvSignatureAuthorities.text = "\n"
+ if (account.signatureAuthorities?.size != 0) {
+ var signatureAuthoritiesIterator = account.signatureAuthorities?.iterator()
+ while (signatureAuthoritiesIterator!!.hasNext()) {
+ tvSignatureAuthorities.append("${signatureAuthoritiesIterator.next()}\n")
+ }
+ } else {
+ tvSignatureAuthorities.append("${getString(R.string.no_signature_authorities_found)}\n")
+ }
+
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerdetails/LedgerDetailActivity.kt b/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerdetails/LedgerDetailActivity.kt
new file mode 100644
index 00000000..6222e43e
--- /dev/null
+++ b/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerdetails/LedgerDetailActivity.kt
@@ -0,0 +1,46 @@
+package org.apache.fineract.ui.online.accounting.ledgers.ledgerdetails
+
+import android.os.Bundle
+import android.widget.Toast
+import kotlinx.android.synthetic.main.activity_ledger_detail.*
+import org.apache.fineract.R
+import org.apache.fineract.data.models.accounts.Ledger
+import org.apache.fineract.ui.base.FineractBaseActivity
+import org.apache.fineract.utils.ConstantKeys
+
+class LedgerDetailActivity : FineractBaseActivity() {
+
+ lateinit var ledger: Ledger
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_ledger_detail)
+
+ ledger = intent.getParcelableExtra(ConstantKeys.LEDGER)
+ setToolbarTitle(getString(R.string.ledger_details))
+ showBackButton()
+ populateUserInterface()
+ }
+
+ private fun populateUserInterface() {
+ tvType.text = ledger.type.toString()
+ tvIdentifier.text = ledger.identifier
+ tvName.text = ledger.name
+ tvParentLedgerIdentifier.text = ledger.parentLedgerIdentifier
+ tvDescription.text = ledger.description
+ tvTotalValue.text = "$ ${ledger.totalValue}"
+ tvSubLedger.text = "\n"
+ if (ledger.subLedgers!!.size > 0) {
+ var ledgerIterator = ledger.subLedgers?.iterator()
+ while (ledgerIterator!!.hasNext())
+ tvSubLedger.append("${ledgerIterator.next()}\n")
+ } else {
+ tvSubLedger.text = getString(R.string.no_sub_ledger_available)
+ }
+ tvShowAccountInChart.text = ledger.showAccountsInChart.toString()
+ tvCreateOn.text = ledger.createdOn
+ tvCreatedBy.text = ledger.createdBy
+ tvLastModifiedOn.text = ledger.lastModifiedOn
+ tvLastModifiedBy.text = ledger.lastModifiedBy
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/LedgerContract.kt b/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerlist/LedgerContract.kt
similarity index 100%
rename from app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/LedgerContract.kt
rename to app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerlist/LedgerContract.kt
diff --git a/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/LedgerFragment.kt b/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerlist/LedgerFragment.kt
similarity index 88%
rename from app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/LedgerFragment.kt
rename to app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerlist/LedgerFragment.kt
index 75c50be5..6a8888f3 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/LedgerFragment.kt
+++ b/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerlist/LedgerFragment.kt
@@ -3,12 +3,14 @@ package org.apache.fineract.ui.online.accounting.ledgers
import android.app.SearchManager
import android.content.Context
+import android.content.Intent
import android.os.Bundle
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import androidx.recyclerview.widget.LinearLayoutManager
import androidx.appcompat.widget.SearchView
import android.text.TextUtils
import android.view.*
+import android.widget.Toast
import androidx.recyclerview.widget.RecyclerView
import kotlinx.android.synthetic.main.fragment_ledger.*
import kotlinx.android.synthetic.main.layout_exception_handler.*
@@ -17,13 +19,16 @@ import org.apache.fineract.data.models.accounts.Ledger
import org.apache.fineract.ui.adapters.LedgerAdapter
import org.apache.fineract.ui.base.FineractBaseActivity
import org.apache.fineract.ui.base.FineractBaseFragment
+import org.apache.fineract.ui.base.OnItemClickListener
import org.apache.fineract.ui.online.accounting.accounts.LedgerContract
+import org.apache.fineract.ui.online.accounting.ledgers.ledgerdetails.LedgerDetailActivity
+import org.apache.fineract.utils.ConstantKeys
import javax.inject.Inject
import kotlin.collections.ArrayList
class LedgerFragment : FineractBaseFragment(), LedgerContract.View,
- SwipeRefreshLayout.OnRefreshListener {
+ SwipeRefreshLayout.OnRefreshListener, OnItemClickListener {
@Inject
lateinit var ledgerAdapter: LedgerAdapter
@@ -75,6 +80,7 @@ class LedgerFragment : FineractBaseFragment(), LedgerContract.View,
rvLedger.setHasFixedSize(true)
rvLedger.adapter = ledgerAdapter
+ ledgerAdapter.setItemClickListener(this)
swipeContainer.setColorSchemeColors(*activity!!
.resources.getIntArray(R.array.swipeRefreshColors))
@@ -161,6 +167,16 @@ class LedgerFragment : FineractBaseFragment(), LedgerContract.View,
showFineractErrorUI(getString(R.string.ledger))
}
+ override fun onItemClick(childView: View?, position: Int) {
+ var intent = Intent(context, LedgerDetailActivity::class.java)
+ intent.putExtra(ConstantKeys.LEDGER, ledgerList[position])
+ startActivity(intent)
+ }
+
+ override fun onItemLongPress(childView: View?, position: Int) {
+
+ }
+
override fun onDestroyView() {
super.onDestroyView()
ledgerPresenter.detachView()
diff --git a/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/LedgerPresenter.kt b/app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerlist/LedgerPresenter.kt
similarity index 100%
rename from app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/LedgerPresenter.kt
rename to app/src/main/java/org/apache/fineract/ui/online/accounting/ledgers/ledgerlist/LedgerPresenter.kt
diff --git a/app/src/main/java/org/apache/fineract/ui/online/teller/tellerDetails/TellerDetailActivity.kt b/app/src/main/java/org/apache/fineract/ui/online/teller/tellerDetails/TellerDetailActivity.kt
new file mode 100644
index 00000000..dccdf0a6
--- /dev/null
+++ b/app/src/main/java/org/apache/fineract/ui/online/teller/tellerDetails/TellerDetailActivity.kt
@@ -0,0 +1,42 @@
+package org.apache.fineract.ui.online.teller.tellerDetails
+
+import android.os.Bundle
+import kotlinx.android.synthetic.main.activity_teller_detail.*
+import org.apache.fineract.R
+import org.apache.fineract.data.models.teller.Teller
+import org.apache.fineract.ui.base.FineractBaseActivity
+import org.apache.fineract.utils.ConstantKeys
+
+class TellerDetailActivity : FineractBaseActivity() {
+
+ lateinit var teller: Teller
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_teller_detail)
+
+ teller = intent.getParcelableExtra(ConstantKeys.TELLER)
+ setToolbarTitle(getString(R.string.ledger))
+ showBackButton()
+ populateUserInterface()
+ }
+
+ private fun populateUserInterface() {
+ tvTellerAccountIdentifier.text = teller.tellerAccountIdentifier
+ tvVaultAccountIdentifier.text = teller.vaultAccountIdentifier
+ tvState.text = teller.state.toString()
+ tvCode.text = teller.code
+ tvPassword.text = teller.password
+ tvChequesReceivableAccount.text = teller.chequesReceivableAccount
+ tvCashOverShortAccount.text = "$ ${teller.cashdrawLimit.toString()}"
+ tvCashdrawLimit.text = teller.cashOverShortAccount
+ tvAssignedEmployee.text = teller.assignedEmployee
+ tvDenominationRequired.text = teller.denominationRequired.toString()
+ tvCreatedBy.text = teller.createdBy
+ tvCreatedOn.text = teller.createdOn
+ tvLastModifiedBy.text = teller.lastModifiedBy
+ tvLastModifiedOn.text = teller.lastModifiedOn
+ tvLastOpenedBy.text = teller.lastOpenedBy
+ tvLastOpenedOn.text = teller.lastOpenedOn
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/fineract/ui/online/teller/TellerContract.kt b/app/src/main/java/org/apache/fineract/ui/online/teller/tellerList/TellerContract.kt
similarity index 90%
rename from app/src/main/java/org/apache/fineract/ui/online/teller/TellerContract.kt
rename to app/src/main/java/org/apache/fineract/ui/online/teller/tellerList/TellerContract.kt
index a9b204ad..bc814b58 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/teller/TellerContract.kt
+++ b/app/src/main/java/org/apache/fineract/ui/online/teller/tellerList/TellerContract.kt
@@ -1,4 +1,4 @@
-package org.apache.fineract.ui.online.teller
+package org.apache.fineract.ui.online.teller.tellerList
import org.apache.fineract.data.models.teller.Teller
import org.apache.fineract.ui.base.MvpView
diff --git a/app/src/main/java/org/apache/fineract/ui/online/teller/TellerFragment.kt b/app/src/main/java/org/apache/fineract/ui/online/teller/tellerList/TellerFragment.kt
similarity index 88%
rename from app/src/main/java/org/apache/fineract/ui/online/teller/TellerFragment.kt
rename to app/src/main/java/org/apache/fineract/ui/online/teller/tellerList/TellerFragment.kt
index 9a889297..7f90553d 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/teller/TellerFragment.kt
+++ b/app/src/main/java/org/apache/fineract/ui/online/teller/tellerList/TellerFragment.kt
@@ -1,7 +1,8 @@
-package org.apache.fineract.ui.online.teller
+package org.apache.fineract.ui.online.teller.tellerList
import android.app.SearchManager
import android.content.Context
+import android.content.Intent
import android.os.Bundle
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import androidx.recyclerview.widget.LinearLayoutManager
@@ -16,11 +17,14 @@ import org.apache.fineract.data.models.teller.Teller
import org.apache.fineract.ui.adapters.TellerAdapter
import org.apache.fineract.ui.base.FineractBaseActivity
import org.apache.fineract.ui.base.FineractBaseFragment
+import org.apache.fineract.ui.base.OnItemClickListener
+import org.apache.fineract.ui.online.teller.tellerDetails.TellerDetailActivity
+import org.apache.fineract.utils.ConstantKeys
import java.util.*
import javax.inject.Inject
-class TellerFragment : FineractBaseFragment(), TellerContract.View, SwipeRefreshLayout.OnRefreshListener {
+class TellerFragment : FineractBaseFragment(), TellerContract.View, SwipeRefreshLayout.OnRefreshListener, OnItemClickListener {
@Inject
lateinit var tellPresenter: TellerPresenter
@@ -74,6 +78,7 @@ class TellerFragment : FineractBaseFragment(), TellerContract.View, SwipeRefresh
llManager.orientation = RecyclerView.VERTICAL
rvTellers.layoutManager = llManager
rvTellers.setHasFixedSize(true)
+ tellerAdapter.setItemClickListener(this)
rvTellers.adapter = tellerAdapter
swipeContainer.setColorSchemeColors(*activity!!
@@ -161,6 +166,16 @@ class TellerFragment : FineractBaseFragment(), TellerContract.View, SwipeRefresh
showFineractNoInternetUI()
}
+ override fun onItemClick(childView: View?, position: Int) {
+ var intent = Intent(context, TellerDetailActivity::class.java)
+ intent.putExtra(ConstantKeys.TELLER, tellerList.get(position))
+ startActivity(intent)
+ }
+
+ override fun onItemLongPress(childView: View?, position: Int) {
+
+ }
+
override fun onDestroyView() {
super.onDestroyView()
tellPresenter.detachView()
diff --git a/app/src/main/java/org/apache/fineract/ui/online/teller/TellerPresenter.kt b/app/src/main/java/org/apache/fineract/ui/online/teller/tellerList/TellerPresenter.kt
similarity index 97%
rename from app/src/main/java/org/apache/fineract/ui/online/teller/TellerPresenter.kt
rename to app/src/main/java/org/apache/fineract/ui/online/teller/tellerList/TellerPresenter.kt
index a94c351a..ad0df353 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/teller/TellerPresenter.kt
+++ b/app/src/main/java/org/apache/fineract/ui/online/teller/tellerList/TellerPresenter.kt
@@ -1,4 +1,4 @@
-package org.apache.fineract.ui.online.teller
+package org.apache.fineract.ui.online.teller.tellerList
import android.content.Context
import io.reactivex.Observable
diff --git a/app/src/main/java/org/apache/fineract/ui/product/productDetails/ProductDetailActivity.kt b/app/src/main/java/org/apache/fineract/ui/product/productDetails/ProductDetailActivity.kt
new file mode 100644
index 00000000..e50d1708
--- /dev/null
+++ b/app/src/main/java/org/apache/fineract/ui/product/productDetails/ProductDetailActivity.kt
@@ -0,0 +1,42 @@
+package org.apache.fineract.ui.product.productDetails
+
+import android.os.Bundle
+import kotlinx.android.synthetic.main.activity_product_detail.*
+import org.apache.fineract.R
+import org.apache.fineract.data.models.product.Product
+import org.apache.fineract.ui.base.FineractBaseActivity
+import org.apache.fineract.utils.ConstantKeys
+
+class ProductDetailActivity : FineractBaseActivity() {
+
+ lateinit var product: Product
+
+ override fun onCreate(savedInstanceState: Bundle?) {
+ super.onCreate(savedInstanceState)
+ setContentView(R.layout.activity_product_detail)
+
+ product = intent.getParcelableExtra(ConstantKeys.PRODUCT)
+ setToolbarTitle(getString(R.string.account_details))
+ showBackButton()
+ populateUserInterface()
+ }
+
+ private fun populateUserInterface() {
+ nsvProduct.isNestedScrollingEnabled = true
+ tvIdentifier.text = product.identifier
+ tvName.text = product.name
+ tvDescription.text = product.description
+ tvPatternPackage.text = product.patternPackage
+ tvInterestBasic.text = product.interestBasis.toString()
+ tvTermRange.text = "${product.termRange?.maximum} ${product.termRange?.temporalUnit}"
+ tvBalanceRange.text = "${product.balanceRange?.minimum}-${product.balanceRange?.maximum}"
+ tvInterestBasic.text = product.interestBasis.toString()
+ tvMinorCurrencyUnitDigits.text = product.minorCurrencyUnitDigits.toString()
+ tvCurrencyCode.text = product.currencyCode
+ tvParameters.text = product.parameters
+ tvCreatedOn.text = product.createdOn
+ tvCreatedBy.text = product.createdBy
+ tvLastModifiedOn.text = product.lastModifiedOn
+ tvLastModifiedBy.text = product.lastModifiedBy
+ }
+}
\ No newline at end of file
diff --git a/app/src/main/java/org/apache/fineract/ui/product/ProductContract.kt b/app/src/main/java/org/apache/fineract/ui/product/productList/ProductContract.kt
similarity index 91%
rename from app/src/main/java/org/apache/fineract/ui/product/ProductContract.kt
rename to app/src/main/java/org/apache/fineract/ui/product/productList/ProductContract.kt
index 49389456..36bc8d39 100644
--- a/app/src/main/java/org/apache/fineract/ui/product/ProductContract.kt
+++ b/app/src/main/java/org/apache/fineract/ui/product/productList/ProductContract.kt
@@ -1,4 +1,4 @@
-package org.apache.fineract.ui.product
+package org.apache.fineract.ui.product.productList
import org.apache.fineract.data.models.product.Product
import org.apache.fineract.ui.base.MvpView
diff --git a/app/src/main/java/org/apache/fineract/ui/product/ProductFragment.kt b/app/src/main/java/org/apache/fineract/ui/product/productList/ProductFragment.kt
similarity index 88%
rename from app/src/main/java/org/apache/fineract/ui/product/ProductFragment.kt
rename to app/src/main/java/org/apache/fineract/ui/product/productList/ProductFragment.kt
index aa46396c..c3028945 100644
--- a/app/src/main/java/org/apache/fineract/ui/product/ProductFragment.kt
+++ b/app/src/main/java/org/apache/fineract/ui/product/productList/ProductFragment.kt
@@ -1,7 +1,8 @@
-package org.apache.fineract.ui.product
+package org.apache.fineract.ui.product.productList
import android.app.SearchManager
import android.content.Context
+import android.content.Intent
import android.os.Bundle
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout
import androidx.recyclerview.widget.LinearLayoutManager
@@ -16,12 +17,15 @@ import org.apache.fineract.data.models.product.Product
import org.apache.fineract.ui.adapters.ProductAdapter
import org.apache.fineract.ui.base.FineractBaseActivity
import org.apache.fineract.ui.base.FineractBaseFragment
+import org.apache.fineract.ui.base.OnItemClickListener
+import org.apache.fineract.ui.product.productDetails.ProductDetailActivity
+import org.apache.fineract.utils.ConstantKeys
import java.util.*
import javax.inject.Inject
class ProductFragment : FineractBaseFragment(), ProductContract.View,
- SwipeRefreshLayout.OnRefreshListener {
+ SwipeRefreshLayout.OnRefreshListener, OnItemClickListener {
@Inject
lateinit var productPresenter: ProductPresenter
@@ -74,7 +78,9 @@ class ProductFragment : FineractBaseFragment(), ProductContract.View,
layoutManager.orientation = RecyclerView.VERTICAL
rvProduct.layoutManager = layoutManager
rvProduct.setHasFixedSize(true)
+
rvProduct.adapter = productAdapter
+ productAdapter.setItemClickListener(this)
swipeContainer.setColorSchemeColors(*activity!!
.resources.getIntArray(R.array.swipeRefreshColors))
@@ -166,6 +172,16 @@ class ProductFragment : FineractBaseFragment(), ProductContract.View,
showFineractErrorUI(getString(R.string.products))
}
+ override fun onItemClick(childView: View?, position: Int) {
+ var intent = Intent(context, ProductDetailActivity::class.java)
+ intent.putExtra(ConstantKeys.PRODUCT, productList.get(position))
+ startActivity(intent)
+ }
+
+ override fun onItemLongPress(childView: View?, position: Int) {
+
+ }
+
override fun onDestroyView() {
super.onDestroyView()
productPresenter.detachView()
diff --git a/app/src/main/java/org/apache/fineract/ui/product/ProductPresenter.kt b/app/src/main/java/org/apache/fineract/ui/product/productList/ProductPresenter.kt
similarity index 98%
rename from app/src/main/java/org/apache/fineract/ui/product/ProductPresenter.kt
rename to app/src/main/java/org/apache/fineract/ui/product/productList/ProductPresenter.kt
index 26849157..5baadf94 100644
--- a/app/src/main/java/org/apache/fineract/ui/product/ProductPresenter.kt
+++ b/app/src/main/java/org/apache/fineract/ui/product/productList/ProductPresenter.kt
@@ -1,4 +1,4 @@
-package org.apache.fineract.ui.product
+package org.apache.fineract.ui.product.productList
import android.content.Context
import io.reactivex.Observable
diff --git a/app/src/main/java/org/apache/fineract/utils/ConstantKeys.java b/app/src/main/java/org/apache/fineract/utils/ConstantKeys.java
index 028076b8..838612ca 100644
--- a/app/src/main/java/org/apache/fineract/utils/ConstantKeys.java
+++ b/app/src/main/java/org/apache/fineract/utils/ConstantKeys.java
@@ -2,11 +2,11 @@
/**
* @author Rajan Maurya
- * On 27/06/17.
+ * On 27/06/17.
*/
public class ConstantKeys {
- public static final String CUSTOMER_IDENTIFIER = "customer_identifier";
+ public static final String CUSTOMER_IDENTIFIER = "customer_identifier";
public static final String CUSTOMER_STATUS = "customer_status";
public static final String IS_NEW_CUSTOMER = "is_new_customer";
public static final String CUSTOMER_ACTION = "customer_action";
@@ -40,4 +40,8 @@ public class ConstantKeys {
public static final int PERMISSION_REQUEST_READ_EXTERNAL_STORAGE = 3;
public static final String PERMISSIONS_READ_EXTERNAL_STORAGE_STATUS = "read_status";
+ public static final String ACCOUNT = "account";
+ public static final String LEDGER = "ledger";
+ public static final String TELLER = "teller";
+ public static final String PRODUCT = "product";
}
diff --git a/app/src/main/res/layout/activity_account_detail.xml b/app/src/main/res/layout/activity_account_detail.xml
new file mode 100644
index 00000000..f6f94f65
--- /dev/null
+++ b/app/src/main/res/layout/activity_account_detail.xml
@@ -0,0 +1,347 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_ledger_detail.xml b/app/src/main/res/layout/activity_ledger_detail.xml
new file mode 100644
index 00000000..ecc09091
--- /dev/null
+++ b/app/src/main/res/layout/activity_ledger_detail.xml
@@ -0,0 +1,290 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_product_detail.xml b/app/src/main/res/layout/activity_product_detail.xml
new file mode 100644
index 00000000..f32c022e
--- /dev/null
+++ b/app/src/main/res/layout/activity_product_detail.xml
@@ -0,0 +1,331 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/layout/activity_teller_detail.xml b/app/src/main/res/layout/activity_teller_detail.xml
new file mode 100644
index 00000000..d4ac7f30
--- /dev/null
+++ b/app/src/main/res/layout/activity_teller_detail.xml
@@ -0,0 +1,369 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/app/src/main/res/values/dimens.xml b/app/src/main/res/values/dimens.xml
index 78fa8ad2..78c1f843 100644
--- a/app/src/main/res/values/dimens.xml
+++ b/app/src/main/res/values/dimens.xml
@@ -38,6 +38,8 @@
180dp
8dp
+ 16dp
+ 8dp
225dp
256dp
diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml
index 8744d5d9..f202cf6d 100644
--- a/app/src/main/res/values/strings.xml
+++ b/app/src/main/res/values/strings.xml
@@ -199,6 +199,14 @@
Logout
Manage roles
Tellers
+ Teller Account Identifier
+ Vault Account Identifier
+ Cheques Receivable Account
+ Cash overshort Account
+ Cash Drawlimit
+ Denomination Required
+ Last Opened By
+ Last Opened On
Try Again
Retry
Oh no!
@@ -210,6 +218,30 @@
Identification card scan
Role
%1$s %2$s
+ State
+ Reference Amount
+ Alternative Account Number
+ Holders
+ Signature Authorities
+ Account Details
+ No Holder Found
+ No Signature Authorities Found
+ Parent Ledger Identifier
+ Total Value
+ Sub Ledger
+ Show Account in Chart
+ Ledger Details
+ No Sub-ledger available
+ Code
+ Pattern Package
+ Interest Basic
+ Term Range
+ Balance Range
+ Minor Currency Unit Digits
+ Currency Code
+ Parameters
+ Designator
+ Ledger Identifier
Account*
diff --git a/app/src/main/resources/productPage.json b/app/src/main/resources/productPage.json
index 6010b898..b56aba0a 100644
--- a/app/src/main/resources/productPage.json
+++ b/app/src/main/resources/productPage.json
@@ -25,6 +25,11 @@
"designator": "designator",
"accountIdentifier": "accountIdentifier",
"ledgerIdentifier": "ledgerIdentifier"
+ },
+ {
+ "designator": "designator2",
+ "accountIdentifier": "accountIdentifier2",
+ "ledgerIdentifier": "ledgerIdentifier2"
}
],
"parameters": "parameters",
diff --git a/app/src/test/java/org/apache/fineract/online/AccountPresenterTest.kt b/app/src/test/java/org/apache/fineract/online/AccountPresenterTest.kt
index 96cddcfc..f3dd57de 100644
--- a/app/src/test/java/org/apache/fineract/online/AccountPresenterTest.kt
+++ b/app/src/test/java/org/apache/fineract/online/AccountPresenterTest.kt
@@ -6,11 +6,10 @@ import org.apache.fineract.FakeRemoteDataSource
import org.apache.fineract.data.datamanager.DataManagerAccounting
import org.apache.fineract.data.models.accounts.AccountPage
import org.apache.fineract.exceptions.NoConnectivityException
-import org.apache.fineract.ui.online.accounting.accounts.AccountContract
-import org.apache.fineract.ui.online.accounting.accounts.AccountsPresenter
+import org.apache.fineract.ui.online.accounting.accounts.accountList.AccountContract
+import org.apache.fineract.ui.online.accounting.accounts.accountList.AccountsPresenter
import org.apache.fineract.util.RxSchedulersOverrideRule
import org.junit.After
-import org.junit.Assert.assertEquals
import org.junit.Before
import org.junit.Rule
import org.junit.Test