-
Notifications
You must be signed in to change notification settings - Fork 658
Mifo 557 #2542
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
Merged
Merged
Mifo 557 #2542
Changes from all commits
Commits
Show all changes
3 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
14 changes: 14 additions & 0 deletions
14
core/data/src/commonMain/kotlin/com/mifos/core/data/repository/FixedDepositRepository.kt
This file contains hidden or 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,14 @@ | ||
| package com.mifos.core.data.repository | ||
|
|
||
| import com.mifos.core.common.utils.DataState | ||
| import com.mifos.core.network.model.FixedDepositTemplate | ||
| import kotlinx.coroutines.flow.Flow | ||
|
|
||
| interface FixedDepositRepository { | ||
| fun getFixedDepositTemplate( | ||
| clientId: Int, | ||
| productId: Int? | ||
| ): Flow<DataState<FixedDepositTemplate>> | ||
|
|
||
|
|
||
| } | ||
20 changes: 20 additions & 0 deletions
20
...ata/src/commonMain/kotlin/com/mifos/core/data/repositoryImp/FixedDepositRepositoryImpl.kt
This file contains hidden or 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,20 @@ | ||
| package com.mifos.core.data.repositoryImp | ||
|
|
||
|
|
||
| import com.mifos.core.common.utils.DataState | ||
| import com.mifos.core.common.utils.asDataStateFlow | ||
| import com.mifos.core.data.repository.FixedDepositRepository | ||
| import com.mifos.core.network.datamanager.DataManagerFixedDeposit | ||
| import com.mifos.core.network.model.FixedDepositTemplate | ||
| import kotlinx.coroutines.flow.Flow | ||
|
|
||
| class FixedDepositRepositoryImpl (private val dataManagerFixedDeposit: DataManagerFixedDeposit): FixedDepositRepository{ | ||
|
|
||
| override fun getFixedDepositTemplate(clientId: Int,productId: Int?): Flow<DataState<FixedDepositTemplate>> { | ||
| return dataManagerFixedDeposit.getFixedDepositTemplate(clientId,productId).asDataStateFlow() | ||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
| } |
This file contains hidden or 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 hidden or 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 hidden or 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
12 changes: 12 additions & 0 deletions
12
...twork/src/commonMain/kotlin/com/mifos/core/network/datamanager/DataManagerFixedDeposit.kt
This file contains hidden or 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,12 @@ | ||
| package com.mifos.core.network.datamanager | ||
|
|
||
| import com.mifos.core.network.BaseApiManager | ||
| import com.mifos.core.network.model.FixedDepositTemplate | ||
| import kotlinx.coroutines.flow.Flow | ||
|
|
||
| class DataManagerFixedDeposit (private val baseApiManager: BaseApiManager){ | ||
|
|
||
| fun getFixedDepositTemplate(clientId:Int,productId: Int?): Flow<FixedDepositTemplate> = | ||
| baseApiManager.fixedDepositService.fixedDepositProductTemplate(clientId,productId) | ||
|
|
||
| } |
This file contains hidden or 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
17 changes: 17 additions & 0 deletions
17
core/network/src/commonMain/kotlin/com/mifos/core/network/model/FixedDepositProductOption.kt
This file contains hidden or 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,17 @@ | ||
| package com.mifos.core.network.model | ||
|
|
||
|
|
||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
| @Serializable | ||
| data class FixedDepositProductOption( | ||
| @SerialName("id") | ||
| val id: Int? = null, | ||
|
|
||
| @SerialName("name") | ||
| val name: String? = null, | ||
|
|
||
| @SerialName("withHoldTax") | ||
| val withHoldTax: Boolean? = null, | ||
| ) |
24 changes: 24 additions & 0 deletions
24
core/network/src/commonMain/kotlin/com/mifos/core/network/model/FixedDepositTemplate.kt
This file contains hidden or 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,24 @@ | ||
| package com.mifos.core.network.model | ||
|
|
||
| import com.mifos.core.model.objects.account.saving.FieldOfficerOptions | ||
| import com.mifos.core.model.utils.IgnoredOnParcel | ||
| import kotlinx.serialization.SerialName | ||
| import kotlinx.serialization.Serializable | ||
|
|
||
|
|
||
|
|
||
| @Serializable | ||
| data class FixedDepositTemplate( | ||
| @SerialName("clientId") | ||
| val clientId: Int? = null, | ||
|
|
||
| @SerialName(value = "clientName") | ||
| val clientName: String? = null, | ||
|
|
||
| @SerialName("productOptions") | ||
| val productOptions: List<FixedDepositProductOption>? = null, | ||
|
|
||
| @SerialName("fieldOfficerOptions") | ||
| val fieldOfficerOptions: List<FieldOfficerOptions>? = null, | ||
|
|
||
| ) |
26 changes: 26 additions & 0 deletions
26
core/network/src/commonMain/kotlin/com/mifos/core/network/services/FixedDepositService.kt
This file contains hidden or 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,26 @@ | ||
| package com.mifos.core.network.services | ||
|
|
||
| import com.mifos.core.network.model.FixedDepositTemplate | ||
| import com.mifos.room.basemodel.APIEndPoint | ||
| import de.jensklingenberg.ktorfit.http.Query | ||
| import de.jensklingenberg.ktorfit.http.GET | ||
| import kotlinx.coroutines.flow.Flow | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
||
| interface FixedDepositService { | ||
|
|
||
| @GET( APIEndPoint.FIXED_DEPOSIT + "/template") | ||
| fun fixedDepositProductTemplate( | ||
| @Query("clientId") clientId: Int, | ||
| @Query("productId") productId: Int?, | ||
| ): Flow<FixedDepositTemplate> | ||
| } | ||
|
|
||
|
|
||
|
|
||
|
|
||
|
|
This file contains hidden or 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 hidden or 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 hidden or 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 hidden or 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 hidden or 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
54 changes: 0 additions & 54 deletions
54
...in/kotlin/com/mifos/feature/client/newFixedDepositAccount/FixedDepositAccountViewmodel.kt
This file was deleted.
Oops, something went wrong.
This file contains hidden or 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
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing copyright header.
This file is missing the standard Mifos Initiative copyright and license header that is present in all other files in this PR. Please add the MPL 2.0 license header for consistency.
Add the copyright header at the beginning of the file:
🤖 Prompt for AI Agents