-
Notifications
You must be signed in to change notification settings - Fork 453
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix: move make transfer into separate module
- Loading branch information
1 parent
48b4bbb
commit e626f8e
Showing
17 changed files
with
166 additions
and
27 deletions.
There are no files selected for viewing
4 changes: 4 additions & 0 deletions
4
core/common/src/main/kotlin/org/mifospay/common/NavArgsConstants.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,4 @@ | ||
package org.mifospay.common | ||
|
||
const val PAYEE_EXTERNAL_ID_ARG = "payeeExternalId" | ||
const val TRANSFER_AMOUNT_ARG = "transferAmount" |
25 changes: 25 additions & 0 deletions
25
core/data/src/main/java/org/mifospay/core/data/repository/local/LocalRepository.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,25 @@ | ||
package org.mifospay.core.data.repository.local | ||
|
||
import org.mifospay.core.datastore.PreferencesHelper | ||
import com.mifospay.core.model.domain.client.Client | ||
import javax.inject.Inject | ||
import javax.inject.Singleton | ||
|
||
@Singleton | ||
class LocalRepository @Inject constructor(val preferencesHelper: PreferencesHelper) { | ||
|
||
val clientDetails: Client | ||
get() { | ||
val details = Client() | ||
details.name = preferencesHelper.fullName | ||
details.clientId = preferencesHelper.clientId | ||
details.externalId = preferencesHelper.clientVpa | ||
return details | ||
} | ||
|
||
fun saveClientData(client: Client) { | ||
preferencesHelper.saveFullName(client.name) | ||
preferencesHelper.clientId = client.clientId | ||
preferencesHelper.clientVpa = client.externalId | ||
} | ||
} |
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 @@ | ||
/build |
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,12 @@ | ||
plugins { | ||
alias(libs.plugins.mifospay.android.feature) | ||
alias(libs.plugins.mifospay.android.library.compose) | ||
} | ||
|
||
android { | ||
namespace = "org.mifospay.feature.make.transfer" | ||
} | ||
|
||
dependencies { | ||
implementation(projects.core.data) | ||
} |
24 changes: 24 additions & 0 deletions
24
...ansfer/src/androidTest/java/org/mifospay/feature/make/transfer/ExampleInstrumentedTest.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,24 @@ | ||
package org.mifospay.feature.make.transfer | ||
|
||
import androidx.test.platform.app.InstrumentationRegistry | ||
import androidx.test.ext.junit.runners.AndroidJUnit4 | ||
|
||
import org.junit.Test | ||
import org.junit.runner.RunWith | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Instrumented test, which will execute on an Android device. | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
@RunWith(AndroidJUnit4::class) | ||
class ExampleInstrumentedTest { | ||
@Test | ||
fun useAppContext() { | ||
// Context of the app under test. | ||
val appContext = InstrumentationRegistry.getInstrumentation().targetContext | ||
assertEquals("org.mifospay.feature.make.transfer", appContext.packageName) | ||
} | ||
} |
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,2 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<manifest /> |
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
8 changes: 4 additions & 4 deletions
8
...mmon/navigation/MakeTransferNavigation.kt → ...sfer/navigation/MakeTransferNavigation.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
23 changes: 23 additions & 0 deletions
23
feature/make-transfer/src/main/res/drawable/transfer_failure.xml
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,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
|
||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:innerRadius="0dp" | ||
android:shape="oval" | ||
android:useLevel="false"> | ||
|
||
<solid android:color="@color/primaryDarkBlue"/> | ||
|
||
</shape> | ||
|
||
</item> | ||
|
||
<item | ||
android:bottom="10dp" | ||
android:drawable="@drawable/ic_close" android:gravity="center" | ||
android:left="10dp" android:right="10dp" | ||
android:top="10dp"/> | ||
|
||
|
||
</layer-list> |
23 changes: 23 additions & 0 deletions
23
feature/make-transfer/src/main/res/drawable/transfer_success.xml
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,23 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<layer-list xmlns:android="http://schemas.android.com/apk/res/android"> | ||
<item> | ||
|
||
<shape xmlns:android="http://schemas.android.com/apk/res/android" | ||
android:innerRadius="0dp" | ||
android:shape="oval" | ||
android:useLevel="false"> | ||
|
||
<solid android:color="@color/primaryDarkBlue"/> | ||
|
||
</shape> | ||
|
||
</item> | ||
|
||
<item | ||
android:bottom="10dp" | ||
android:drawable="@drawable/ic_done" android:gravity="center" | ||
android:left="10dp" android:right="10dp" | ||
android:top="10dp"/> | ||
|
||
|
||
</layer-list> |
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,8 @@ | ||
<resources> | ||
<string name="feature_make_transfer_loading">Loading</string> | ||
<string name="feature_make_transfer_send_money">Send money</string> | ||
<string name="feature_make_transfer_sending_to">Sending to</string> | ||
<string name="feature_make_transfer_amount">Amount</string> | ||
<string name="feature_make_transfer_transaction_success">Transaction successful</string> | ||
<string name="feature_make_transfer_transaction_unable_to_process">Unable to process transfer</string> | ||
</resources> |
17 changes: 17 additions & 0 deletions
17
feature/make-transfer/src/test/java/org/mifospay/feature/make/transfer/ExampleUnitTest.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,17 @@ | ||
package org.mifospay.feature.make.transfer | ||
|
||
import org.junit.Test | ||
|
||
import org.junit.Assert.* | ||
|
||
/** | ||
* Example local unit test, which will execute on the development machine (host). | ||
* | ||
* See [testing documentation](http://d.android.com/tools/testing). | ||
*/ | ||
class ExampleUnitTest { | ||
@Test | ||
fun addition_isCorrect() { | ||
assertEquals(4, 2 + 2) | ||
} | ||
} |
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