diff --git a/app/src/main/java/org/apache/fineract/ui/online/customers/customerpayroll/editcustomerpayroll/EditPayrollAllocationFragment.kt b/app/src/main/java/org/apache/fineract/ui/online/customers/customerpayroll/editcustomerpayroll/EditPayrollAllocationFragment.kt
index 3a034018..8523a735 100644
--- a/app/src/main/java/org/apache/fineract/ui/online/customers/customerpayroll/editcustomerpayroll/EditPayrollAllocationFragment.kt
+++ b/app/src/main/java/org/apache/fineract/ui/online/customers/customerpayroll/editcustomerpayroll/EditPayrollAllocationFragment.kt
@@ -92,6 +92,7 @@ class EditPayrollAllocationFragment : FineractBaseFragment(), Step,
payrollAllocationAdapter.setPayrollAllocations(payrollAllocations)
payrollAllocationAdapter.setOnClickEditDeleteListener(this)
rvPayrollAllocation.adapter = payrollAllocationAdapter
+ showRecyclerView(payrollAllocations.isNotEmpty())
}
override fun onSelected() {
@@ -109,6 +110,7 @@ class EditPayrollAllocationFragment : FineractBaseFragment(), Step,
override fun onClickDelete(payrollAllocation: PayrollAllocation, position: Int) {
payrollAllocations.removeAt(position)
payrollAllocationAdapter.setPayrollAllocations(payrollAllocations)
+ showRecyclerView(payrollAllocations.isNotEmpty())
}
override fun editPayrollAllocation(payrollAllocation: PayrollAllocation, position: Int) {
@@ -120,6 +122,7 @@ class EditPayrollAllocationFragment : FineractBaseFragment(), Step,
override fun addPayrollAllocation(payrollAllocation: PayrollAllocation) {
payrollAllocations.add(payrollAllocation)
payrollAllocationAdapter.setPayrollAllocations(payrollAllocations)
+ showRecyclerView(payrollAllocations.isNotEmpty())
}
override fun verifyStep(): VerificationError? {
@@ -131,4 +134,14 @@ class EditPayrollAllocationFragment : FineractBaseFragment(), Step,
}
+ fun showRecyclerView(isShow: Boolean) {
+ if (isShow) {
+ rvPayrollAllocation.visibility = View.VISIBLE
+ tv_no_payroll.visibility = View.GONE
+ } else {
+ rvPayrollAllocation.visibility = View.GONE
+ tv_no_payroll.visibility = View.VISIBLE
+ }
+ }
+
}
diff --git a/app/src/main/res/layout/fragment_edit_payroll_allocation.xml b/app/src/main/res/layout/fragment_edit_payroll_allocation.xml
index 66b55fa0..23bad4ef 100644
--- a/app/src/main/res/layout/fragment_edit_payroll_allocation.xml
+++ b/app/src/main/res/layout/fragment_edit_payroll_allocation.xml
@@ -11,6 +11,16 @@
android:layout_width="match_parent"
android:layout_height="match_parent" />
+
+
"Updating group status, please wait... "
Error while updating group status
Error while creating group
+ No Payrolls Available. Tap \'+\' at bottom to create new Payroll