Skip to content

Commit 069353f

Browse files
committed
feat(feature:autopay): add module structure and navigation integration
1 parent 278e1aa commit 069353f

File tree

23 files changed

+783
-29
lines changed

23 files changed

+783
-29
lines changed

cmp-android/dependencies/prodReleaseRuntimeClasspath.tree.txt

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3012,6 +3012,38 @@
30123012
| | +--- org.jetbrains.compose.material3:material3:1.8.2 (*)
30133013
| | +--- org.jetbrains.compose.components:components-resources:1.8.2 (*)
30143014
| | \--- org.jetbrains.compose.components:components-ui-tooling-preview:1.8.2 (*)
3015+
| +--- project :feature:autopay
3016+
| | +--- androidx.lifecycle:lifecycle-runtime-compose:2.9.2 (*)
3017+
| | +--- androidx.lifecycle:lifecycle-viewmodel-compose:2.9.2 (*)
3018+
| | +--- androidx.tracing:tracing-ktx:1.3.0 (*)
3019+
| | +--- io.insert-koin:koin-bom:4.1.0 (*)
3020+
| | +--- io.insert-koin:koin-android:4.1.0 (*)
3021+
| | +--- io.insert-koin:koin-androidx-compose:4.1.0 (*)
3022+
| | +--- io.insert-koin:koin-androidx-navigation:4.1.0 (*)
3023+
| | +--- io.insert-koin:koin-core-viewmodel:4.1.0 (*)
3024+
| | +--- org.jetbrains.kotlin:kotlin-stdlib:2.1.20 -> 2.1.21 (*)
3025+
| | +--- io.insert-koin:koin-core:4.1.0 (*)
3026+
| | +--- io.insert-koin:koin-annotations:2.1.0 (*)
3027+
| | +--- project :core:ui (*)
3028+
| | +--- project :core:designsystem (*)
3029+
| | +--- project :core:data (*)
3030+
| | +--- io.insert-koin:koin-compose:4.1.0 (*)
3031+
| | +--- io.insert-koin:koin-compose-viewmodel:4.1.0 (*)
3032+
| | +--- org.jetbrains.compose.runtime:runtime:1.8.2 (*)
3033+
| | +--- org.jetbrains.androidx.lifecycle:lifecycle-runtime-compose:2.9.1 (*)
3034+
| | +--- org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-compose:2.9.1 (*)
3035+
| | +--- org.jetbrains.androidx.lifecycle:lifecycle-viewmodel:2.9.1 (*)
3036+
| | +--- org.jetbrains.androidx.lifecycle:lifecycle-viewmodel-savedstate:2.9.1 (*)
3037+
| | +--- org.jetbrains.androidx.savedstate:savedstate:1.3.1 (*)
3038+
| | +--- org.jetbrains.androidx.core:core-bundle:1.0.1 (*)
3039+
| | +--- org.jetbrains.androidx.navigation:navigation-compose:2.9.0-beta03 (*)
3040+
| | +--- org.jetbrains.kotlinx:kotlinx-collections-immutable:0.3.8 (*)
3041+
| | +--- org.jetbrains.kotlinx:kotlinx-serialization-json:1.7.3 -> 1.8.0 (*)
3042+
| | +--- org.jetbrains.compose.ui:ui:1.8.2 (*)
3043+
| | +--- org.jetbrains.compose.foundation:foundation:1.8.2 (*)
3044+
| | +--- org.jetbrains.compose.material3:material3:1.8.2 (*)
3045+
| | +--- org.jetbrains.compose.components:components-resources:1.8.2 (*)
3046+
| | \--- org.jetbrains.compose.components:components-ui-tooling-preview:1.8.2 (*)
30153047
| \--- org.jetbrains.kotlin:kotlin-parcelize-runtime:2.1.20 (*)
30163048
+--- project :core:data (*)
30173049
+--- project :core:ui (*)

cmp-android/dependencies/prodReleaseRuntimeClasspath.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
:core:ui
1313
:feature:accounts
1414
:feature:auth
15+
:feature:autopay
1516
:feature:editpassword
1617
:feature:faq
1718
:feature:finance

cmp-android/prodRelease-badging.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
package: name='org.mifospay' versionCode='1' versionName='2025.8.2-beta.0.3' platformBuildVersionName='15' platformBuildVersionCode='35' compileSdkVersion='35' compileSdkVersionCodename='15'
1+
package: name='org.mifospay' versionCode='1' versionName='2025.8.4-beta.0.9' platformBuildVersionName='15' platformBuildVersionCode='35' compileSdkVersion='35' compileSdkVersionCodename='15'
22
minSdkVersion:'26'
33
targetSdkVersion:'34'
44
uses-permission: name='android.permission.INTERNET'

