Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion cmp-navigation/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ kotlin {
implementation(projects.feature.center)
implementation(projects.feature.checkerInboxTask)
// implementation(projects.feature.client)
// implementation(projects.feature.collectionSheet)
implementation(projects.feature.collectionSheet)
// implementation(projects.feature.dataTable)
// implementation(projects.feature.document)
// implementation(projects.feature.groups)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import com.mifos.feature.activate.di.ActivateModule
import com.mifos.feature.auth.di.AuthModule
import com.mifos.feature.center.di.CenterModule
import com.mifos.feature.checker.inbox.task.di.CheckerInboxTaskModule
import com.mifos.feature.individualCollectionSheet.di.CollectionSheetModule
import com.mifos.feature.note.di.NoteModule
import com.mifos.feature.pathTracking.di.PathTrackingModule
import com.mifos.feature.search.di.SearchModule
Expand Down Expand Up @@ -58,7 +59,7 @@ object KoinModules {
CenterModule,
CheckerInboxTaskModule,
// ClientModule,
// CollectionSheetModule,
CollectionSheetModule,
// DataTableModule,
// DocumentModule,
// GroupsModule,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ import com.mifos.feature.activate.navigation.activateScreen
import com.mifos.feature.activate.navigation.navigateToActivateScreen
import com.mifos.feature.center.navigation.centerNavGraph
import com.mifos.feature.checker.inbox.task.navigation.checkerInboxTaskNavGraph
import com.mifos.feature.individualCollectionSheet.navigation.individualCollectionSheetNavGraph
import com.mifos.feature.note.navigation.noteNavGraph
import com.mifos.feature.pathTracking.navigation.pathTrackingNavGraph
import com.mifos.feature.search.navigation.searchNavGraph
Expand Down Expand Up @@ -73,6 +74,10 @@ internal fun FeatureNavHost(
changePasscode = {},
languageChanged = {},
)
individualCollectionSheetNavGraph(
navController = appState.navController,
onBackPressed = appState.navController::popBackStack,
)

pathTrackingNavGraph(appState.navController)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -227,4 +227,5 @@ object Constants {
const val DATA_TABLE_NAV_DATA = "data_table_nav_data"
const val DATA_TABLE_DATA_NAV_DATA = "data_table_data_nav_data"
const val DATA_TABLE_LIST_NAV_DATA = "data_table_list_nav_data"
const val PAYMENT_DETAILS_ARGS = "paymentDetailsArgs"
}
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import kotlinx.serialization.Serializable
@Parcelize
@Serializable
data class IndividualCollectionSheet(
var dueDate: IntArray? = null,
var dueDate: String? = null,

var clients: ArrayList<ClientCollectionSheet>? = null,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class UsernameValidationUseCase {
success = false,
getString(Res.string.core_domain_enter_credentials),
)
} else if (username.length < 5) {
} else if (username.length < 4) {
return ValidationResult(
success = false,
getString(Res.string.core_domain_error_username_length),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,76 +10,22 @@
package com.mifos.core.model.objects.collectionsheets

import com.mifos.core.model.objects.template.loan.Currency
import com.mifos.core.model.utils.Parcel
import com.mifos.core.model.utils.Parcelable
import com.mifos.core.model.utils.Parcelize
import kotlinx.serialization.Serializable

/**
* Created by Tarun on 06-07-2017.
*/
// TODO migrate to kmp model,
@Parcelize
@Serializable
class LoanCollectionSheet() : Parcelable {
var accountId: String? = null
var accountStatusId: Int = 0
var currency: Currency? = null
var interestDue: Double? = null
var interestPaid: Double? = null
var loanId: Int = 0
var principalDue: Double? = null
var productId: Double? = null
var totalDue: Double = 0.0
var chargesDue: Double = 0.0
var productShortName: String? = null

constructor(parcel: Parcel) : this() {
accountId = parcel.readString()
accountStatusId = parcel.readInt()
// todo resolve this
// currency = parcel.readParcelable(Currency::class.java.classLoader)
interestDue = parcel.readDouble()
interestPaid = parcel.readDouble()
loanId = parcel.readInt()
principalDue = parcel.readDouble()
productId = parcel.readDouble()
totalDue = parcel.readDouble()
chargesDue = parcel.readDouble()
productShortName = parcel.readString()
}

// override fun describeContents(): Int {
// return 0
// }

// override fun writeToParcel(dest: com.mifos.core.model.utils.Parcel, flags: Int) {
// dest.writeString(accountId)
// dest.writeInt(accountStatusId)
// dest.writeParcelable(currency, flags)
// dest.writeDouble(interestDue)
// dest.writeDouble(interestPaid)
// dest.writeInt(loanId)
// dest.writeDouble(principalDue)
// dest.writeDouble(productId)
// dest.writeDouble(totalDue)
// dest.writeDouble(chargesDue)
// dest.writeString(productShortName)
// }

override fun toString(): String {
return "LoanCollectionSheet(accountId=$accountId, accountStatusId=$accountStatusId, currency=$currency, " +
"interestDue=$interestDue, interestPaid=$interestPaid, loanId=$loanId, principalDue=$principalDue, " +
"productId=$productId, totalDue=$totalDue, chargesDue=$chargesDue, productShortName=$productShortName)"
}

// companion object CREATOR : com.mifos.core.model.utils.Parcelable.Creator<LoanCollectionSheet> {
// override fun createFromParcel(parcel: com.mifos.core.model.utils.Parcel): LoanCollectionSheet {
// return LoanCollectionSheet(parcel)
// }
//
// override fun newArray(size: Int): Array<LoanCollectionSheet?> {
// return arrayOfNulls(size)
// }
// }
}
data class LoanCollectionSheet(
val accountId: String? = null,
val accountStatusId: Int = 0,
val currency: Currency? = null,
val interestDue: Double? = null,
val interestPaid: Double? = null,
val loanId: Int = 0,
val principalDue: Double? = null,
val productId: Double? = null,
val totalDue: Double = 0.0,
val chargesDue: Double = 0.0,
val productShortName: String? = null,
) : Parcelable
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import kotlinx.coroutines.launch
import org.koin.dsl.module

val NetworkModule = module {

single<HttpClient>(KtorClient) {
val preferencesRepository = get<UserPreferencesRepository>()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,15 @@
*/
package com.mifos.core.network.model

import kotlinx.serialization.Serializable

/**
* Created by Tarun on 06-07-2017.
*/
@Serializable
data class RequestCollectionSheetPayload(
var dateFormat: String = "dd MMMM yyyy",
var locale: String = "en",
var dateFormat: String? = null,
var locale: String? = null,
var officeId: Int? = null,
var staffId: Int? = null,
var transactionDate: String = "",
Expand Down
28 changes: 16 additions & 12 deletions feature/collectionSheet/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,24 +8,28 @@
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
*/
plugins {
alias(libs.plugins.mifos.android.feature)
alias(libs.plugins.mifos.android.library.compose)
alias(libs.plugins.mifos.android.library.jacoco)
alias(libs.plugins.mifos.cmp.feature)
alias(libs.plugins.kotlin.parcelize)
alias(libs.plugins.kotlin.serialization)
}

android {
namespace = "com.mifos.feature.collection_sheet"
}

dependencies {
kotlin {
sourceSets{
commonMain.dependencies {
implementation(compose.material3)
implementation(compose.components.resources)
implementation(compose.ui)
implementation(projects.core.domain)
implementation(libs.kotlinx.serialization.json)

implementation(projects.core.domain)
implementation(libs.coil.core)
implementation(libs.coil.kt)
implementation(libs.coil.kt.compose)

implementation(libs.coil.kt2)
implementation(libs.coil.kt2.compose)

//DBFlow dependencies
testImplementation(libs.hilt.android.testing)

implementation(libs.kotlinx.serialization.json)
}
}
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ package com.mifos.feature.individualCollectionSheet.di

import com.mifos.feature.individualCollectionSheet.generateCollectionSheet.GenerateCollectionSheetViewModel
import com.mifos.feature.individualCollectionSheet.individualCollectionSheetDetails.IndividualCollectionSheetDetailsViewModel
import com.mifos.feature.individualCollectionSheet.newIndividualCollectionSheet.ui.NewIndividualCollectionSheetViewModel
import com.mifos.feature.individualCollectionSheet.newIndividualCollectionSheet.NewIndividualCollectionSheetViewModel
import com.mifos.feature.individualCollectionSheet.paymentDetails.PaymentDetailsViewModel
import com.mifos.feature.individualCollectionSheet.savedIndividualCollectionSheet.ui.SavedIndividualCollectionSheetViewModel
import com.mifos.feature.individualCollectionSheet.savedIndividualCollectionSheet.SavedIndividualCollectionSheetViewModel
import org.koin.core.module.dsl.viewModelOf
import org.koin.dsl.module

Expand Down
Loading