-
Notifications
You must be signed in to change notification settings - Fork 678
Approve button in recurring account Issue #2580
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: development
Are you sure you want to change the base?
Changes from all commits
a0b0efe
fb9ae31
fedeb20
fdf087e
bae17c5
c972983
1f4a960
f5af88d
711227e
c49b501
13cf1e4
7a9cfc8
167502c
e65fbbc
69be531
e145469
e7b3ebb
e5e9240
d544651
70b7ab0
83cfda6
bedbd25
31f595e
9642f8a
380a137
7bbde81
9c3a9b3
f608a15
7ca16f8
9097cdd
732f823
a9d5ffa
fb050aa
003d96a
aec28c4
8e5f350
d563680
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| /* | ||
| * Copyright 2026 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/android-client/blob/master/LICENSE.md | ||
| */ | ||
| package com.mifos.core.domain.useCases | ||
|
|
||
| import com.mifos.core.common.utils.DataState | ||
| import com.mifos.core.common.utils.asDataStateFlow | ||
| import com.mifos.core.data.repository.RecurringAccountRepository | ||
| import com.mifos.core.model.objects.template.recurring.approval.RecurringDepositApproval | ||
| import com.mifos.core.network.GenericResponse | ||
| import kotlinx.coroutines.flow.Flow | ||
| import kotlinx.coroutines.flow.flow | ||
|
|
||
| class ApproveRecurringDepositUseCase( | ||
| private val repository: RecurringAccountRepository, | ||
| ) { | ||
| operator fun invoke( | ||
| accountId: String, | ||
| approval: RecurringDepositApproval, | ||
| ): Flow<DataState<GenericResponse>> { | ||
| return flow { | ||
| emit(repository.approveRecurringDepositAccount(accountId, approval)) | ||
| }.asDataStateFlow() | ||
| } | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,23 @@ | ||
| /* | ||
| * Copyright 2026 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/android-client/blob/master/LICENSE.md | ||
| */ | ||
| package com.mifos.core.model.objects.template.recurring.approval | ||
|
|
||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class RecurringDepositApproval( | ||
| var locale: String = "en", | ||
|
|
||
| var dateFormat: String = "dd MMMM yyyy", | ||
|
|
||
| var approvedOnDate: String? = null, | ||
|
|
||
| var note: String? = null, | ||
| ) |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -101,6 +101,8 @@ import com.mifos.feature.note.navigation.noteDestination | |
| import com.mifos.feature.note.notes.navigateToNoteScreen | ||
| import com.mifos.feature.recurringDeposit.newRecurringDepositAccount.navigateToRecurringAccountRoute | ||
| import com.mifos.feature.recurringDeposit.newRecurringDepositAccount.recurringAccountDestination | ||
| import com.mifos.feature.recurringDeposit.recurringAccountApproval.navigateToRecurringDepositAccountApproval | ||
| import com.mifos.feature.recurringDeposit.recurringAccountApproval.recurringDepositAccountApprovalDestination | ||
| import com.mifos.feature.savings.navigation.navigateToAddSavingsAccount | ||
| import com.mifos.feature.savings.navigation.navigateToSavingsAccountApproval | ||
| import com.mifos.feature.savings.navigation.navigateToSavingsAccountSummaryScreen | ||
|
|
@@ -264,9 +266,17 @@ fun NavGraphBuilder.clientNavGraph( | |
| clientRecurringDepositAccountDestination( | ||
| navController = navController, | ||
| navigateBack = navController::popBackStack, | ||
| {}, | ||
| {}, | ||
| onApproveAccount = { accountId -> | ||
| navController.navigateToRecurringDepositAccountApproval(accountId) | ||
| }, | ||
| onViewAccount = {}, | ||
| ) | ||
|
|
||
| recurringDepositAccountApprovalDestination( | ||
| navigateBack = navController::popBackStack, | ||
| navController = navController, | ||
| ) | ||
|
Comment on lines
266
to
278
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧩 Analysis chain🏁 Script executed: #!/bin/bash
# Search for clientRecurringDepositAccountDestination function definition
rg -n "fun.*clientRecurringDepositAccountDestination" --type=kt -A 10Repository: openMF/android-client Length of output: 186 🏁 Script executed: #!/bin/bash
# Search for recurringDepositAccountApprovalDestination and how it uses parameters
rg -n "fun.*recurringDepositAccountApprovalDestination" --type=kt -A 10Repository: openMF/android-client Length of output: 186 🏁 Script executed: #!/bin/bash
# Search for how onApproveAccount callback is defined in the recurring deposit screen
rg -n "onApproveAccount" --type=kt -B 3 -A 3Repository: openMF/android-client Length of output: 91 🏁 Script executed: #!/bin/bash
# Search for how onViewAccount callback is defined/used
rg -n "onViewAccount" --type=kt -B 3 -A 3Repository: openMF/android-client Length of output: 91 🏁 Script executed: #!/bin/bash
# Check the navigateToRecurringDepositAccountApproval extension function
rg -n "navigateToRecurringDepositAccountApproval" --type=kt -A 5Repository: openMF/android-client Length of output: 91 🏁 Script executed: #!/bin/bash
# Search for clientRecurringDepositAccountDestination function definition
rg -n "fun.*clientRecurringDepositAccountDestination" -A 10Repository: openMF/android-client Length of output: 1805 🏁 Script executed: #!/bin/bash
# Search for recurringDepositAccountApprovalDestination definition
rg -n "fun.*recurringDepositAccountApprovalDestination" -A 10Repository: openMF/android-client Length of output: 2090 🏁 Script executed: #!/bin/bash
# Search for onApproveAccount usage patterns
rg -n "onApproveAccount" -B 2 -A 2Repository: openMF/android-client Length of output: 7632 🏁 Script executed: #!/bin/bash
# Search for onViewAccount usage patterns
rg -n "onViewAccount" -B 2 -A 2Repository: openMF/android-client Length of output: 7593 🏁 Script executed: #!/bin/bash
# Search for navigateToRecurringDepositAccountApproval extension
rg -n "navigateToRecurringDepositAccountApproval" -A 5Repository: openMF/android-client Length of output: 2888 Wire the The 🤖 Prompt for AI Agents
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @ufuomaisaac Please address this issue. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
|
||
|
|
||
| clientFixedDepositAccountDestination( | ||
| navController = navController, | ||
| navigateBack = navController::popBackStack, | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.