cmp-shared/build.gradle.kts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ kotlin {
5555
implementation(projects.feature.qr)
5656
implementation(projects.feature.merchants)
5757
implementation(projects.feature.upiSetup)
58+
implementation(projects.feature.autopay)
5859
}
5960

6061
desktopMain.dependencies {

cmp-shared/src/commonMain/kotlin/org/mifospay/shared/di/KoinModules.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import org.mifospay.core.network.di.LocalModule
2424
import org.mifospay.core.network.di.NetworkModule
2525
import org.mifospay.feature.accounts.di.AccountsModule
2626
import org.mifospay.feature.auth.di.AuthModule
27+
import org.mifospay.feature.autopay.di.AutoPayModule
2728
import org.mifospay.feature.editpassword.di.EditPasswordModule
2829
import org.mifospay.feature.faq.di.FaqModule
2930
import org.mifospay.feature.history.di.HistoryModule
@@ -88,6 +89,7 @@ object KoinModules {
8889
QrModule,
8990
MerchantsModule,
9091
UpiSetupModule,
92+
AutoPayModule,
9193
)
9294
}
9395
private val LibraryModule = module {

cmp-shared/src/commonMain/kotlin/org/mifospay/shared/navigation/MifosNavHost.kt

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,13 @@ import org.mifospay.feature.accounts.savingsaccount.addEditSavingAccountScreen
2222
import org.mifospay.feature.accounts.savingsaccount.details.navigateToSavingAccountDetails
2323
import org.mifospay.feature.accounts.savingsaccount.details.savingAccountDetailRoute
2424
import org.mifospay.feature.accounts.savingsaccount.navigateToSavingAccountAddEdit
25+
import org.mifospay.feature.autopay.AutoPayScreen
26+
import org.mifospay.feature.autopay.autoPayGraph
27+
import org.mifospay.feature.autopay.navigateToAutoPay
28+
import org.mifospay.feature.autopay.navigateToAutoPayHistory
29+
import org.mifospay.feature.autopay.navigateToAutoPayPreferences
30+
import org.mifospay.feature.autopay.navigateToAutoPayRules
31+
import org.mifospay.feature.autopay.navigateToAutoPaySetup
2532
import org.mifospay.feature.editpassword.navigation.editPasswordScreen
2633
import org.mifospay.feature.editpassword.navigation.navigateToEditPassword
2734
import org.mifospay.feature.faq.navigation.faqScreen
@@ -127,6 +134,22 @@ internal fun MifosNavHost(
127134
navigateToInvoiceDetailScreen = navController::navigateToInvoiceDetail,
128135
)
129136
},
137+
TabContent(PaymentsScreenContents.AUTOPAY.name) {
138+
AutoPayScreen(
139+
onNavigateToSetup = {
140+
navController.navigateToAutoPaySetup()
141+
},
142+
onNavigateToRules = {
143+
navController.navigateToAutoPayRules()
144+
},
145+
onNavigateToPreferences = {
146+
navController.navigateToAutoPayPreferences()
147+
},
148+
onNavigateToHistory = {
149+
navController.navigateToAutoPayHistory()
150+
},
151+
)
152+
},
130153
)
131154

132155
val tabContents = listOf(
@@ -167,6 +190,9 @@ internal fun MifosNavHost(
167190
navController.navigateToShowQrScreen()
168191
},
169192
onPay = navController::navigateToSendMoneyOptionsScreen,
193+
onAutoPay = {
194+
navController.navigateToAutoPay()
195+
},
170196
navigateToTransactionDetail = navController::navigateToSpecificTransaction,
171197
navigateToAccountDetail = navController::navigateToSavingAccountDetails,
172198
)
@@ -388,5 +414,10 @@ internal fun MifosNavHost(
388414
setupUpiPinScreen(
389415
navigateBack = navController::navigateUp,
390416
)
417+
418+
autoPayGraph(
419+
navController = navController,
420+
onNavigateBack = navController::navigateUp,
421+
)
391422
}
392423
}

core/designsystem/src/commonMain/kotlin/org/mifospay/core/designsystem/icon/MifosIcons.kt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ import androidx.compose.material.icons.filled.Description
2929
import androidx.compose.material.icons.filled.Edit
3030
import androidx.compose.material.icons.filled.FlashOff
3131
import androidx.compose.material.icons.filled.FlashOn
32+
import androidx.compose.material.icons.filled.History
3233
import androidx.compose.material.icons.filled.Info
3334
import androidx.compose.material.icons.filled.KeyboardArrowDown
3435
import androidx.compose.material.icons.filled.Person
@@ -135,4 +136,5 @@ object MifosIcons {
135136
val ArrowForward = Icons.AutoMirrored.Filled.ArrowForward
136137

137138
val CurrencyRupee = Icons.Filled.CurrencyRupee
139+
val History = Icons.Filled.History
138140
}

