This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| data class UnverifiedData( | |
| val address: String, | |
| val bvn: String, | |
| val bvn_phone_number: Any, | |
| val country_code: String, | |
| val created_at: String, | |
| val date_of_birth: Any, | |
| val devices_code: String, | |
| val email: String, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface SoftKashApiService { | |
| @GET("admins") | |
| fun getAdminsAsync(): Deferred<GetAdminResponse> | |
| @Multipart | |
| @POST("admins") | |
| fun addAdminsAsync( | |
| @Part("first_name") firstName: RequestBody, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SoftKashNetworkDataSourceImpl( | |
| private val softKashApiService: SoftKashApiService | |
| ) : SoftKashNetworkDataSource { | |
| private val _getAllAdmins = MutableLiveData<GetAdminResponse>() | |
| override val getAllAdmins: LiveData<GetAdminResponse> | |
| get() = _getAllAdmins | |
| override suspend fun fetchAllAdmins() { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface SoftKashNetworkDataSource { | |
| val getAllAdmins: LiveData<GetAdminResponse> | |
| suspend fun fetchAllAdmins() | |
| val getAllLoanProducts: LiveData<LoanProductResponse> | |
| suspend fun getLoanProducts() | |
| suspend fun getTransactions(paginate: String, result: (Response<TransactionResponse>) -> Unit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| class SoftKashRepositoryImpl( | |
| private val softKashDao: SoftKashDao, | |
| private val softKashNetworkDataSource: SoftKashNetworkDataSource | |
| ) : SoftKashRepository { | |
| init { | |
| softKashNetworkDataSource.getAllAdmins.observeForever {admins -> | |
| persistAdmins(admins) | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| interface SoftKashRepository { | |
| suspend fun getAllAdmins(): LiveData<out GetAdminResponse> | |
| suspend fun getAllLoanProducts(): LiveData<out LoanProductResponse> | |
| suspend fun getAllTransactions(paginate: String, result: (Response<TransactionResponse>) -> Unit) | |
| suspend fun getAllLoans(paginate: String, result: (Response<LoansResponse>) -> Unit) | |
| suspend fun getUserNextOfKin(userId: Int, result: ( Response<NestOfKinResponse>) -> Unit) | |
| suspend fun getUserEmployerDetail(userId: Int, result: (Response<EmployerResponse>) -> Unit) | |
| suspend fun deleteDocument(id: Int, result: (Response<DocumentDeleteResponse>) -> Unit) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| xmlns:tools="http://schemas.android.com/tools" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| xmlns:app="http://schemas.android.com/apk/res-auto" | |
| tools:context=".ui.verifyBvn.VerifyBVNFragment"> | |
| <androidx.recyclerview.widget.RecyclerView | |
| android:layout_width="match_parent" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?xml version="1.0" encoding="utf-8"?> | |
| <androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android" | |
| android:layout_width="match_parent" | |
| android:layout_height="match_parent" | |
| xmlns:app="http://schemas.android.com/apk/res-auto"> | |
| <com.google.android.material.card.MaterialCardView | |
| android:layout_width="match_parent" | |
| android:layout_height="200dp" | |
| app:layout_constraintEnd_toEndOf="parent" | |
| app:layout_constraintStart_toStartOf="parent" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <resources> | |
| <string name="app_name">SoKashAdmin</string> | |
| <string name="navigation_drawer_open">Open navigation drawer</string> | |
| <string name="navigation_drawer_close">Close navigation drawer</string> | |
| <string name="nav_header_title">Android Studio</string> | |
| <string name="nav_header_subtitle">[email protected]</string> | |
| <string name="nav_header_desc">Navigation header</string> | |
| <string name="action_settings">Settings</string> | |
| <string name="menu_home">Dashboard</string> |