Skip to content

Commit

Permalink
Fixes #2024 : MVP to MVVM Migration (#2031)
Browse files Browse the repository at this point in the history
* loan details mvp to mvvm

* datatable mvp to mvvm
  • Loading branch information
Aditya-gupta99 authored Aug 11, 2023
1 parent 3b319d3 commit f6538a8
Show file tree
Hide file tree
Showing 87 changed files with 2,554 additions and 1,560 deletions.
2 changes: 1 addition & 1 deletion mifosng-android/src/main/java/com/mifos/api/BaseUrl.kt
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ class BaseUrl {
// "/" in the last of the base url always
companion object {
const val PROTOCOL_HTTPS = "https://"
const val API_ENDPOINT = "demo.mifos.community"
const val API_ENDPOINT = "dev.mifos.io"
const val API_PATH = "/fineract-provider/api/v1/"
const val PORT = "80"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ import com.mifos.api.datamanager.DataManagerAuth
import com.mifos.api.datamanager.DataManagerCenter
import com.mifos.api.datamanager.DataManagerCharge
import com.mifos.api.datamanager.DataManagerClient
import com.mifos.api.datamanager.DataManagerCollectionSheet
import com.mifos.api.datamanager.DataManagerDataTable
import com.mifos.api.datamanager.DataManagerDocument
import com.mifos.api.datamanager.DataManagerGroups
import com.mifos.api.datamanager.DataManagerLoan
import com.mifos.api.datamanager.DataManagerNote
import com.mifos.api.datamanager.DataManagerOffices
import com.mifos.api.datamanager.DataManagerRunReport
import com.mifos.api.datamanager.DataManagerSavings
import com.mifos.api.datamanager.DataManagerSearch
import com.mifos.api.datamanager.DataManagerStaff
import com.mifos.api.datamanager.DataManagerSurveys
import com.mifos.repositories.ActivateRepository
import com.mifos.repositories.ActivateRepositoryImp
Expand All @@ -28,6 +31,18 @@ import com.mifos.repositories.ClientIdentifiersRepository
import com.mifos.repositories.ClientIdentifiersRepositoryImp
import com.mifos.repositories.ClientListRepository
import com.mifos.repositories.ClientListRepositoryImp
import com.mifos.repositories.CollectionSheetRepository
import com.mifos.repositories.CollectionSheetRepositoryImp
import com.mifos.repositories.CreateNewCenterRepository
import com.mifos.repositories.CreateNewCenterRepositoryImp
import com.mifos.repositories.CreateNewClientRepository
import com.mifos.repositories.CreateNewClientRepositoryImp
import com.mifos.repositories.CreateNewGroupRepository
import com.mifos.repositories.CreateNewGroupRepositoryImp
import com.mifos.repositories.DataTableDataRepository
import com.mifos.repositories.DataTableDataRepositoryImp
import com.mifos.repositories.DataTableListRepository
import com.mifos.repositories.DataTableListRepositoryImp
import com.mifos.repositories.DataTableRepository
import com.mifos.repositories.DataTableRepositoryImp
import com.mifos.repositories.DocumentListRepository
Expand All @@ -38,12 +53,24 @@ import com.mifos.repositories.GroupListRepository
import com.mifos.repositories.GroupListRepositoryImp
import com.mifos.repositories.GroupsListRepository
import com.mifos.repositories.GroupsListRepositoryImp
import com.mifos.repositories.IndividualCollectionSheetDetailsRepository
import com.mifos.repositories.IndividualCollectionSheetDetailsRepositoryImp
import com.mifos.repositories.LoanAccountApprovalRepository
import com.mifos.repositories.LoanAccountApprovalRepositoryImp
import com.mifos.repositories.LoanAccountDisbursementRepository
import com.mifos.repositories.LoanAccountDisbursementRepositoryImp
import com.mifos.repositories.LoanAccountRepository
import com.mifos.repositories.LoanAccountRepositoryImp
import com.mifos.repositories.LoanAccountSummaryRepository
import com.mifos.repositories.LoanAccountSummaryRepositoryImp
import com.mifos.repositories.LoanChargeRepository
import com.mifos.repositories.LoanChargeRepositoryImp
import com.mifos.repositories.LoanRepaymentRepository
import com.mifos.repositories.LoanRepaymentRepositoryImp
import com.mifos.repositories.LoginRepository
import com.mifos.repositories.LoginRepositoryImp
import com.mifos.repositories.NewIndividualCollectionSheetRepository
import com.mifos.repositories.NewIndividualCollectionSheetRepositoryImp
import com.mifos.repositories.NoteRepository
import com.mifos.repositories.NoteRepositoryImp
import com.mifos.repositories.PathTrackingRepository
Expand All @@ -60,7 +87,6 @@ import com.mifos.repositories.SignatureRepository
import com.mifos.repositories.SignatureRepositoryImp
import com.mifos.repositories.SurveyListRepository
import com.mifos.repositories.SurveyListRepositoryImp
import com.mifos.services.data.LoansPayload
import dagger.Module
import dagger.Provides
import dagger.hilt.InstallIn
Expand Down Expand Up @@ -106,8 +132,7 @@ class RepositoryModule {

@Provides
fun providesCenterDetailsRepository(
dataManagerCenter: DataManagerCenter,
dataManagerRunReport: DataManagerRunReport
dataManagerCenter: DataManagerCenter, dataManagerRunReport: DataManagerRunReport
): CenterDetailsRepository {
return CenterDetailsRepositoryImp(dataManagerCenter, dataManagerRunReport)
}
Expand All @@ -127,72 +152,144 @@ class RepositoryModule {
}

@Provides
fun providesClientListRepository(dataManagerClient: DataManagerClient) : ClientListRepository {
fun providesClientListRepository(dataManagerClient: DataManagerClient): ClientListRepository {
return ClientListRepositoryImp(dataManagerClient)
}

@Provides
fun providesGroupsListRepository(dataManagerGroups: DataManagerGroups) : GroupsListRepository {
fun providesGroupsListRepository(dataManagerGroups: DataManagerGroups): GroupsListRepository {
return GroupsListRepositoryImp(dataManagerGroups)
}

@Provides
fun providesClientChargeRepository(dataManagerCharge: DataManagerCharge) : ClientChargeRepository {
fun providesClientChargeRepository(dataManagerCharge: DataManagerCharge): ClientChargeRepository {
return ClientChargeRepositoryImp(dataManagerCharge)
}

@Provides
fun providesLoanAccountSummary(dataManagerLoan: DataManagerLoan) : LoanAccountSummaryRepository {
fun providesLoanAccountSummary(dataManagerLoan: DataManagerLoan): LoanAccountSummaryRepository {
return LoanAccountSummaryRepositoryImp(dataManagerLoan)
}

@Provides
fun providesSavingsAccountSummaryRepository(dataManagerSavings: DataManagerSavings) : SavingsAccountSummaryRepository {
fun providesSavingsAccountSummaryRepository(dataManagerSavings: DataManagerSavings): SavingsAccountSummaryRepository {
return SavingsAccountSummaryRepositoryImp(dataManagerSavings)
}

@Provides
fun providesDataTableRepository(dataManagerDataTable: DataManagerDataTable) : DataTableRepository {
fun providesDataTableRepository(dataManagerDataTable: DataManagerDataTable): DataTableRepository {
return DataTableRepositoryImp(dataManagerDataTable)
}

@Provides
fun providesPinPointClientRepository(dataManagerClient: DataManagerClient) : PinPointClientRepository {
fun providesPinPointClientRepository(dataManagerClient: DataManagerClient): PinPointClientRepository {
return PinPointClientRepositoryImp(dataManagerClient)
}

@Provides
fun providesDocumentListRepository(dataManagerDocument: DataManagerDocument) : DocumentListRepository {
fun providesDocumentListRepository(dataManagerDocument: DataManagerDocument): DocumentListRepository {
return DocumentListRepositoryImp(dataManagerDocument)
}

@Provides
fun providesNoteRepository(dataManagerNote: DataManagerNote) : NoteRepository{
fun providesNoteRepository(dataManagerNote: DataManagerNote): NoteRepository {
return NoteRepositoryImp(dataManagerNote)
}

@Provides
fun providesSavingAccountRepository(dataManagerSavings: DataManagerSavings) : SavingsAccountRepository {
fun providesSavingAccountRepository(dataManagerSavings: DataManagerSavings): SavingsAccountRepository {
return SavingsAccountRepositoryImp(dataManagerSavings)
}

@Provides
fun providesLoanAccountRepository(dataManagerLoan: DataManagerLoan) : LoanAccountRepository {
fun providesLoanAccountRepository(dataManagerLoan: DataManagerLoan): LoanAccountRepository {
return LoanAccountRepositoryImp(dataManagerLoan)
}

@Provides
fun providesSignatureRepository(dataManagerDocument: DataManagerDocument) : SignatureRepository {
fun providesSignatureRepository(dataManagerDocument: DataManagerDocument): SignatureRepository {
return SignatureRepositoryImp(dataManagerDocument)
}

@Provides
fun providesClientIdentifiersRepository(dataManagerClient: DataManagerClient) : ClientIdentifiersRepository {
fun providesClientIdentifiersRepository(dataManagerClient: DataManagerClient): ClientIdentifiersRepository {
return ClientIdentifiersRepositoryImp(dataManagerClient)
}

@Provides
fun providesSurveyListRepository(dataManagerSurveys: DataManagerSurveys) : SurveyListRepository {
fun providesSurveyListRepository(dataManagerSurveys: DataManagerSurveys): SurveyListRepository {
return SurveyListRepositoryImp(dataManagerSurveys)
}

@Provides
fun providesLoanChargeRepository(dataManager: DataManager): LoanChargeRepository {
return LoanChargeRepositoryImp(dataManager)
}

@Provides
fun providesLoanAccountApprovalRepository(dataManager: DataManager): LoanAccountApprovalRepository {
return LoanAccountApprovalRepositoryImp(dataManager)
}

@Provides
fun providesLoanAccountDisbursementRepository(dataManagerLoan: DataManagerLoan): LoanAccountDisbursementRepository {
return LoanAccountDisbursementRepositoryImp(dataManagerLoan)
}

@Provides
fun providesLoanRepaymentRepository(dataManagerLoan: DataManagerLoan): LoanRepaymentRepository {
return LoanRepaymentRepositoryImp(dataManagerLoan)
}

@Provides
fun providesCollectionSheetRepository(dataManager: DataManager): CollectionSheetRepository {
return CollectionSheetRepositoryImp(dataManager)
}

@Provides
fun providesNewIndividualCollectionSheetRepository(
dataManager: DataManager, dataManagerCollection: DataManagerCollectionSheet
): NewIndividualCollectionSheetRepository {
return NewIndividualCollectionSheetRepositoryImp(dataManager, dataManagerCollection)
}

@Provides
fun providesIndividualCollectionSheetDetailsRepository(dataManagerCollection: DataManagerCollectionSheet): IndividualCollectionSheetDetailsRepository {
return IndividualCollectionSheetDetailsRepositoryImp(dataManagerCollection)
}

@Provides
fun providesCreateNewCenterRepository(dataManagerCenter: DataManagerCenter): CreateNewCenterRepository {
return CreateNewCenterRepositoryImp(dataManagerCenter)
}

@Provides
fun providesCreateNewClientRepository(
dataManagerClient: DataManagerClient,
dataManagerOffices: DataManagerOffices,
dataManagerStaff: DataManagerStaff
): CreateNewClientRepository {
return CreateNewClientRepositoryImp(dataManagerClient, dataManagerOffices, dataManagerStaff)
}

@Provides
fun providesCreateNewGroupRepository(
dataManagerOffices: DataManagerOffices, dataManagerGroups: DataManagerGroups
): CreateNewGroupRepository {
return CreateNewGroupRepositoryImp(dataManagerOffices, dataManagerGroups)
}

@Provides
fun providesDataTableDataRepository(dataManagerDataTable: DataManagerDataTable): DataTableDataRepository {
return DataTableDataRepositoryImp(dataManagerDataTable)
}

@Provides
fun providesDataTableListRepository(
dataManagerLoan: DataManagerLoan,
dataManager: DataManager,
dataManagerClient: DataManagerClient
): DataTableListRepository {
return DataTableListRepositoryImp(dataManagerLoan, dataManager, dataManagerClient)
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,12 +23,14 @@ import com.mifos.objects.survey.ScorecardValues
import com.mifos.objects.survey.Survey
import com.mifos.utils.Constants
import com.mifos.utils.PrefManager
import dagger.hilt.android.AndroidEntryPoint
import java.util.Date
import java.util.Vector

/**
* Created by Nasim Banu on 28,January,2016.
*/
@AndroidEntryPoint
class SurveyQuestionActivity : MifosBaseActivity(), OnAnswerSelectedListener, DisableSwipe,
OnPageChangeListener {

Expand Down
Loading

0 comments on commit f6538a8

Please sign in to comment.