feature/autopay/README.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# AutoPay Feature
2+
3+
## Overview
4+
The AutoPay feature module provides functionality for setting up and managing automatic payment schedules. This module allows users to configure recurring payments, set up payment rules, and manage their automatic payment preferences.
5+
6+
## Features
7+
- Set up recurring payment schedules
8+
- Configure payment rules and conditions
9+
- Manage automatic payment preferences
10+
- View payment history and status
11+
- Enable/disable automatic payments
12+
13+
## Screenshots
14+
### Android
15+
*Screenshots will be added as the feature is developed*
16+
17+
### Desktop
18+
*Screenshots will be added as the feature is developed*
19+
20+
### Web
21+
*Screenshots will be added as the feature is developed*
22+
23+
## Module Structure
24+
```
25+
feature/autopay/
26+
├── src/
27+
│ ├── commonMain/
28+
│ │ ├── kotlin/org/mifospay/feature/autopay/
29+
│ │ │ ├── di/
30+
│ │ │ │ └── AutoPayModule.kt
31+
│ │ │ ├── AutoPayScreen.kt
32+
│ │ │ ├── AutoPayNavigation.kt
33+
│ │ │ └── AutoPayViewModel.kt
34+
│ │ └── composeResources/
35+
│ └── androidMain/
36+
│ └── kotlin/org/mifospay/feature/autopay/
37+
├── build.gradle.kts
38+
└── README.md
39+
```
40+
41+
## Dependencies
42+
- Compose UI components
43+
- Material3 design system
44+
- Koin dependency injection
45+
- Core domain modules (as needed)
46+
47+
## Usage
48+
This module is designed to be integrated into the main application through dependency injection. The AutoPayModule provides the necessary dependencies for the AutoPay feature.
49+
50+
## Development Status
51+
🚧 **In Development** - Basic module structure created

feature/autopay/build.gradle.kts

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
8+
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
9+
*/
10+
plugins {
11+
alias(libs.plugins.cmp.feature.convention)
12+
}
13+
14+
android {
15+
namespace = "org.mifospay.feature.autopay"
16+
}
17+
18+
kotlin {
19+
sourceSets {
20+
commonMain.dependencies {
21+
implementation(compose.ui)
22+
implementation(compose.foundation)
23+
implementation(compose.material3)
24+
implementation(compose.components.resources)
25+
implementation(compose.components.uiToolingPreview)
26+
}
27+
}
28+
}
Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
/*
2+
* Copyright 2024 Mifos Initiative
3+
*
4+
* This Source Code Form is subject to the terms of the Mozilla Public
5+
* License, v. 2.0. If a copy of the MPL was not distributed with this
6+
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
7+
*
8+
* See https://github.com/openMF/mobile-wallet/blob/master/LICENSE.md
9+
*/
10+
package org.mifospay.feature.autopay
11+
12+
import androidx.compose.foundation.layout.Arrangement
13+
import androidx.compose.foundation.layout.Column
14+
import androidx.compose.foundation.layout.fillMaxSize
15+
import androidx.compose.foundation.layout.padding
16+
import androidx.compose.material3.MaterialTheme
17+
import androidx.compose.material3.Surface
18+
import androidx.compose.material3.Text
19+
import androidx.compose.runtime.Composable
20+
import androidx.compose.ui.Alignment
21+
import androidx.compose.ui.Modifier
22+
import androidx.compose.ui.unit.dp
23+
24+
@Composable
25+
fun AutoPayHistoryScreen(
26+
onNavigateBack: () -> Unit,
27+
modifier: Modifier = Modifier,
28+
) {
29+
Surface(
30+
modifier = modifier.fillMaxSize(),
31+
color = MaterialTheme.colorScheme.background,
32+
) {
33+
Column(
34+
modifier = Modifier
35+
.fillMaxSize()
36+
.padding(16.dp),
37+
horizontalAlignment = Alignment.CenterHorizontally,
38+
verticalArrangement = Arrangement.Center,
39+
) {
40+
Text(
41+
text = "AutoPay History",
42+
style = MaterialTheme.typography.headlineMedium,
43+
color = MaterialTheme.colorScheme.onBackground,
44+
)
45+
46+
Text(
47+
text = "View your automatic payment history",
48+
style = MaterialTheme.typography.bodyLarge,
49+
color = MaterialTheme.colorScheme.onSurfaceVariant,
50+
modifier = Modifier.padding(top = 8.dp),
51+
)
52+
}
53+
}
54+
}

0 commit comments

Comments
 (0)