forked from openMF/mifos-mobile
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: loan charge display (openMF#2787)
Co-authored-by: Rajan Maurya <[email protected]>
- Loading branch information
1 parent
64ad103
commit 8a10193
Showing
21 changed files
with
182 additions
and
244 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
34 changes: 34 additions & 0 deletions
34
...lient-charge/src/main/java/org/mifos/mobile/feature/charge/navigation/ChargeNavigation.kt
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
/* | ||
* Copyright 2024 Mifos Initiative | ||
* | ||
* This Source Code Form is subject to the terms of the Mozilla Public | ||
* License, v. 2.0. If a copy of the MPL was not distributed with this | ||
* file, You can obtain one at https://mozilla.org/MPL/2.0/. | ||
* | ||
* See https://github.com/openMF/mobile-mobile/blob/master/LICENSE.md | ||
*/ | ||
package org.mifos.mobile.feature.charge.navigation | ||
|
||
import org.mifos.mobile.core.common.Constants.CHARGE_TYPE | ||
import org.mifos.mobile.core.common.Constants.CHARGE_TYPE_ID | ||
import org.mifos.mobile.core.model.enums.ChargeType | ||
|
||
// Constants for Routes | ||
const val CHARGE_ROUTE_BASE = "charge_route_base" | ||
const val CHARGE_ROUTE_SCREEN = "charge_route_screen" | ||
|
||
// Sealed class for Navigation Routes | ||
sealed class ChargeNavigation(var route: String) { | ||
|
||
data object ChargeRouteBase : ChargeNavigation( | ||
route = "$CHARGE_ROUTE_BASE/{$CHARGE_TYPE}/${CHARGE_TYPE_ID}", | ||
) | ||
|
||
data object ChargeRouteScreen : ChargeNavigation( | ||
route = "$CHARGE_ROUTE_SCREEN/{$CHARGE_TYPE}/{$CHARGE_TYPE_ID}", | ||
) { | ||
fun passArguments(chargeType: ChargeType, chargeTypeId: Long?): String { | ||
return "$CHARGE_ROUTE_SCREEN/${chargeType.name}/$chargeTypeId" | ||
} | ||
} | ||
} |
Oops, something went wrong.