diff --git a/app/src/main/java/com/ivy/wallet/AppModuleDI.kt b/app/src/main/java/com/ivy/wallet/AppModuleDI.kt index 502a42c43d..0fe70f6ab6 100644 --- a/app/src/main/java/com/ivy/wallet/AppModuleDI.kt +++ b/app/src/main/java/com/ivy/wallet/AppModuleDI.kt @@ -6,7 +6,6 @@ import com.google.gson.GsonBuilder import com.ivy.design.navigation.Navigation import com.ivy.wallet.android.billing.IvyBilling import com.ivy.wallet.android.notification.NotificationService -import com.ivy.wallet.domain.fp.data.WalletDAOs import com.ivy.wallet.domain.logic.* import com.ivy.wallet.domain.logic.bankintegrations.BankIntegrationsLogic import com.ivy.wallet.domain.logic.bankintegrations.SaltEdgeAccountMapper @@ -20,6 +19,7 @@ import com.ivy.wallet.domain.logic.loantrasactions.LoanTransactionsCore import com.ivy.wallet.domain.logic.loantrasactions.LoanTransactionsLogic import com.ivy.wallet.domain.logic.notification.TransactionReminderLogic import com.ivy.wallet.domain.logic.zip.ExportZipLogic +import com.ivy.wallet.domain.pure.data.WalletDAOs import com.ivy.wallet.domain.sync.IvySync import com.ivy.wallet.domain.sync.item.* import com.ivy.wallet.domain.sync.uploader.* diff --git a/app/src/main/java/com/ivy/wallet/domain/action/ExchangeAct.kt b/app/src/main/java/com/ivy/wallet/domain/action/ExchangeAct.kt index ed02d082d5..34b3152e6c 100644 --- a/app/src/main/java/com/ivy/wallet/domain/action/ExchangeAct.kt +++ b/app/src/main/java/com/ivy/wallet/domain/action/ExchangeAct.kt @@ -2,7 +2,7 @@ package com.ivy.wallet.domain.action import arrow.core.Option import com.ivy.wallet.domain.action.framework.FPAction -import com.ivy.wallet.domain.fp.exchange +import com.ivy.wallet.domain.pure.exchange import com.ivy.wallet.io.persistence.dao.ExchangeRateDao import java.math.BigDecimal import javax.inject.Inject diff --git a/app/src/main/java/com/ivy/wallet/domain/action/account/AccTrnsAct.kt b/app/src/main/java/com/ivy/wallet/domain/action/account/AccTrnsAct.kt index 3af4ac9776..1c8429fccd 100644 --- a/app/src/main/java/com/ivy/wallet/domain/action/account/AccTrnsAct.kt +++ b/app/src/main/java/com/ivy/wallet/domain/action/account/AccTrnsAct.kt @@ -2,7 +2,7 @@ package com.ivy.wallet.domain.action.account import com.ivy.wallet.domain.action.framework.FPAction import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.ClosedTimeRange import com.ivy.wallet.io.persistence.dao.TransactionDao import java.util.* import javax.inject.Inject diff --git a/app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccBalanceAct.kt b/app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccBalanceAct.kt index 1ff98ee666..c651ba72ac 100644 --- a/app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccBalanceAct.kt +++ b/app/src/main/java/com/ivy/wallet/domain/action/account/CalcAccBalanceAct.kt @@ -4,9 +4,9 @@ import arrow.core.nonEmptyListOf import com.ivy.wallet.domain.action.framework.FPAction import com.ivy.wallet.domain.action.framework.then import com.ivy.wallet.domain.data.entity.Account -import com.ivy.wallet.domain.fp.account.AccountValueFunctions -import com.ivy.wallet.domain.fp.account.calcAccValues -import com.ivy.wallet.domain.fp.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.account.AccountValueFunctions +import com.ivy.wallet.domain.pure.account.calcAccValues +import com.ivy.wallet.domain.pure.data.ClosedTimeRange import java.math.BigDecimal import javax.inject.Inject diff --git a/app/src/main/java/com/ivy/wallet/domain/action/charts/BalanceChartAct.kt b/app/src/main/java/com/ivy/wallet/domain/action/charts/BalanceChartAct.kt index 20a75534c3..715efe5444 100644 --- a/app/src/main/java/com/ivy/wallet/domain/action/charts/BalanceChartAct.kt +++ b/app/src/main/java/com/ivy/wallet/domain/action/charts/BalanceChartAct.kt @@ -2,9 +2,9 @@ package com.ivy.wallet.domain.action.charts import com.ivy.wallet.domain.action.framework.FPAction import com.ivy.wallet.domain.action.wallet.CalcWalletBalanceAct -import com.ivy.wallet.domain.fp.charts.ChartPeriod -import com.ivy.wallet.domain.fp.charts.SingleChartPoint -import com.ivy.wallet.domain.fp.charts.balanceChart +import com.ivy.wallet.domain.pure.charts.ChartPeriod +import com.ivy.wallet.domain.pure.charts.SingleChartPoint +import com.ivy.wallet.domain.pure.charts.balanceChart import javax.inject.Inject class BalanceChartAct @Inject constructor( diff --git a/app/src/main/java/com/ivy/wallet/domain/action/transaction/HistoryWithDateDivAct.kt b/app/src/main/java/com/ivy/wallet/domain/action/transaction/HistoryWithDateDivAct.kt index e51d0a504a..3fda85b4ac 100644 --- a/app/src/main/java/com/ivy/wallet/domain/action/transaction/HistoryWithDateDivAct.kt +++ b/app/src/main/java/com/ivy/wallet/domain/action/transaction/HistoryWithDateDivAct.kt @@ -2,8 +2,8 @@ package com.ivy.wallet.domain.action.transaction import com.ivy.wallet.domain.action.framework.Action import com.ivy.wallet.domain.data.TransactionHistoryItem -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.domain.fp.data.WalletDAOs +import com.ivy.wallet.domain.pure.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.WalletDAOs import javax.inject.Inject class HistoryWithDateDivAct @Inject constructor( diff --git a/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcOverdueAct.kt b/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcOverdueAct.kt index 8d9194a5a5..669acd69c2 100644 --- a/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcOverdueAct.kt +++ b/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcOverdueAct.kt @@ -2,8 +2,8 @@ package com.ivy.wallet.domain.action.wallet import com.ivy.wallet.domain.action.framework.Action import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.data.IncomeExpensePair import com.ivy.wallet.domain.logic.WalletLogic +import com.ivy.wallet.domain.pure.data.IncomeExpensePair import com.ivy.wallet.ui.onboarding.model.FromToTimeRange import javax.inject.Inject diff --git a/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcUpcomingAct.kt b/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcUpcomingAct.kt index 9440020219..caaed90dc8 100644 --- a/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcUpcomingAct.kt +++ b/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcUpcomingAct.kt @@ -2,8 +2,8 @@ package com.ivy.wallet.domain.action.wallet import com.ivy.wallet.domain.action.framework.Action import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.data.IncomeExpensePair import com.ivy.wallet.domain.logic.WalletLogic +import com.ivy.wallet.domain.pure.data.IncomeExpensePair import com.ivy.wallet.ui.onboarding.model.FromToTimeRange import javax.inject.Inject diff --git a/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcWalletBalanceAct.kt b/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcWalletBalanceAct.kt index 8a4977c43e..aab216387f 100644 --- a/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcWalletBalanceAct.kt +++ b/app/src/main/java/com/ivy/wallet/domain/action/wallet/CalcWalletBalanceAct.kt @@ -5,7 +5,7 @@ import com.ivy.wallet.domain.action.ExchangeAct import com.ivy.wallet.domain.action.account.AccountsAct import com.ivy.wallet.domain.action.account.CalcAccBalanceAct import com.ivy.wallet.domain.action.framework.* -import com.ivy.wallet.domain.fp.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.ClosedTimeRange import java.math.BigDecimal import javax.inject.Inject diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/Exchange.kt b/app/src/main/java/com/ivy/wallet/domain/pure/Exchange.kt similarity index 96% rename from app/src/main/java/com/ivy/wallet/domain/fp/Exchange.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/Exchange.kt index ae9c68d6eb..d0d8061431 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/Exchange.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/Exchange.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp +package com.ivy.wallet.domain.pure import arrow.core.None import arrow.core.Option @@ -6,8 +6,8 @@ import arrow.core.Some import arrow.core.computations.option import arrow.core.toOption import com.ivy.wallet.domain.data.entity.ExchangeRate -import com.ivy.wallet.domain.fp.core.Pure -import com.ivy.wallet.domain.fp.core.SideEffect +import com.ivy.wallet.domain.pure.core.Pure +import com.ivy.wallet.domain.pure.core.SideEffect import com.ivy.wallet.utils.isNotNullOrBlank import java.math.BigDecimal diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/account/AccountCore.kt b/app/src/main/java/com/ivy/wallet/domain/pure/account/AccountCore.kt similarity index 86% rename from app/src/main/java/com/ivy/wallet/domain/fp/account/AccountCore.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/account/AccountCore.kt index 5e9a347071..e0abaa522a 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/account/AccountCore.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/account/AccountCore.kt @@ -1,12 +1,12 @@ -package com.ivy.wallet.domain.fp.account +package com.ivy.wallet.domain.pure.account import arrow.core.NonEmptyList import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.core.Pure -import com.ivy.wallet.domain.fp.core.Total -import com.ivy.wallet.domain.fp.core.calculateValueFunctionsSum -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.domain.fp.data.toFPTransaction +import com.ivy.wallet.domain.pure.core.Pure +import com.ivy.wallet.domain.pure.core.Total +import com.ivy.wallet.domain.pure.core.calculateValueFunctionsSum +import com.ivy.wallet.domain.pure.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.toFPTransaction import com.ivy.wallet.io.persistence.dao.TransactionDao import java.math.BigDecimal import java.util.* diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/account/AccountFunctions.kt b/app/src/main/java/com/ivy/wallet/domain/pure/account/AccountFunctions.kt similarity index 92% rename from app/src/main/java/com/ivy/wallet/domain/fp/account/AccountFunctions.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/account/AccountFunctions.kt index e9031cf274..c5907b7b4a 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/account/AccountFunctions.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/account/AccountFunctions.kt @@ -1,8 +1,8 @@ -package com.ivy.wallet.domain.fp.account +package com.ivy.wallet.domain.pure.account import arrow.core.nonEmptyListOf -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.domain.fp.data.IncomeExpensePair +import com.ivy.wallet.domain.pure.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.IncomeExpensePair import com.ivy.wallet.io.persistence.dao.TransactionDao import java.math.BigDecimal import java.util.* diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/account/AccountValueFunctions.kt b/app/src/main/java/com/ivy/wallet/domain/pure/account/AccountValueFunctions.kt similarity index 93% rename from app/src/main/java/com/ivy/wallet/domain/fp/account/AccountValueFunctions.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/account/AccountValueFunctions.kt index c804134621..5f5dbb8648 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/account/AccountValueFunctions.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/account/AccountValueFunctions.kt @@ -1,8 +1,8 @@ -package com.ivy.wallet.domain.fp.account +package com.ivy.wallet.domain.pure.account import com.ivy.wallet.domain.data.TransactionType -import com.ivy.wallet.domain.fp.core.ValueFunction -import com.ivy.wallet.domain.fp.data.FPTransaction +import com.ivy.wallet.domain.pure.core.ValueFunction +import com.ivy.wallet.domain.pure.data.FPTransaction import java.math.BigDecimal import java.util.* diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/category/CategoryCore.kt b/app/src/main/java/com/ivy/wallet/domain/pure/category/CategoryCore.kt similarity index 92% rename from app/src/main/java/com/ivy/wallet/domain/fp/category/CategoryCore.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/category/CategoryCore.kt index 4ce2586dbb..6dc9dbc9d5 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/category/CategoryCore.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/category/CategoryCore.kt @@ -1,11 +1,11 @@ -package com.ivy.wallet.domain.fp.category +package com.ivy.wallet.domain.pure.category import arrow.core.NonEmptyList import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.core.calculateValueFunctionsSumSuspend -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.domain.fp.data.WalletDAOs -import com.ivy.wallet.domain.fp.data.toFPTransaction +import com.ivy.wallet.domain.pure.core.calculateValueFunctionsSumSuspend +import com.ivy.wallet.domain.pure.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.WalletDAOs +import com.ivy.wallet.domain.pure.data.toFPTransaction import java.math.BigDecimal import java.util.* diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/category/CategoryFunctions.kt b/app/src/main/java/com/ivy/wallet/domain/pure/category/CategoryFunctions.kt similarity index 95% rename from app/src/main/java/com/ivy/wallet/domain/fp/category/CategoryFunctions.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/category/CategoryFunctions.kt index 2c17284b6f..c5a6e7c5ea 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/category/CategoryFunctions.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/category/CategoryFunctions.kt @@ -1,8 +1,8 @@ -package com.ivy.wallet.domain.fp.category +package com.ivy.wallet.domain.pure.category import arrow.core.nonEmptyListOf -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.domain.fp.data.WalletDAOs +import com.ivy.wallet.domain.pure.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.WalletDAOs import java.math.BigDecimal import java.util.* diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/category/CategoryValueFunctions.kt b/app/src/main/java/com/ivy/wallet/domain/pure/category/CategoryValueFunctions.kt similarity index 93% rename from app/src/main/java/com/ivy/wallet/domain/fp/category/CategoryValueFunctions.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/category/CategoryValueFunctions.kt index bce496e14f..48f16f10e6 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/category/CategoryValueFunctions.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/category/CategoryValueFunctions.kt @@ -1,12 +1,12 @@ -package com.ivy.wallet.domain.fp.category +package com.ivy.wallet.domain.pure.category import arrow.core.Option import arrow.core.toOption import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.data.entity.Account -import com.ivy.wallet.domain.fp.core.SuspendValueFunction -import com.ivy.wallet.domain.fp.data.FPTransaction -import com.ivy.wallet.domain.fp.exchangeToBaseCurrency +import com.ivy.wallet.domain.pure.core.SuspendValueFunction +import com.ivy.wallet.domain.pure.data.FPTransaction +import com.ivy.wallet.domain.pure.exchangeToBaseCurrency import com.ivy.wallet.io.persistence.dao.ExchangeRateDao import java.math.BigDecimal import java.util.* diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartPeriod.kt b/app/src/main/java/com/ivy/wallet/domain/pure/charts/ChartPeriod.kt similarity index 89% rename from app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartPeriod.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/charts/ChartPeriod.kt index 60019d8211..40c1ec1ea0 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartPeriod.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/charts/ChartPeriod.kt @@ -1,8 +1,6 @@ -package com.ivy.wallet.domain.fp.charts +package com.ivy.wallet.domain.pure.charts -import com.ivy.wallet.R -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.stringRes +import com.ivy.wallet.domain.pure.data.ClosedTimeRange import com.ivy.wallet.utils.dateNowUTC import com.ivy.wallet.utils.endOfDayNowUTC import com.ivy.wallet.utils.endOfMonth @@ -17,10 +15,10 @@ enum class ChartPeriod { fun display(): String { return when (this) { - LAST_12_MONTHS -> stringRes(R.string.last_12_months) - LAST_6_MONTHS -> stringRes(R.string.last_6_months) - LAST_4_WEEKS -> stringRes(R.string.last_4_weeks) - LAST_7_DAYS -> stringRes(R.string.last_7_days) + LAST_12_MONTHS -> "Last 12 months" + LAST_6_MONTHS -> "Last 6 months" + LAST_4_WEEKS -> "Last 4 weeks" + LAST_7_DAYS -> "Last 7 days" } } diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartsCore.kt b/app/src/main/java/com/ivy/wallet/domain/pure/charts/ChartsCore.kt similarity index 65% rename from app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartsCore.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/charts/ChartsCore.kt index 32cd162b2b..a8baaaf298 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/charts/ChartsCore.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/charts/ChartsCore.kt @@ -1,7 +1,7 @@ -package com.ivy.wallet.domain.fp.charts +package com.ivy.wallet.domain.pure.charts -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.domain.fp.data.IncomeExpensePair +import com.ivy.wallet.domain.pure.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.IncomeExpensePair import java.math.BigDecimal data class ChartPoint( diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/charts/WalletCharts.kt b/app/src/main/java/com/ivy/wallet/domain/pure/charts/WalletCharts.kt similarity index 86% rename from app/src/main/java/com/ivy/wallet/domain/fp/charts/WalletCharts.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/charts/WalletCharts.kt index 2059991807..0465f7cfa5 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/charts/WalletCharts.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/charts/WalletCharts.kt @@ -1,12 +1,11 @@ -package com.ivy.wallet.domain.fp.charts - -import com.ivy.wallet.domain.fp.core.Pure -import com.ivy.wallet.domain.fp.core.SideEffect -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.domain.fp.data.IncomeExpensePair -import com.ivy.wallet.domain.fp.data.WalletDAOs -import com.ivy.wallet.domain.fp.wallet.calculateWalletIncomeExpense -import com.ivy.wallet.domain.fp.wallet.calculateWalletIncomeExpenseCount +package com.ivy.wallet.domain.pure.charts + +import com.ivy.wallet.domain.pure.core.Pure +import com.ivy.wallet.domain.pure.core.SideEffect +import com.ivy.wallet.domain.pure.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.IncomeExpensePair +import com.ivy.wallet.domain.pure.data.WalletDAOs +import com.ivy.wallet.domain.pure.wallet.calculateWalletIncomeExpense import com.ivy.wallet.utils.beginningOfIvyTime import com.ivy.wallet.utils.toEpochSeconds import java.math.BigDecimal @@ -122,12 +121,13 @@ suspend fun incomeExpenseCountChart( return generateIncomeExpenseCountChart( orderedPeriod = orderedPeriod, calculateWalletIncomeExpenseCount = { range -> - calculateWalletIncomeExpenseCount( - walletDAOs = walletDAOs, - baseCurrencyCode = baseCurrencyCode, - range = range, - filterExcluded = true - ).value + TODO() +// calculateWalletIncomeExpenseCount( +// walletDAOs = walletDAOs, +// baseCurrencyCode = baseCurrencyCode, +// range = range, +// filterExcluded = true +// ).value } ) } diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/core/FP.kt b/app/src/main/java/com/ivy/wallet/domain/pure/core/FP.kt similarity index 94% rename from app/src/main/java/com/ivy/wallet/domain/fp/core/FP.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/core/FP.kt index 2e4bda4b0c..5cdc835a18 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/core/FP.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/core/FP.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.core +package com.ivy.wallet.domain.pure.core @Target(AnnotationTarget.FUNCTION) @Retention(AnnotationRetention.SOURCE) diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/core/TransactionFunctions.kt b/app/src/main/java/com/ivy/wallet/domain/pure/core/TransactionFunctions.kt similarity index 85% rename from app/src/main/java/com/ivy/wallet/domain/fp/core/TransactionFunctions.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/core/TransactionFunctions.kt index a48b38a31a..9e3c7ff7df 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/core/TransactionFunctions.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/core/TransactionFunctions.kt @@ -1,9 +1,9 @@ -package com.ivy.wallet.domain.fp.core +package com.ivy.wallet.domain.pure.core import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.data.FPTransaction -import com.ivy.wallet.domain.fp.data.toFPTransaction +import com.ivy.wallet.domain.pure.data.FPTransaction +import com.ivy.wallet.domain.pure.data.toFPTransaction import java.math.BigDecimal suspend fun sum( diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/core/Uncertain.kt b/app/src/main/java/com/ivy/wallet/domain/pure/core/Uncertain.kt similarity index 78% rename from app/src/main/java/com/ivy/wallet/domain/fp/core/Uncertain.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/core/Uncertain.kt index 024501df1d..912eaf276b 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/core/Uncertain.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/core/Uncertain.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.core +package com.ivy.wallet.domain.pure.core data class Uncertain, V>( val error: E, diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/core/Utils.kt b/app/src/main/java/com/ivy/wallet/domain/pure/core/Utils.kt similarity index 93% rename from app/src/main/java/com/ivy/wallet/domain/fp/core/Utils.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/core/Utils.kt index dc953e5044..06d63fde6e 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/core/Utils.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/core/Utils.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.core +package com.ivy.wallet.domain.pure.core import arrow.core.NonEmptyList import java.math.BigDecimal diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/core/ValueFunction.kt b/app/src/main/java/com/ivy/wallet/domain/pure/core/ValueFunction.kt similarity index 94% rename from app/src/main/java/com/ivy/wallet/domain/fp/core/ValueFunction.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/core/ValueFunction.kt index 7dde3b18e5..a9d0267943 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/core/ValueFunction.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/core/ValueFunction.kt @@ -1,7 +1,7 @@ -package com.ivy.wallet.domain.fp.core +package com.ivy.wallet.domain.pure.core import arrow.core.NonEmptyList -import com.ivy.wallet.domain.fp.data.FPTransaction +import com.ivy.wallet.domain.pure.data.FPTransaction import java.math.BigDecimal typealias ValueFunction = (FPTransaction, A) -> BigDecimal diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/data/ClosedTimeRange.kt b/app/src/main/java/com/ivy/wallet/domain/pure/data/ClosedTimeRange.kt similarity index 94% rename from app/src/main/java/com/ivy/wallet/domain/fp/data/ClosedTimeRange.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/data/ClosedTimeRange.kt index a89ce785d0..b9859b7340 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/data/ClosedTimeRange.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/data/ClosedTimeRange.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.data +package com.ivy.wallet.domain.pure.data import com.ivy.wallet.ui.onboarding.model.FromToTimeRange import com.ivy.wallet.utils.beginningOfIvyTime diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/data/CurrencyConvError.kt b/app/src/main/java/com/ivy/wallet/domain/pure/data/CurrencyConvError.kt similarity index 56% rename from app/src/main/java/com/ivy/wallet/domain/fp/data/CurrencyConvError.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/data/CurrencyConvError.kt index fde5cdb0ae..040077ba4c 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/data/CurrencyConvError.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/data/CurrencyConvError.kt @@ -1,3 +1,3 @@ -package com.ivy.wallet.domain.fp.data +package com.ivy.wallet.domain.pure.data data class CurrencyConvError(val account: FPAccount) \ No newline at end of file diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/data/FPAccount.kt b/app/src/main/java/com/ivy/wallet/domain/pure/data/FPAccount.kt similarity index 94% rename from app/src/main/java/com/ivy/wallet/domain/fp/data/FPAccount.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/data/FPAccount.kt index 0e5d8e3758..f0c0559c6a 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/data/FPAccount.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/data/FPAccount.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.data +package com.ivy.wallet.domain.pure.data import arrow.core.Option import arrow.core.toOption diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/data/FPTransaction.kt b/app/src/main/java/com/ivy/wallet/domain/pure/data/FPTransaction.kt similarity index 97% rename from app/src/main/java/com/ivy/wallet/domain/fp/data/FPTransaction.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/data/FPTransaction.kt index ce220b9627..2b238d48a8 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/data/FPTransaction.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/data/FPTransaction.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.data +package com.ivy.wallet.domain.pure.data import arrow.core.Option import arrow.core.toOption diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/data/IncomeExpensePair.kt b/app/src/main/java/com/ivy/wallet/domain/pure/data/IncomeExpensePair.kt similarity index 85% rename from app/src/main/java/com/ivy/wallet/domain/fp/data/IncomeExpensePair.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/data/IncomeExpensePair.kt index acfa28deb6..e42f1bce9f 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/data/IncomeExpensePair.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/data/IncomeExpensePair.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.data +package com.ivy.wallet.domain.pure.data import java.math.BigDecimal diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/data/WalletDAOs.kt b/app/src/main/java/com/ivy/wallet/domain/pure/data/WalletDAOs.kt similarity index 88% rename from app/src/main/java/com/ivy/wallet/domain/fp/data/WalletDAOs.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/data/WalletDAOs.kt index 69c8c44e3a..450ed0ea77 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/data/WalletDAOs.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/data/WalletDAOs.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.data +package com.ivy.wallet.domain.pure.data import com.ivy.wallet.io.persistence.dao.AccountDao import com.ivy.wallet.io.persistence.dao.ExchangeRateDao diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/wallet/WalletCore.kt b/app/src/main/java/com/ivy/wallet/domain/pure/wallet/WalletCore.kt similarity index 92% rename from app/src/main/java/com/ivy/wallet/domain/fp/wallet/WalletCore.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/wallet/WalletCore.kt index 65daf61c4d..5e2c0a4be2 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/wallet/WalletCore.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/wallet/WalletCore.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.wallet +package com.ivy.wallet.domain.pure.wallet import arrow.core.NonEmptyList import arrow.core.Some @@ -6,15 +6,15 @@ import arrow.core.toOption import com.ivy.wallet.domain.data.entity.Account import com.ivy.wallet.domain.data.entity.ExchangeRate import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.ExchangeData -import com.ivy.wallet.domain.fp.account.AccountValueFunction -import com.ivy.wallet.domain.fp.account.calcAccValues -import com.ivy.wallet.domain.fp.core.SideEffect -import com.ivy.wallet.domain.fp.core.Uncertain -import com.ivy.wallet.domain.fp.core.mapIndexedNel -import com.ivy.wallet.domain.fp.core.nonEmptyListOfZeros -import com.ivy.wallet.domain.fp.data.* -import com.ivy.wallet.domain.fp.exchange +import com.ivy.wallet.domain.pure.ExchangeData +import com.ivy.wallet.domain.pure.account.AccountValueFunction +import com.ivy.wallet.domain.pure.account.calcAccValues +import com.ivy.wallet.domain.pure.core.SideEffect +import com.ivy.wallet.domain.pure.core.Uncertain +import com.ivy.wallet.domain.pure.core.mapIndexedNel +import com.ivy.wallet.domain.pure.core.nonEmptyListOfZeros +import com.ivy.wallet.domain.pure.data.* +import com.ivy.wallet.domain.pure.exchange import com.ivy.wallet.utils.scopedIOThread import kotlinx.coroutines.async import kotlinx.coroutines.awaitAll diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/wallet/WalletFunctions.kt b/app/src/main/java/com/ivy/wallet/domain/pure/wallet/WalletFunctions.kt similarity index 90% rename from app/src/main/java/com/ivy/wallet/domain/fp/wallet/WalletFunctions.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/wallet/WalletFunctions.kt index a7cc8da436..abc6171bac 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/wallet/WalletFunctions.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/wallet/WalletFunctions.kt @@ -1,13 +1,13 @@ -package com.ivy.wallet.domain.fp.wallet +package com.ivy.wallet.domain.pure.wallet import arrow.core.nonEmptyListOf import com.ivy.wallet.domain.data.entity.Settings -import com.ivy.wallet.domain.fp.account.AccountValueFunctions -import com.ivy.wallet.domain.fp.core.Uncertain -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.domain.fp.data.CurrencyConvError -import com.ivy.wallet.domain.fp.data.IncomeExpensePair -import com.ivy.wallet.domain.fp.data.WalletDAOs +import com.ivy.wallet.domain.pure.account.AccountValueFunctions +import com.ivy.wallet.domain.pure.core.Uncertain +import com.ivy.wallet.domain.pure.data.ClosedTimeRange +import com.ivy.wallet.domain.pure.data.CurrencyConvError +import com.ivy.wallet.domain.pure.data.IncomeExpensePair +import com.ivy.wallet.domain.pure.data.WalletDAOs import com.ivy.wallet.io.persistence.dao.SettingsDao import java.math.BigDecimal import java.util.* diff --git a/app/src/main/java/com/ivy/wallet/domain/fp/wallet/WalletTransactions.kt b/app/src/main/java/com/ivy/wallet/domain/pure/wallet/WalletTransactions.kt similarity index 93% rename from app/src/main/java/com/ivy/wallet/domain/fp/wallet/WalletTransactions.kt rename to app/src/main/java/com/ivy/wallet/domain/pure/wallet/WalletTransactions.kt index dcf0232c80..3339b9d705 100644 --- a/app/src/main/java/com/ivy/wallet/domain/fp/wallet/WalletTransactions.kt +++ b/app/src/main/java/com/ivy/wallet/domain/pure/wallet/WalletTransactions.kt @@ -1,4 +1,4 @@ -package com.ivy.wallet.domain.fp.wallet +package com.ivy.wallet.domain.pure.wallet import arrow.core.Option import arrow.core.toOption @@ -6,9 +6,9 @@ import com.ivy.wallet.domain.data.TransactionHistoryDateDivider import com.ivy.wallet.domain.data.TransactionHistoryItem import com.ivy.wallet.domain.data.entity.Account import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.ExchangeData -import com.ivy.wallet.domain.fp.core.* -import com.ivy.wallet.domain.fp.data.FPTransaction +import com.ivy.wallet.domain.pure.ExchangeData +import com.ivy.wallet.domain.pure.core.* +import com.ivy.wallet.domain.pure.data.FPTransaction import com.ivy.wallet.utils.convertUTCtoLocal import com.ivy.wallet.utils.toEpochSeconds import java.math.BigDecimal diff --git a/app/src/main/java/com/ivy/wallet/ui/accounts/AccountsViewModel.kt b/app/src/main/java/com/ivy/wallet/ui/accounts/AccountsViewModel.kt index 8bd3687730..2b2b46755a 100644 --- a/app/src/main/java/com/ivy/wallet/ui/accounts/AccountsViewModel.kt +++ b/app/src/main/java/com/ivy/wallet/ui/accounts/AccountsViewModel.kt @@ -6,12 +6,11 @@ import com.ivy.wallet.domain.action.account.AccountsAct import com.ivy.wallet.domain.action.wallet.CalcWalletBalanceAct import com.ivy.wallet.domain.data.entity.Account import com.ivy.wallet.domain.event.AccountsUpdatedEvent -import com.ivy.wallet.domain.fp.account.calculateAccountBalance -import com.ivy.wallet.domain.fp.account.calculateAccountIncomeExpense -import com.ivy.wallet.domain.fp.data.WalletDAOs -import com.ivy.wallet.domain.fp.exchangeToBaseCurrency -import com.ivy.wallet.domain.fp.wallet.baseCurrencyCode import com.ivy.wallet.domain.logic.AccountCreator +import com.ivy.wallet.domain.pure.account.calculateAccountBalance +import com.ivy.wallet.domain.pure.account.calculateAccountIncomeExpense +import com.ivy.wallet.domain.pure.data.WalletDAOs +import com.ivy.wallet.domain.pure.wallet.baseCurrencyCode import com.ivy.wallet.domain.sync.item.AccountSync import com.ivy.wallet.io.persistence.dao.AccountDao import com.ivy.wallet.io.persistence.dao.SettingsDao diff --git a/app/src/main/java/com/ivy/wallet/ui/balance/BalanceViewModel.kt b/app/src/main/java/com/ivy/wallet/ui/balance/BalanceViewModel.kt index e0457f0626..75f5839d43 100644 --- a/app/src/main/java/com/ivy/wallet/ui/balance/BalanceViewModel.kt +++ b/app/src/main/java/com/ivy/wallet/ui/balance/BalanceViewModel.kt @@ -4,8 +4,8 @@ import androidx.lifecycle.ViewModel import androidx.lifecycle.viewModelScope import com.ivy.wallet.domain.action.settings.BaseCurrencyAct import com.ivy.wallet.domain.action.wallet.CalcWalletBalanceAct -import com.ivy.wallet.domain.fp.data.WalletDAOs import com.ivy.wallet.domain.logic.PlannedPaymentsLogic +import com.ivy.wallet.domain.pure.data.WalletDAOs import com.ivy.wallet.io.persistence.dao.SettingsDao import com.ivy.wallet.ui.IvyWalletCtx import com.ivy.wallet.ui.onboarding.model.TimePeriod diff --git a/app/src/main/java/com/ivy/wallet/ui/charts/ChartsScreen.kt b/app/src/main/java/com/ivy/wallet/ui/charts/ChartsScreen.kt index bd4751e839..a1f455efd9 100644 --- a/app/src/main/java/com/ivy/wallet/ui/charts/ChartsScreen.kt +++ b/app/src/main/java/com/ivy/wallet/ui/charts/ChartsScreen.kt @@ -22,9 +22,9 @@ import com.ivy.design.l0_system.UI import com.ivy.design.l0_system.style import com.ivy.wallet.R import com.ivy.wallet.domain.data.entity.Category -import com.ivy.wallet.domain.fp.charts.ChartPeriod -import com.ivy.wallet.domain.fp.charts.IncomeExpenseChartPoint -import com.ivy.wallet.domain.fp.charts.SingleChartPoint +import com.ivy.wallet.domain.pure.charts.ChartPeriod +import com.ivy.wallet.domain.pure.charts.IncomeExpenseChartPoint +import com.ivy.wallet.domain.pure.charts.SingleChartPoint import com.ivy.wallet.ui.Charts import com.ivy.wallet.ui.IvyWalletPreview import com.ivy.wallet.ui.charts.charts.accountCharts diff --git a/app/src/main/java/com/ivy/wallet/ui/charts/ChartsViewModel.kt b/app/src/main/java/com/ivy/wallet/ui/charts/ChartsViewModel.kt index 7d1dc627a7..62b6e75b86 100644 --- a/app/src/main/java/com/ivy/wallet/ui/charts/ChartsViewModel.kt +++ b/app/src/main/java/com/ivy/wallet/ui/charts/ChartsViewModel.kt @@ -7,13 +7,13 @@ import com.ivy.wallet.domain.action.framework.then import com.ivy.wallet.domain.action.settings.BaseCurrencyAct import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.data.entity.Category -import com.ivy.wallet.domain.fp.charts.ChartPeriod -import com.ivy.wallet.domain.fp.charts.IncomeExpenseChartPoint -import com.ivy.wallet.domain.fp.charts.SingleChartPoint -import com.ivy.wallet.domain.fp.charts.incomeExpenseChart -import com.ivy.wallet.domain.fp.data.WalletDAOs -import com.ivy.wallet.domain.fp.wallet.baseCurrencyCode import com.ivy.wallet.domain.logic.WalletCategoryLogic +import com.ivy.wallet.domain.pure.charts.ChartPeriod +import com.ivy.wallet.domain.pure.charts.IncomeExpenseChartPoint +import com.ivy.wallet.domain.pure.charts.SingleChartPoint +import com.ivy.wallet.domain.pure.charts.incomeExpenseChart +import com.ivy.wallet.domain.pure.data.WalletDAOs +import com.ivy.wallet.domain.pure.wallet.baseCurrencyCode import com.ivy.wallet.io.persistence.dao.CategoryDao import com.ivy.wallet.io.persistence.dao.SettingsDao import com.ivy.wallet.ui.onboarding.model.FromToTimeRange diff --git a/app/src/main/java/com/ivy/wallet/ui/charts/TimeValue.kt b/app/src/main/java/com/ivy/wallet/ui/charts/TimeValue.kt index 5205ae623d..ba1ff83729 100644 --- a/app/src/main/java/com/ivy/wallet/ui/charts/TimeValue.kt +++ b/app/src/main/java/com/ivy/wallet/ui/charts/TimeValue.kt @@ -1,7 +1,7 @@ package com.ivy.wallet.ui.charts -import com.ivy.wallet.domain.fp.charts.ChartPeriod -import com.ivy.wallet.domain.fp.charts.SingleChartPoint +import com.ivy.wallet.domain.pure.charts.ChartPeriod +import com.ivy.wallet.domain.pure.charts.SingleChartPoint import com.ivy.wallet.ui.onboarding.model.FromToTimeRange import com.ivy.wallet.ui.theme.components.charts.linechart.Value diff --git a/app/src/main/java/com/ivy/wallet/ui/charts/charts/AccountCharts.kt b/app/src/main/java/com/ivy/wallet/ui/charts/charts/AccountCharts.kt index a0ddefe7d6..c752d4ad19 100644 --- a/app/src/main/java/com/ivy/wallet/ui/charts/charts/AccountCharts.kt +++ b/app/src/main/java/com/ivy/wallet/ui/charts/charts/AccountCharts.kt @@ -1,7 +1,7 @@ package com.ivy.wallet.ui.charts.charts import androidx.compose.foundation.lazy.LazyListScope -import com.ivy.wallet.domain.fp.charts.ChartPeriod +import com.ivy.wallet.domain.pure.charts.ChartPeriod fun LazyListScope.accountCharts(period: ChartPeriod) { diff --git a/app/src/main/java/com/ivy/wallet/ui/charts/charts/CategoryCharts.kt b/app/src/main/java/com/ivy/wallet/ui/charts/charts/CategoryCharts.kt index c1297b8931..3c929e0879 100644 --- a/app/src/main/java/com/ivy/wallet/ui/charts/charts/CategoryCharts.kt +++ b/app/src/main/java/com/ivy/wallet/ui/charts/charts/CategoryCharts.kt @@ -17,7 +17,7 @@ import com.ivy.design.l0_system.UI import com.ivy.design.l0_system.style import com.ivy.wallet.R import com.ivy.wallet.domain.data.entity.Category -import com.ivy.wallet.domain.fp.charts.ChartPeriod +import com.ivy.wallet.domain.pure.charts.ChartPeriod import com.ivy.wallet.stringRes import com.ivy.wallet.ui.charts.CategoryValues import com.ivy.wallet.ui.charts.toValue diff --git a/app/src/main/java/com/ivy/wallet/ui/charts/charts/WalletCharts.kt b/app/src/main/java/com/ivy/wallet/ui/charts/charts/WalletCharts.kt index 97ca7c9977..30b6e2f712 100644 --- a/app/src/main/java/com/ivy/wallet/ui/charts/charts/WalletCharts.kt +++ b/app/src/main/java/com/ivy/wallet/ui/charts/charts/WalletCharts.kt @@ -13,8 +13,8 @@ import androidx.compose.ui.unit.dp import com.ivy.design.l0_system.UI import com.ivy.design.l0_system.style import com.ivy.wallet.R -import com.ivy.wallet.domain.fp.charts.ChartPeriod -import com.ivy.wallet.domain.fp.charts.SingleChartPoint +import com.ivy.wallet.domain.pure.charts.ChartPeriod +import com.ivy.wallet.domain.pure.charts.SingleChartPoint import com.ivy.wallet.ui.charts.toValues2 import com.ivy.wallet.ui.theme.Green import com.ivy.wallet.ui.theme.Ivy diff --git a/app/src/main/java/com/ivy/wallet/ui/home/HomeState.kt b/app/src/main/java/com/ivy/wallet/ui/home/HomeState.kt index 1aab9a51ac..4322117f96 100644 --- a/app/src/main/java/com/ivy/wallet/ui/home/HomeState.kt +++ b/app/src/main/java/com/ivy/wallet/ui/home/HomeState.kt @@ -5,8 +5,8 @@ import com.ivy.wallet.domain.data.TransactionHistoryItem import com.ivy.wallet.domain.data.entity.Account import com.ivy.wallet.domain.data.entity.Category import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.data.IncomeExpensePair import com.ivy.wallet.domain.logic.model.CustomerJourneyCardData +import com.ivy.wallet.domain.pure.data.IncomeExpensePair import com.ivy.wallet.ui.IvyWalletCtx import com.ivy.wallet.ui.onboarding.model.TimePeriod import java.math.BigDecimal diff --git a/app/src/main/java/com/ivy/wallet/ui/home/HomeViewModel.kt b/app/src/main/java/com/ivy/wallet/ui/home/HomeViewModel.kt index cc1efa8ce7..493c84fe2e 100644 --- a/app/src/main/java/com/ivy/wallet/ui/home/HomeViewModel.kt +++ b/app/src/main/java/com/ivy/wallet/ui/home/HomeViewModel.kt @@ -9,13 +9,13 @@ import com.ivy.wallet.domain.action.wallet.CalcOverdueAct import com.ivy.wallet.domain.action.wallet.CalcUpcomingAct import com.ivy.wallet.domain.action.wallet.CalcWalletBalanceAct import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.data.WalletDAOs -import com.ivy.wallet.domain.fp.wallet.calculateWalletIncomeExpense -import com.ivy.wallet.domain.fp.wallet.walletBufferDiff import com.ivy.wallet.domain.logic.CustomerJourneyLogic import com.ivy.wallet.domain.logic.PlannedPaymentsLogic import com.ivy.wallet.domain.logic.currency.ExchangeRatesLogic import com.ivy.wallet.domain.logic.model.CustomerJourneyCardData +import com.ivy.wallet.domain.pure.data.WalletDAOs +import com.ivy.wallet.domain.pure.wallet.calculateWalletIncomeExpense +import com.ivy.wallet.domain.pure.wallet.walletBufferDiff import com.ivy.wallet.io.persistence.SharedPrefs import com.ivy.wallet.io.persistence.dao.CategoryDao import com.ivy.wallet.io.persistence.dao.SettingsDao diff --git a/app/src/main/java/com/ivy/wallet/ui/onboarding/model/FromToTimeRange.kt b/app/src/main/java/com/ivy/wallet/ui/onboarding/model/FromToTimeRange.kt index 8921b93819..f55b812796 100644 --- a/app/src/main/java/com/ivy/wallet/ui/onboarding/model/FromToTimeRange.kt +++ b/app/src/main/java/com/ivy/wallet/ui/onboarding/model/FromToTimeRange.kt @@ -1,9 +1,7 @@ package com.ivy.wallet.ui.onboarding.model -import com.ivy.wallet.R import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.data.ClosedTimeRange -import com.ivy.wallet.stringRes +import com.ivy.wallet.domain.pure.data.ClosedTimeRange import com.ivy.wallet.utils.* import java.time.LocalDateTime @@ -38,13 +36,13 @@ data class FromToTimeRange( "${from.toLocalDate().formatDateOnly()} - ${to.toLocalDate().formatDateOnly()}" } from != null && to == null -> { - stringRes(R.string.from_date, from.toLocalDate().formatDateOnly()) + "From ${from.toLocalDate().formatDateOnly()}" } from == null && to != null -> { - stringRes(R.string.to_date, to.toLocalDate().formatDateOnly()) + "To ${to.toLocalDate().formatDateOnly()}" } else -> { - stringRes(R.string.range) + "Range" } } } diff --git a/app/src/main/java/com/ivy/wallet/ui/reports/ReportViewModel.kt b/app/src/main/java/com/ivy/wallet/ui/reports/ReportViewModel.kt index b818810f0e..f77ff4c575 100644 --- a/app/src/main/java/com/ivy/wallet/ui/reports/ReportViewModel.kt +++ b/app/src/main/java/com/ivy/wallet/ui/reports/ReportViewModel.kt @@ -10,11 +10,11 @@ import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.data.entity.Account import com.ivy.wallet.domain.data.entity.Category import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.wallet.withDateDividers import com.ivy.wallet.domain.logic.PlannedPaymentsLogic import com.ivy.wallet.domain.logic.WalletLogic import com.ivy.wallet.domain.logic.csv.ExportCSVLogic import com.ivy.wallet.domain.logic.currency.ExchangeRatesLogic +import com.ivy.wallet.domain.pure.wallet.withDateDividers import com.ivy.wallet.io.persistence.dao.* import com.ivy.wallet.ui.IvyWalletCtx import com.ivy.wallet.ui.RootActivity diff --git a/app/src/main/java/com/ivy/wallet/ui/statistic/level1/PieChartStatisticViewModel.kt b/app/src/main/java/com/ivy/wallet/ui/statistic/level1/PieChartStatisticViewModel.kt index 0a0f898908..dced3748e3 100644 --- a/app/src/main/java/com/ivy/wallet/ui/statistic/level1/PieChartStatisticViewModel.kt +++ b/app/src/main/java/com/ivy/wallet/ui/statistic/level1/PieChartStatisticViewModel.kt @@ -7,13 +7,13 @@ import com.ivy.wallet.R import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.data.entity.Category import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.category.calculateCategoryExpenseWithAccountFilters -import com.ivy.wallet.domain.fp.category.calculateCategoryIncomeWithAccountFilters -import com.ivy.wallet.domain.fp.data.WalletDAOs -import com.ivy.wallet.domain.fp.wallet.calculateWalletExpenseWithAccountFilters -import com.ivy.wallet.domain.fp.wallet.calculateWalletIncomeWithAccountFilters import com.ivy.wallet.domain.logic.currency.ExchangeRatesLogic import com.ivy.wallet.domain.logic.currency.sumInBaseCurrency +import com.ivy.wallet.domain.pure.category.calculateCategoryExpenseWithAccountFilters +import com.ivy.wallet.domain.pure.category.calculateCategoryIncomeWithAccountFilters +import com.ivy.wallet.domain.pure.data.WalletDAOs +import com.ivy.wallet.domain.pure.wallet.calculateWalletExpenseWithAccountFilters +import com.ivy.wallet.domain.pure.wallet.calculateWalletIncomeWithAccountFilters import com.ivy.wallet.io.persistence.dao.CategoryDao import com.ivy.wallet.io.persistence.dao.SettingsDao import com.ivy.wallet.io.persistence.dao.TransactionDao diff --git a/app/src/main/java/com/ivy/wallet/ui/statistic/level2/ItemStatisticViewModel.kt b/app/src/main/java/com/ivy/wallet/ui/statistic/level2/ItemStatisticViewModel.kt index d3f4d9656b..ee078878f3 100644 --- a/app/src/main/java/com/ivy/wallet/ui/statistic/level2/ItemStatisticViewModel.kt +++ b/app/src/main/java/com/ivy/wallet/ui/statistic/level2/ItemStatisticViewModel.kt @@ -10,14 +10,14 @@ import com.ivy.wallet.domain.data.TransactionType import com.ivy.wallet.domain.data.entity.Account import com.ivy.wallet.domain.data.entity.Category import com.ivy.wallet.domain.data.entity.Transaction -import com.ivy.wallet.domain.fp.account.calculateAccountBalance -import com.ivy.wallet.domain.fp.account.calculateAccountIncomeExpense -import com.ivy.wallet.domain.fp.data.WalletDAOs -import com.ivy.wallet.domain.fp.exchangeToBaseCurrency -import com.ivy.wallet.domain.fp.wallet.baseCurrencyCode -import com.ivy.wallet.domain.fp.wallet.withDateDividers import com.ivy.wallet.domain.logic.* import com.ivy.wallet.domain.logic.currency.ExchangeRatesLogic +import com.ivy.wallet.domain.pure.account.calculateAccountBalance +import com.ivy.wallet.domain.pure.account.calculateAccountIncomeExpense +import com.ivy.wallet.domain.pure.data.WalletDAOs +import com.ivy.wallet.domain.pure.exchangeToBaseCurrency +import com.ivy.wallet.domain.pure.wallet.baseCurrencyCode +import com.ivy.wallet.domain.pure.wallet.withDateDividers import com.ivy.wallet.domain.sync.uploader.AccountUploader import com.ivy.wallet.domain.sync.uploader.CategoryUploader import com.ivy.wallet.io.persistence.dao.*