mirror of
https://github.com/openMF/mifos-mobile.git
synced 2026-02-06 11:26:51 +00:00
Refactor - [:core:model] Apply & Fix Ktlint & Detekt Rules (#2674)
* Refactor - [:core:model] Apply & Fix Ktlint & Detekt Rules Jira tasks - [MM-60](https://mifosforge.jira.com/browse/MM-60) * Refactor - [:core:network] Apply & Fix Ktlint & Detekt Rules Jira tasks - [MM-61](https://mifosforge.jira.com/browse/MM-61) * Refactor - Applied & Fixed Ktlint & Detekt Rules in Core Module Jira tasks - [MM-62](https://mifosforge.jira.com/browse/MM-62)
This commit is contained in:
parent
770d790cd3
commit
26439e1667
@ -85,7 +85,8 @@ dependencies {
|
||||
implementation(projects.core.model)
|
||||
implementation(projects.core.data)
|
||||
implementation(projects.core.datastore)
|
||||
implementation(projects.ui)
|
||||
implementation(projects.core.ui)
|
||||
implementation(projects.core.designsystem)
|
||||
|
||||
implementation(projects.feature.loan)
|
||||
implementation(projects.feature.beneficiary)
|
||||
|
||||
@ -19,7 +19,7 @@ import com.google.android.gms.common.GoogleApiAvailability
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import org.mifos.mobile.R
|
||||
import org.mifos.mobile.core.common.Constants
|
||||
import org.mifos.mobile.core.ui.theme.MifosMobileTheme
|
||||
import org.mifos.mobile.core.designsystem.theme.MifosMobileTheme
|
||||
import org.mifos.mobile.feature.home.navigation.HomeNavigation
|
||||
import org.mifos.mobile.feature.user_profile.viewmodel.UserDetailViewModel
|
||||
import org.mifos.mobile.navigation.RootNavGraph
|
||||
|
||||
@ -6,7 +6,7 @@ import androidx.activity.compose.setContent
|
||||
import androidx.activity.enableEdgeToEdge
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import org.mifos.mobile.core.ui.theme.MifosMobileTheme
|
||||
import org.mifos.mobile.core.designsystem.theme.MifosMobileTheme
|
||||
import org.mifos.mobile.feature.auth.navigation.AuthenticationNavigation
|
||||
import org.mifos.mobile.navigation.RootNavGraph
|
||||
|
||||
|
||||
@ -9,7 +9,7 @@ import androidx.compose.foundation.layout.statusBarsPadding
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.navigation.compose.rememberNavController
|
||||
import dagger.hilt.android.AndroidEntryPoint
|
||||
import org.mifos.mobile.core.ui.theme.MifosMobileTheme
|
||||
import org.mifos.mobile.core.designsystem.theme.MifosMobileTheme
|
||||
import org.mifos.mobile.navigation.PASSCODE_SCREEN
|
||||
import org.mifos.mobile.navigation.RootNavGraph
|
||||
|
||||
|
||||
@ -3,6 +3,7 @@ import org.gradle.api.Plugin
|
||||
import org.gradle.api.Project
|
||||
import org.gradle.kotlin.dsl.configure
|
||||
import org.gradle.kotlin.dsl.dependencies
|
||||
import org.gradle.kotlin.dsl.kotlin
|
||||
import org.mifos.mobile.libs
|
||||
|
||||
class AndroidFeatureConventionPlugin : Plugin<Project> {
|
||||
@ -20,12 +21,28 @@ class AndroidFeatureConventionPlugin : Plugin<Project> {
|
||||
}
|
||||
|
||||
dependencies {
|
||||
add("implementation", project(":ui"))
|
||||
//add("implementation", project(":core:designsystem"))
|
||||
add("implementation", project(":core:designsystem"))
|
||||
add("implementation", project(":core:ui"))
|
||||
add("implementation", project(":core:data"))
|
||||
|
||||
add("implementation", project(":libs:material3-navigation"))
|
||||
|
||||
add("implementation", libs.findLibrary("kotlinx.collections.immutable").get())
|
||||
|
||||
add("implementation", libs.findLibrary("androidx.hilt.navigation.compose").get())
|
||||
add("implementation", libs.findLibrary("androidx.lifecycle.runtimeCompose").get())
|
||||
add("implementation", libs.findLibrary("androidx.lifecycle.viewModelCompose").get())
|
||||
|
||||
add("androidTestImplementation", libs.findLibrary("androidx.lifecycle.runtimeTesting").get())
|
||||
|
||||
add("testImplementation", kotlin("test"))
|
||||
add("testImplementation", libs.findLibrary("hilt.android.testing").get())
|
||||
|
||||
add("debugImplementation", libs.findLibrary("androidx.compose.ui.test.manifest").get())
|
||||
add("androidTestImplementation", libs.findLibrary("androidx.navigation.testing").get())
|
||||
add("androidTestImplementation", libs.findLibrary("androidx.compose.ui.test").get())
|
||||
add("androidTestImplementation", libs.findLibrary("hilt.android.testing").get())
|
||||
add("androidTestImplementation", libs.findLibrary("androidx.lifecycle.runtimeTesting").get())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -25,6 +25,9 @@ internal fun Project.configureAndroidCompose(
|
||||
val bom = libs.findLibrary("androidx-compose-bom").get()
|
||||
add("implementation", platform(bom))
|
||||
add("androidTestImplementation", platform(bom))
|
||||
|
||||
add("implementation", libs.findLibrary("androidx-compose-ui-tooling-preview").get())
|
||||
add("debugImplementation", libs.findLibrary("androidx-compose-ui-tooling").get())
|
||||
}
|
||||
|
||||
testOptions {
|
||||
|
||||
32
ci-prebuild.bat
Normal file
32
ci-prebuild.bat
Normal file
@ -0,0 +1,32 @@
|
||||
@echo off
|
||||
setlocal enabledelayedexpansion
|
||||
|
||||
rem Check if gradlew exists in the project
|
||||
if not exist "%~dp0gradlew" (
|
||||
echo Error: gradlew not found in the project.
|
||||
exit /b 1
|
||||
)
|
||||
|
||||
echo Starting all checks and tests...
|
||||
|
||||
call :run_gradle_task "check -p build-logic"
|
||||
call :run_gradle_task "spotlessApply --no-configuration-cache"
|
||||
call :run_gradle_task "dependencyGuardBaseline"
|
||||
call :run_gradle_task "detekt"
|
||||
call :run_gradle_task "testDemoDebug :lint:test :androidApp:lintProdRelease :lint:lint"
|
||||
call :run_gradle_task "build"
|
||||
call :run_gradle_task "updateProdReleaseBadging"
|
||||
|
||||
echo All checks and tests completed successfully.
|
||||
exit /b 0
|
||||
|
||||
:run_gradle_task
|
||||
echo ########################################################
|
||||
echo Running: %~1
|
||||
call "%~dp0gradlew" %~1
|
||||
if %ERRORLEVEL% neq 0 (
|
||||
echo Error: Task %~1 failed
|
||||
exit /b 1
|
||||
)
|
||||
echo ########################################################
|
||||
exit /b 0
|
||||
59
ci-prebuild.sh
Normal file
59
ci-prebuild.sh
Normal file
@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Check if gradlew exists in the project
|
||||
if [ ! -f "./gradlew" ]; then
|
||||
echo "Error: gradlew not found in the project."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Starting all checks and tests..."
|
||||
|
||||
failed_tasks=()
|
||||
successful_tasks=()
|
||||
|
||||
run_gradle_task() {
|
||||
echo "Running: $1"
|
||||
"./gradlew" $1
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Warning: Task $1 failed"
|
||||
failed_tasks+=("$1")
|
||||
else
|
||||
echo "Task $1 completed successfully"
|
||||
successful_tasks+=("$1")
|
||||
fi
|
||||
}
|
||||
|
||||
tasks=(
|
||||
"check -p build-logic"
|
||||
"spotlessApply --no-configuration-cache"
|
||||
"dependencyGuardBaseline"
|
||||
"detekt"
|
||||
"testDemoDebug :lint:test :lint:lint :androidApp:lintProdRelease"
|
||||
"build"
|
||||
"updateProdReleaseBadging"
|
||||
)
|
||||
|
||||
for task in "${tasks[@]}"; do
|
||||
run_gradle_task "$task"
|
||||
done
|
||||
|
||||
echo "All tasks have finished."
|
||||
|
||||
echo "Successful tasks:"
|
||||
for task in "${successful_tasks[@]}"; do
|
||||
echo "- $task"
|
||||
done
|
||||
|
||||
if [ ${#failed_tasks[@]} -eq 0 ]; then
|
||||
echo "All checks and tests completed successfully."
|
||||
else
|
||||
echo "Failed tasks:"
|
||||
for task in "${failed_tasks[@]}"; do
|
||||
echo "- $task"
|
||||
done
|
||||
echo "Please review the output above for more details on the failures."
|
||||
fi
|
||||
|
||||
echo "Total tasks: ${#tasks[@]}"
|
||||
echo "Successful tasks: ${#successful_tasks[@]}"
|
||||
echo "Failed tasks: ${#failed_tasks[@]}"
|
||||
36
core/designsystem/build.gradle.kts
Normal file
36
core/designsystem/build.gradle.kts
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
plugins {
|
||||
alias(libs.plugins.mifos.android.library)
|
||||
alias(libs.plugins.mifos.android.library.compose)
|
||||
}
|
||||
|
||||
android {
|
||||
defaultConfig {
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
}
|
||||
namespace = "org.mifos.mobile.core.designsystem"
|
||||
}
|
||||
|
||||
dependencies {
|
||||
lintPublish(projects.lint)
|
||||
|
||||
api(libs.androidx.compose.ui)
|
||||
api(libs.androidx.compose.foundation)
|
||||
api(libs.androidx.compose.foundation.layout)
|
||||
api(libs.androidx.compose.material.iconsExtended)
|
||||
api(libs.androidx.compose.material3)
|
||||
api(libs.androidx.compose.runtime)
|
||||
api(libs.androidx.compose.ui.util)
|
||||
api(libs.androidx.activity.compose)
|
||||
|
||||
testImplementation(libs.androidx.compose.ui.test)
|
||||
androidTestImplementation(libs.androidx.compose.ui.test)
|
||||
}
|
||||
13
core/designsystem/src/main/AndroidManifest.xml
Normal file
13
core/designsystem/src/main/AndroidManifest.xml
Normal file
@ -0,0 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
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
|
||||
-->
|
||||
<manifest>
|
||||
|
||||
</manifest>
|
||||
@ -1,18 +1,25 @@
|
||||
package org.mifos.mobile.core.ui.component
|
||||
/*
|
||||
* 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.core.designsystem.components
|
||||
|
||||
import androidx.compose.foundation.Image
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.layout.Spacer
|
||||
import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.height
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.text.KeyboardOptions
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.OutlinedTextField
|
||||
import androidx.compose.material3.OutlinedTextFieldDefaults
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextFieldColors
|
||||
import androidx.compose.material3.TextFieldDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
@ -31,12 +38,13 @@ import androidx.compose.ui.unit.sp
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun MifosOutlinedTextField(
|
||||
label: Int,
|
||||
value: TextFieldValue,
|
||||
onValueChange: (TextFieldValue) -> Unit,
|
||||
modifier: Modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp),
|
||||
maxLines: Int = 1,
|
||||
singleLine: Boolean = true,
|
||||
icon: Int? = null,
|
||||
label: Int,
|
||||
visualTransformation: VisualTransformation = VisualTransformation.None,
|
||||
trailingIcon: @Composable (() -> Unit)? = null,
|
||||
error: Boolean = false,
|
||||
@ -45,10 +53,9 @@ fun MifosOutlinedTextField(
|
||||
enabled: Boolean = true,
|
||||
readOnly: Boolean = false,
|
||||
imeAction: ImeAction = ImeAction.Next,
|
||||
modifier: Modifier = Modifier.fillMaxWidth().padding(horizontal = 16.dp),
|
||||
colors: TextFieldColors = TextFieldDefaults.outlinedTextFieldColors(
|
||||
focusedBorderColor = MaterialTheme.colorScheme.primary
|
||||
)
|
||||
colors: TextFieldColors = OutlinedTextFieldDefaults.colors(
|
||||
focusedBorderColor = MaterialTheme.colorScheme.primary,
|
||||
),
|
||||
) {
|
||||
OutlinedTextField(
|
||||
value = value,
|
||||
@ -60,11 +67,16 @@ fun MifosOutlinedTextField(
|
||||
Image(
|
||||
painter = painterResource(id = icon),
|
||||
contentDescription = null,
|
||||
colorFilter = if (isSystemInDarkTheme()) ColorFilter.tint(Color.White)
|
||||
else ColorFilter.tint(Color.Black)
|
||||
colorFilter = if (isSystemInDarkTheme()) {
|
||||
ColorFilter.tint(Color.White)
|
||||
} else {
|
||||
ColorFilter.tint(Color.Black)
|
||||
},
|
||||
)
|
||||
}
|
||||
} else null,
|
||||
} else {
|
||||
null
|
||||
},
|
||||
trailingIcon = trailingIcon,
|
||||
maxLines = maxLines,
|
||||
singleLine = singleLine,
|
||||
@ -76,8 +88,8 @@ fun MifosOutlinedTextField(
|
||||
},
|
||||
keyboardOptions = KeyboardOptions.Default.copy(
|
||||
imeAction = imeAction,
|
||||
keyboardType = keyboardType
|
||||
),
|
||||
keyboardType = keyboardType,
|
||||
),
|
||||
visualTransformation = visualTransformation,
|
||||
isError = error,
|
||||
supportingText = {
|
||||
@ -85,10 +97,11 @@ fun MifosOutlinedTextField(
|
||||
Text(
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
text = supportingText ?: "",
|
||||
color = MaterialTheme.colorScheme.error
|
||||
color = MaterialTheme.colorScheme.error,
|
||||
)
|
||||
} else null
|
||||
} else {
|
||||
null
|
||||
}
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* 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.core.designsystem.components
|
||||
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.material3.RadioButton
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import org.mifos.mobile.core.designsystem.theme.MifosMobileTheme
|
||||
|
||||
@Composable
|
||||
fun MifosRadioButton(
|
||||
selected: Boolean,
|
||||
onClick: () -> Unit,
|
||||
textResId: Int,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Row(
|
||||
modifier = modifier,
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
) {
|
||||
RadioButton(
|
||||
selected = selected,
|
||||
onClick = onClick,
|
||||
)
|
||||
Text(text = stringResource(id = textResId))
|
||||
}
|
||||
}
|
||||
|
||||
@Preview(showSystemUi = true)
|
||||
@Composable
|
||||
private fun MifosRadioButtonPreview() {
|
||||
MifosMobileTheme {
|
||||
MifosRadioButton(
|
||||
selected = false,
|
||||
onClick = {},
|
||||
textResId = 1,
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,15 @@
|
||||
package org.mifos.mobile.core.ui.component
|
||||
/*
|
||||
* 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.core.designsystem.components
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.calculateEndPadding
|
||||
import androidx.compose.foundation.layout.padding
|
||||
@ -15,65 +25,29 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.unit.LayoutDirection
|
||||
|
||||
|
||||
data class FloatingActionButtonContent(
|
||||
val onClick: (() -> Unit),
|
||||
val contentColor: Color,
|
||||
val content: (@Composable () -> Unit)
|
||||
)
|
||||
|
||||
@Composable
|
||||
fun MFScaffold(
|
||||
fun MifosScaffold(
|
||||
@StringRes
|
||||
topBarTitleResId: Int,
|
||||
navigateBack: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
floatingActionButtonContent: FloatingActionButtonContent? = null,
|
||||
snackbarHost: @Composable () -> Unit = {},
|
||||
scaffoldContent: @Composable (PaddingValues) -> Unit
|
||||
content: @Composable (PaddingValues) -> Unit,
|
||||
) {
|
||||
var padding by remember { mutableStateOf(PaddingValues()) }
|
||||
Scaffold(
|
||||
topBar = {
|
||||
MifosTopBarTitle(
|
||||
topBarTitleResId = topBarTitleResId,
|
||||
navigateBack = navigateBack
|
||||
navigateBack = navigateBack,
|
||||
)
|
||||
},
|
||||
floatingActionButton = {
|
||||
floatingActionButtonContent?.let { content ->
|
||||
FloatingActionButton(
|
||||
modifier = Modifier.padding(
|
||||
end = padding.calculateEndPadding(LayoutDirection.Ltr)
|
||||
),
|
||||
onClick = content.onClick,
|
||||
contentColor = content.contentColor,
|
||||
containerColor = MaterialTheme.colorScheme.primary,
|
||||
content = content.content
|
||||
)
|
||||
}
|
||||
},
|
||||
snackbarHost = snackbarHost,
|
||||
content = {
|
||||
padding = it
|
||||
scaffoldContent(it)
|
||||
}
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun MFScaffold(
|
||||
topBar: @Composable () -> Unit,
|
||||
floatingActionButtonContent: FloatingActionButtonContent? = null,
|
||||
snackbarHost: @Composable () -> Unit = {},
|
||||
scaffoldContent: @Composable (PaddingValues) -> Unit
|
||||
) {
|
||||
var padding by remember { mutableStateOf(PaddingValues()) }
|
||||
Scaffold(
|
||||
topBar = topBar,
|
||||
floatingActionButton = {
|
||||
floatingActionButtonContent?.let { content ->
|
||||
FloatingActionButton(
|
||||
modifier = Modifier.padding(
|
||||
end = padding.calculateEndPadding(LayoutDirection.Ltr)
|
||||
end = padding.calculateEndPadding(LayoutDirection.Ltr),
|
||||
),
|
||||
onClick = content.onClick,
|
||||
contentColor = content.contentColor,
|
||||
@ -83,9 +57,49 @@ fun MFScaffold(
|
||||
}
|
||||
},
|
||||
snackbarHost = snackbarHost,
|
||||
modifier = modifier,
|
||||
content = {
|
||||
padding = it
|
||||
scaffoldContent(it)
|
||||
}
|
||||
content(it)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun MifosScaffold(
|
||||
topBar: @Composable () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
floatingActionButtonContent: FloatingActionButtonContent? = null,
|
||||
snackbarHost: @Composable () -> Unit = {},
|
||||
content: @Composable (PaddingValues) -> Unit,
|
||||
) {
|
||||
var padding by remember { mutableStateOf(PaddingValues()) }
|
||||
Scaffold(
|
||||
topBar = topBar,
|
||||
floatingActionButton = {
|
||||
floatingActionButtonContent?.let { content ->
|
||||
FloatingActionButton(
|
||||
modifier = Modifier.padding(
|
||||
end = padding.calculateEndPadding(LayoutDirection.Ltr),
|
||||
),
|
||||
onClick = content.onClick,
|
||||
contentColor = content.contentColor,
|
||||
containerColor = MaterialTheme.colorScheme.primary,
|
||||
content = content.content,
|
||||
)
|
||||
}
|
||||
},
|
||||
snackbarHost = snackbarHost,
|
||||
modifier = modifier,
|
||||
content = {
|
||||
padding = it
|
||||
content(it)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
data class FloatingActionButtonContent(
|
||||
val onClick: (() -> Unit),
|
||||
val contentColor: Color,
|
||||
val content: (@Composable () -> Unit),
|
||||
)
|
||||
@ -1,4 +1,13 @@
|
||||
package org.mifos.mobile.core.ui.component
|
||||
/*
|
||||
* 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.core.designsystem.components
|
||||
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.text.KeyboardActions
|
||||
@ -18,15 +27,16 @@ import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalFocusManager
|
||||
import androidx.compose.ui.text.input.ImeAction
|
||||
import androidx.compose.ui.text.input.TextFieldValue
|
||||
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import org.mifos.mobile.core.designsystem.theme.MifosMobileTheme
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun MifosSearchTextField(
|
||||
modifier: Modifier = Modifier,
|
||||
value: TextFieldValue,
|
||||
onValueChange: (TextFieldValue) -> Unit,
|
||||
onSearchDismiss: () -> Unit
|
||||
onSearchDismiss: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
val focusManager = LocalFocusManager.current
|
||||
|
||||
@ -37,13 +47,13 @@ fun MifosSearchTextField(
|
||||
Icon(
|
||||
imageVector = Icons.Default.Search,
|
||||
contentDescription = null,
|
||||
tint = Color.DarkGray
|
||||
tint = Color.DarkGray,
|
||||
)
|
||||
},
|
||||
onValueChange = { onValueChange(it) },
|
||||
onValueChange = onValueChange,
|
||||
textStyle = MaterialTheme.typography.bodyLarge,
|
||||
trailingIcon = {
|
||||
IconButton(onClick = { onSearchDismiss.invoke() }) {
|
||||
IconButton(onClick = onSearchDismiss) {
|
||||
Icon(
|
||||
imageVector = Icons.Default.Close,
|
||||
contentDescription = "Close Icon",
|
||||
@ -51,21 +61,36 @@ fun MifosSearchTextField(
|
||||
)
|
||||
}
|
||||
},
|
||||
colors = TextFieldDefaults.textFieldColors(
|
||||
containerColor = Color.Transparent,
|
||||
colors = TextFieldDefaults.colors().copy(
|
||||
focusedContainerColor = Color.Transparent,
|
||||
focusedIndicatorColor = Color.LightGray,
|
||||
unfocusedIndicatorColor = Color.LightGray,
|
||||
focusedTextColor = if (isSystemInDarkTheme()) Color.White else Color.Black,
|
||||
unfocusedTextColor = if (isSystemInDarkTheme()) Color.White else Color.Black
|
||||
unfocusedTextColor = if (isSystemInDarkTheme()) Color.White else Color.Black,
|
||||
),
|
||||
keyboardOptions = KeyboardOptions(
|
||||
imeAction = ImeAction.Search
|
||||
imeAction = ImeAction.Search,
|
||||
),
|
||||
keyboardActions = KeyboardActions(
|
||||
onSearch = {
|
||||
focusManager.clearFocus()
|
||||
}
|
||||
},
|
||||
),
|
||||
singleLine = true
|
||||
singleLine = true,
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
@Preview
|
||||
@Composable
|
||||
private fun MifosSearchTextFieldPreview(
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
MifosMobileTheme {
|
||||
MifosSearchTextField(
|
||||
value = TextFieldValue("Search"),
|
||||
onValueChange = {},
|
||||
onSearchDismiss = {},
|
||||
modifier = modifier,
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,13 @@
|
||||
package org.mifos.mobile.core.ui.component
|
||||
/*
|
||||
* 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.core.designsystem.components
|
||||
|
||||
import androidx.compose.foundation.ExperimentalFoundationApi
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
@ -7,7 +16,6 @@ import androidx.compose.foundation.layout.fillMaxWidth
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.foundation.pager.HorizontalPager
|
||||
import androidx.compose.foundation.pager.PagerState
|
||||
import androidx.compose.foundation.pager.rememberPagerState
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.Tab
|
||||
import androidx.compose.material3.TabRow
|
||||
@ -17,7 +25,6 @@ import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.res.colorResource
|
||||
import androidx.compose.ui.unit.dp
|
||||
|
||||
@OptIn(ExperimentalFoundationApi::class)
|
||||
@ -25,10 +32,10 @@ import androidx.compose.ui.unit.dp
|
||||
fun MifosTabPager(
|
||||
pagerState: PagerState,
|
||||
currentPage: Int,
|
||||
modifier: Modifier,
|
||||
tabs: List<String>,
|
||||
setCurrentPage: (Int) -> Unit,
|
||||
pageContent: @Composable (Int) -> Unit
|
||||
modifier: Modifier = Modifier,
|
||||
content: @Composable (Int) -> Unit,
|
||||
) {
|
||||
Column(modifier = modifier) {
|
||||
TabRow(
|
||||
@ -43,7 +50,7 @@ fun MifosTabPager(
|
||||
.padding(start = 36.dp, end = 36.dp),
|
||||
color = MaterialTheme.colorScheme.surfaceTint,
|
||||
)
|
||||
}
|
||||
},
|
||||
) {
|
||||
tabs.forEachIndexed { index, tabTitle ->
|
||||
Tab(
|
||||
@ -51,7 +58,7 @@ fun MifosTabPager(
|
||||
selectedContentColor = MaterialTheme.colorScheme.surfaceTint,
|
||||
unselectedContentColor = if (isSystemInDarkTheme()) Color.White else Color.Black,
|
||||
selected = currentPage == index,
|
||||
onClick = { setCurrentPage(index) }
|
||||
onClick = { setCurrentPage(index) },
|
||||
) {
|
||||
Text(text = tabTitle)
|
||||
}
|
||||
@ -62,9 +69,8 @@ fun MifosTabPager(
|
||||
state = pagerState,
|
||||
modifier = Modifier.fillMaxWidth(),
|
||||
pageContent = { page ->
|
||||
pageContent(page)
|
||||
}
|
||||
content(page)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,124 @@
|
||||
/*
|
||||
* 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.core.designsystem.components
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.foundation.BorderStroke
|
||||
import androidx.compose.foundation.interaction.MutableInteractionSource
|
||||
import androidx.compose.foundation.layout.PaddingValues
|
||||
import androidx.compose.foundation.layout.Row
|
||||
import androidx.compose.foundation.layout.RowScope
|
||||
import androidx.compose.material3.Button
|
||||
import androidx.compose.material3.ButtonColors
|
||||
import androidx.compose.material3.ButtonDefaults
|
||||
import androidx.compose.material3.ButtonElevation
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TextButton
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Shape
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.res.stringResource
|
||||
|
||||
@Composable
|
||||
fun MifosTextButton(
|
||||
@StringRes
|
||||
textResId: Int,
|
||||
onClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Button(
|
||||
modifier = modifier,
|
||||
onClick = onClick,
|
||||
content = {
|
||||
Text(text = stringResource(id = textResId))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun MifosTextButton(
|
||||
text: String,
|
||||
onClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
TextButton(
|
||||
modifier = modifier,
|
||||
onClick = onClick,
|
||||
content = {
|
||||
Text(text = text)
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun MifosTextButton(
|
||||
onClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
enabled: Boolean = true,
|
||||
shape: Shape = ButtonDefaults.textShape,
|
||||
colors: ButtonColors = ButtonDefaults.textButtonColors(),
|
||||
elevation: ButtonElevation? = null,
|
||||
border: BorderStroke? = null,
|
||||
contentPadding: PaddingValues = ButtonDefaults.TextButtonContentPadding,
|
||||
interactionSource: MutableInteractionSource = remember { MutableInteractionSource() },
|
||||
content: @Composable (RowScope.() -> Unit),
|
||||
) {
|
||||
TextButton(
|
||||
modifier = modifier,
|
||||
onClick = onClick,
|
||||
enabled = enabled,
|
||||
shape = shape,
|
||||
colors = colors,
|
||||
elevation = elevation,
|
||||
border = border,
|
||||
contentPadding = contentPadding,
|
||||
interactionSource = interactionSource,
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun MifosOutlinedTextButton(
|
||||
textResId: Int,
|
||||
onClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
Button(
|
||||
onClick = onClick,
|
||||
modifier = modifier,
|
||||
content = {
|
||||
Text(text = stringResource(id = textResId))
|
||||
},
|
||||
)
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun MifosIconTextButton(
|
||||
text: String,
|
||||
enabled: Boolean,
|
||||
imageVector: ImageVector,
|
||||
onClick: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
TextButton(
|
||||
onClick = onClick,
|
||||
modifier = modifier,
|
||||
enabled = enabled,
|
||||
) {
|
||||
Row(verticalAlignment = Alignment.CenterVertically) {
|
||||
Icon(imageVector = imageVector, contentDescription = null)
|
||||
Text(text = text)
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,57 +1,57 @@
|
||||
package org.mifos.mobile.core.ui.component
|
||||
/*
|
||||
* 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.core.designsystem.components
|
||||
|
||||
import androidx.annotation.StringRes
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.foundation.layout.Box
|
||||
import androidx.compose.foundation.layout.RowScope
|
||||
import androidx.compose.foundation.layout.padding
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.filled.ArrowBack
|
||||
import androidx.compose.material.icons.filled.MoreVert
|
||||
import androidx.compose.material3.ExperimentalMaterial3Api
|
||||
import androidx.compose.material3.Icon
|
||||
import androidx.compose.material3.IconButton
|
||||
import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.material3.TopAppBar
|
||||
import androidx.compose.material3.TopAppBarDefaults
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.graphics.ImageBitmap
|
||||
import androidx.compose.ui.graphics.painter.Painter
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
import androidx.compose.ui.res.stringResource
|
||||
import androidx.compose.ui.tooling.preview.Preview
|
||||
import org.mifos.mobile.core.ui.theme.MifosMobileTheme
|
||||
|
||||
import org.mifos.mobile.core.designsystem.icons.MifosIcons
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun MifosTopBar(
|
||||
modifier: Modifier = Modifier,
|
||||
navigateBack: () -> Unit,
|
||||
title: @Composable () -> Unit,
|
||||
actions: @Composable RowScope.() -> Unit = {}
|
||||
modifier: Modifier = Modifier,
|
||||
actions: @Composable RowScope.() -> Unit = {},
|
||||
) {
|
||||
TopAppBar(
|
||||
modifier = modifier,
|
||||
title = title,
|
||||
navigationIcon = {
|
||||
IconButton(
|
||||
onClick = { navigateBack.invoke() }
|
||||
onClick = navigateBack,
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.ArrowBack,
|
||||
imageVector = MifosIcons.ArrowBack,
|
||||
contentDescription = "Back Arrow",
|
||||
tint = if (isSystemInDarkTheme()) Color.White else Color.Black,
|
||||
)
|
||||
}
|
||||
},
|
||||
colors = TopAppBarDefaults.topAppBarColors(
|
||||
containerColor = if (isSystemInDarkTheme())
|
||||
containerColor = if (isSystemInDarkTheme()) {
|
||||
Color(0xFF1B1B1F)
|
||||
else
|
||||
} else {
|
||||
Color(0xFFFEFBFF)
|
||||
},
|
||||
),
|
||||
actions = actions,
|
||||
)
|
||||
@ -60,30 +60,31 @@ fun MifosTopBar(
|
||||
@OptIn(ExperimentalMaterial3Api::class)
|
||||
@Composable
|
||||
fun MifosTopBarTitle(
|
||||
modifier: Modifier = Modifier,
|
||||
navigateBack: () -> Unit,
|
||||
@StringRes
|
||||
topBarTitleResId: Int,
|
||||
navigateBack: () -> Unit,
|
||||
modifier: Modifier = Modifier,
|
||||
) {
|
||||
TopAppBar(
|
||||
modifier = modifier,
|
||||
title = { Text(text = stringResource(id = topBarTitleResId)) },
|
||||
navigationIcon = {
|
||||
IconButton(
|
||||
onClick = { navigateBack.invoke() }
|
||||
onClick = navigateBack,
|
||||
) {
|
||||
Icon(
|
||||
imageVector = Icons.Filled.ArrowBack,
|
||||
imageVector = MifosIcons.ArrowBack,
|
||||
contentDescription = "Back Arrow",
|
||||
tint = if (isSystemInDarkTheme()) Color.White else Color.Black,
|
||||
)
|
||||
}
|
||||
},
|
||||
colors = TopAppBarDefaults.topAppBarColors(
|
||||
containerColor = if (isSystemInDarkTheme())
|
||||
containerColor = if (isSystemInDarkTheme()) {
|
||||
Color(0xFF1B1B1F)
|
||||
else
|
||||
} else {
|
||||
Color(0xFFFEFBFF)
|
||||
},
|
||||
),
|
||||
)
|
||||
}
|
||||
|
||||
@ -1,22 +1,36 @@
|
||||
package org.mifos.mobile.core.ui.component
|
||||
/*
|
||||
* 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.core.designsystem.icons
|
||||
|
||||
import androidx.compose.material.icons.Icons
|
||||
import androidx.compose.material.icons.automirrored.filled.List
|
||||
import androidx.compose.material.icons.automirrored.filled.MenuBook
|
||||
import androidx.compose.material.icons.automirrored.filled.MenuOpen
|
||||
import androidx.compose.material.icons.automirrored.filled.ArrowBack
|
||||
import androidx.compose.material.icons.filled.Add
|
||||
import androidx.compose.material.icons.filled.ArrowDropDown
|
||||
import androidx.compose.material.icons.filled.ArrowDropUp
|
||||
import androidx.compose.material.icons.filled.Edit
|
||||
import androidx.compose.material.icons.filled.Error
|
||||
import androidx.compose.material.icons.filled.FilterList
|
||||
import androidx.compose.material.icons.filled.FlashOff
|
||||
import androidx.compose.material.icons.filled.FlashOn
|
||||
import androidx.compose.material.icons.filled.List
|
||||
import androidx.compose.material.icons.filled.Info
|
||||
import androidx.compose.material.icons.filled.Menu
|
||||
import androidx.compose.material.icons.filled.Notifications
|
||||
import androidx.compose.material.icons.filled.Search
|
||||
import androidx.compose.material.icons.filled.WifiOff
|
||||
import androidx.compose.ui.graphics.vector.ImageVector
|
||||
|
||||
object MifosIcons {
|
||||
val Info: ImageVector = Icons.Default.Info
|
||||
val ArrowDropUp: ImageVector = Icons.Default.ArrowDropUp
|
||||
val ArrowDropDown: ImageVector = Icons.Default.ArrowDropDown
|
||||
val ArrowBack = Icons.AutoMirrored.Default.ArrowBack
|
||||
val Edit = Icons.Default.Edit
|
||||
val FilterList = Icons.Filled.FilterList
|
||||
val FlashOn = Icons.Default.FlashOn
|
||||
@ -27,4 +41,4 @@ object MifosIcons {
|
||||
val Error = Icons.Filled.Error
|
||||
val Notifications = Icons.Filled.Notifications
|
||||
val NavigationDrawer = Icons.Default.Menu
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,13 @@
|
||||
package org.mifos.mobile.core.ui.theme
|
||||
/*
|
||||
* 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.core.designsystem.theme
|
||||
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
@ -25,4 +34,4 @@ val DarkGray = Color(0xBB666666)
|
||||
|
||||
val GreenSuccess = Color(0xff14c416)
|
||||
val LightSurfaceTint = Color(0xFF325CA8)
|
||||
val DarkSurfaceTint = Color(0xFFAEC6FF)
|
||||
val DarkSurfaceTint = Color(0xFFAEC6FF)
|
||||
@ -1,12 +1,20 @@
|
||||
package org.mifos.mobile.core.ui.theme
|
||||
/*
|
||||
* 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.core.designsystem.theme
|
||||
|
||||
import android.os.Build
|
||||
import androidx.compose.foundation.isSystemInDarkTheme
|
||||
import androidx.compose.material3.*
|
||||
import androidx.compose.material3.MaterialTheme
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.CompositionLocalProvider
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
|
||||
private val LightThemeColors = lightColorScheme(
|
||||
primary = LightPrimary,
|
||||
@ -16,7 +24,7 @@ private val LightThemeColors = lightColorScheme(
|
||||
onSurface = Black2,
|
||||
onSecondary = Color.Gray,
|
||||
outlineVariant = Color.Gray,
|
||||
surfaceTint = LightSurfaceTint
|
||||
surfaceTint = LightSurfaceTint,
|
||||
)
|
||||
|
||||
private val DarkThemeColors = darkColorScheme(
|
||||
@ -29,7 +37,7 @@ private val DarkThemeColors = darkColorScheme(
|
||||
onSurface = Color.White,
|
||||
onSecondary = Color.White,
|
||||
outlineVariant = Color.White,
|
||||
surfaceTint = DarkSurfaceTint
|
||||
surfaceTint = DarkSurfaceTint,
|
||||
)
|
||||
|
||||
@Composable
|
||||
@ -37,18 +45,13 @@ fun MifosMobileTheme(
|
||||
useDarkTheme: Boolean = isSystemInDarkTheme(),
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
val context = LocalContext.current
|
||||
val colors = when {
|
||||
// (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) -> {
|
||||
// if (useDarkTheme) dynamicDarkColorScheme(context)
|
||||
// else dynamicLightColorScheme(context)
|
||||
// }
|
||||
useDarkTheme -> DarkThemeColors
|
||||
else -> LightThemeColors
|
||||
}
|
||||
|
||||
MaterialTheme(
|
||||
colorScheme = colors,
|
||||
content = content
|
||||
content = content,
|
||||
)
|
||||
}
|
||||
}
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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
|
||||
*/
|
||||
plugins {
|
||||
alias(libs.plugins.mifos.android.library)
|
||||
alias(libs.plugins.kotlin.android)
|
||||
|
||||
@ -1,24 +0,0 @@
|
||||
package org.mifos.mobile.core.model
|
||||
|
||||
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.mifos.mobile.core.model.test", appContext.packageName)
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,13 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android">
|
||||
<!--
|
||||
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
|
||||
-->
|
||||
<manifest>
|
||||
|
||||
</manifest>
|
||||
@ -1,11 +1,19 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
import org.mifos.mobile.core.model.enums.AboutUsListItemId
|
||||
|
||||
|
||||
data class AboutUsItem(
|
||||
val title: String?,
|
||||
val subtitle: Int? = null,
|
||||
val iconUrl: Int? = null,
|
||||
val itemId: AboutUsListItemId
|
||||
val itemId: AboutUsListItemId,
|
||||
)
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
import org.mifos.mobile.core.model.entity.beneficiary.Beneficiary
|
||||
|
||||
@ -1,15 +1,20 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by michaelsosnick on 12/11/16.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class ChargeCalculationType(
|
||||
var id: Int = 0,
|
||||
var code: String? = null, // example "chargeCalculationType.flat"
|
||||
var code: String? = null,
|
||||
var value: String? = null,
|
||||
) : Parcelable
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
@ -8,7 +17,6 @@ import kotlinx.parcelize.Parcelize
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
|
||||
data class FAQ @JvmOverloads constructor(
|
||||
var question: String? = null,
|
||||
var answer: String? = null,
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
import android.os.Parcelable
|
||||
@ -30,4 +39,4 @@ data class Transaction(
|
||||
|
||||
var reversed: Boolean? = null,
|
||||
|
||||
) : Parcelable
|
||||
) : Parcelable
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
/*
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity
|
||||
|
||||
/**
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts
|
||||
|
||||
/**
|
||||
|
||||
@ -1,11 +1,16 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts
|
||||
|
||||
import org.mifos.mobile.core.model.entity.accounts.loan.LoanAccount
|
||||
|
||||
/**
|
||||
* @author Vishwajeet
|
||||
* @since 13/08/16
|
||||
*/
|
||||
data class LoanAccountsListResponse(
|
||||
var loanAccounts: List<LoanAccount> = ArrayList(),
|
||||
)
|
||||
|
||||
@ -1,11 +1,16 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts
|
||||
|
||||
import org.mifos.mobile.core.model.entity.accounts.savings.SavingAccount
|
||||
|
||||
/**
|
||||
* @author Vishwajeet
|
||||
* @since 13/08/16
|
||||
*/
|
||||
data class SavingAccountsListResponse(
|
||||
var savingsAccounts: List<SavingAccount> = ArrayList(),
|
||||
)
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class AmortizationType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by dilpreet on 27/2/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class Currency(
|
||||
var code: String? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class DaysInMonthType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class DaysInYearType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class InterestCalculationPeriodType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class InterestRateFrequencyType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class InterestRecalculationCompoundingType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
@ -5,10 +14,6 @@ import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import org.mifos.mobile.core.model.entity.accounts.loan.calendardata.CalendarData
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class InterestRecalculationData(
|
||||
var id: Int? = null,
|
||||
@ -32,4 +37,4 @@ data class InterestRecalculationData(
|
||||
|
||||
var allowCompoundingOnEod: Boolean? = null,
|
||||
|
||||
) : Parcelable
|
||||
) : Parcelable
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class InterestType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
import org.mifos.mobile.core.model.entity.accounts.Account
|
||||
|
||||
/**
|
||||
* @author Vishwajeet
|
||||
* @since 22/06/16.
|
||||
*/
|
||||
data class LoanAccount(
|
||||
var loanProductId: Long = 0,
|
||||
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,14 +1,18 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import com.google.gson.annotations.SerializedName
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import org.mifos.mobile.core.model.entity.Transaction
|
||||
import java.util.*
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class LoanWithAssociations(
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by dilpreet on 7/6/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class LoanWithdraw(
|
||||
var withdrawnOnDate: String? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class Periods(
|
||||
var period: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class RecalculationCompoundingFrequencyType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class RecalculationRestFrequencyType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class RepaymentFrequencyType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class RepaymentSchedule(
|
||||
var currency: Currency? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class RescheduleStrategyType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class TermPeriodFrequencyType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
/*
|
||||
* This project is licensed under the open source MPL V2.
|
||||
* See https://github.com/openMF/android-client/blob/master/LICENSE.md
|
||||
* 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.core.model.entity.accounts.loan
|
||||
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
|
||||
@Suppress("ktlint:standard:property-naming")
|
||||
data class Timeline(
|
||||
var submittedOnDate: List<Int>? = null,
|
||||
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan.calendardata
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class CalendarData(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan.calendardata
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class EntityType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan.calendardata
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class Frequency(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan.calendardata
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class RepeatsOnNthDayOfMonth(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan.calendardata
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 04/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class Type(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan.tableview
|
||||
|
||||
data class Cell(val data: Any)
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan.tableview
|
||||
|
||||
data class ColumnHeader(val data: Any)
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.loan.tableview
|
||||
|
||||
data class RowHeader(val data: Any)
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 05/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class PaymentDetailData(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 05/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class PaymentType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
@ -5,11 +14,6 @@ import kotlinx.parcelize.Parcelize
|
||||
import org.mifos.mobile.core.model.entity.accounts.Account
|
||||
import org.mifos.mobile.core.model.entity.client.DepositType
|
||||
|
||||
/**
|
||||
* @author Vishwajeet
|
||||
* @since 22/06/16
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class SavingAccount(
|
||||
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/*
|
||||
* Created by saksham on 01/July/2018
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class SavingsAccountApplicationPayload(
|
||||
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
package org.mifos.mobile.core.model.entity.accounts.savings
|
||||
|
||||
/*
|
||||
* Created by saksham on 03/July/2018
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/*
|
||||
* Created by saksham on 02/July/2018
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class SavingsAccountWithdrawPayload(
|
||||
var locale: String = "en",
|
||||
|
||||
@ -1,14 +1,18 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import org.mifos.mobile.core.model.entity.client.DepositType
|
||||
|
||||
/**
|
||||
* @author Vishwajeet
|
||||
* @since 22/06/16
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class SavingsWithAssociations(
|
||||
|
||||
@ -58,7 +62,7 @@ data class SavingsWithAssociations(
|
||||
|
||||
var transactions: List<Transactions> = ArrayList(),
|
||||
|
||||
) : Parcelable {
|
||||
) : Parcelable {
|
||||
|
||||
fun isRecurring(): Boolean {
|
||||
return this.depositType != null && (this.depositType?.isRecurring() == true)
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 05/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class Summary(
|
||||
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcel
|
||||
import android.os.Parcelable
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 05/03/17.
|
||||
*/
|
||||
|
||||
data class TimeLine(
|
||||
var submittedOnDate: List<Int> = ArrayList(),
|
||||
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 05/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class TransactionType(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.savings
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 05/03/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class Transactions(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.share
|
||||
|
||||
import android.os.Parcelable
|
||||
@ -6,7 +15,6 @@ import kotlinx.parcelize.Parcelize
|
||||
import org.mifos.mobile.core.model.entity.accounts.Account
|
||||
import org.mifos.mobile.core.model.entity.accounts.savings.Currency
|
||||
|
||||
|
||||
@Parcelize
|
||||
data class ShareAccount(
|
||||
|
||||
@ -37,4 +45,4 @@ data class ShareAccount(
|
||||
@Expose
|
||||
var timeline: Timeline? = null,
|
||||
|
||||
) : Account(), Parcelable
|
||||
) : Account(), Parcelable
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.share
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.accounts.share
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
/*
|
||||
* 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.core.model.entity.beneficiary
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import org.mifos.mobile.core.model.entity.templates.account.AccountType
|
||||
|
||||
/**
|
||||
* Created by dilpreet on 14/6/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class Beneficiary(
|
||||
var id: Int? = null,
|
||||
|
||||
@ -1,6 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.beneficiary
|
||||
|
||||
/*
|
||||
* Created by saksham on 18/June/2018
|
||||
*/
|
||||
class BeneficiaryDetail(var accountNumber: String?, var beneficiaryName: String?)
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.beneficiary
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by dilpreet on 16/6/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class BeneficiaryPayload(
|
||||
internal var locale: String = "en_GB",
|
||||
|
||||
@ -1,8 +1,13 @@
|
||||
package org.mifos.mobile.core.model.entity.beneficiary
|
||||
|
||||
/**
|
||||
* Created by dilpreet on 16/6/17.
|
||||
/*
|
||||
* 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.core.model.entity.beneficiary
|
||||
|
||||
data class BeneficiaryUpdatePayload @JvmOverloads constructor(
|
||||
var name: String? = null,
|
||||
|
||||
@ -1,13 +1,18 @@
|
||||
/*
|
||||
* 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.core.model.entity.client
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
import org.mifos.mobile.core.model.entity.Timeline
|
||||
|
||||
/**
|
||||
* @author Vishwajeet
|
||||
* @since 20/06/16
|
||||
*/
|
||||
@Parcelize
|
||||
data class Client(
|
||||
var id: Int = 0,
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.client
|
||||
|
||||
import android.os.Parcelable
|
||||
@ -6,7 +15,6 @@ import org.mifos.mobile.core.model.entity.accounts.loan.LoanAccount
|
||||
import org.mifos.mobile.core.model.entity.accounts.savings.SavingAccount
|
||||
import org.mifos.mobile.core.model.entity.accounts.share.ShareAccount
|
||||
|
||||
|
||||
@Parcelize
|
||||
data class ClientAccounts(
|
||||
var loanAccounts: List<LoanAccount> = ArrayList(),
|
||||
@ -14,7 +22,7 @@ data class ClientAccounts(
|
||||
|
||||
var shareAccounts: List<ShareAccount> = ArrayList(),
|
||||
|
||||
) : Parcelable {
|
||||
) : Parcelable {
|
||||
|
||||
fun recurringSavingsAccounts(): List<SavingAccount> {
|
||||
return getSavingsAccounts(true)
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.client
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by dilpreet on 10/7/17.
|
||||
*/
|
||||
@Parcelize
|
||||
data class ClientClassification(
|
||||
var id: Int,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.client
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by dilpreet on 10/7/17.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class ClientType(
|
||||
var id: Int,
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.client
|
||||
|
||||
import android.os.Parcelable
|
||||
|
||||
@ -1,3 +1,12 @@
|
||||
/*
|
||||
* 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.core.model.entity.client
|
||||
|
||||
import android.os.Parcelable
|
||||
@ -31,7 +40,8 @@ data class DepositType(
|
||||
) {
|
||||
SAVINGS(100, "depositAccountType.savingsDeposit", ApiEndPoints.SAVINGS_ACCOUNTS),
|
||||
FIXED(200, "depositAccountType.fixedDeposit", ApiEndPoints.SAVINGS_ACCOUNTS),
|
||||
RECURRING(300, "depositAccountType.recurringDeposit", ApiEndPoints.RECURRING_ACCOUNTS);
|
||||
RECURRING(300, "depositAccountType.recurringDeposit", ApiEndPoints.RECURRING_ACCOUNTS),
|
||||
;
|
||||
|
||||
companion object {
|
||||
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.client
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by dilpreet on 10/7/17.
|
||||
*/
|
||||
@Parcelize
|
||||
data class Gender(
|
||||
var id: Int,
|
||||
|
||||
@ -1,11 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.client
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by dilpreet on 10/7/17.
|
||||
*/
|
||||
@Parcelize
|
||||
data class Group(
|
||||
var id: Int,
|
||||
|
||||
@ -1,12 +1,17 @@
|
||||
/*
|
||||
* 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.core.model.entity.client
|
||||
|
||||
import android.os.Parcelable
|
||||
import kotlinx.parcelize.Parcelize
|
||||
|
||||
/**
|
||||
* Created by Rajan Maurya on 22/10/16.
|
||||
*/
|
||||
|
||||
@Parcelize
|
||||
data class Status(
|
||||
var id: Int? = null,
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user