NTP-71864 | Naman Khurmi | bottom-sheet changes. (#16501)

This commit is contained in:
Naman Khurmi
2025-06-09 16:40:55 +05:30
committed by GitHub
parent a44b029117
commit 0656381b52
3 changed files with 20 additions and 3 deletions

View File

@@ -95,7 +95,23 @@ constructor(
methodName = ::getSpendAnalysisScreenData.name,
flow = database.get().transactionsDao().fetchAllTransactions(startDate, endDate),
)
.map { transactions ->
.map { transactionList ->
val accountMap =
executeQueryFirst(
queryName = database.get().accountsDao()::fetchAllAccounts.name,
methodName = ::getSpendAnalysisScreenData.name,
flow = database.get().accountsDao().fetchAllAccounts(),
)
.associateBy { it.linkedAccRef }
val transactions =
transactionList.map { transaction ->
transaction.copy(
bankIconUrl =
accountMap[transaction.linkedAccRef.orEmpty()]?.bankIconUrl
)
}
Timber.tag("money_manager")
.d(
"SpendAnalysisDataProvider ${::getSpendAnalysisScreenData.name}: transactions fetched from DB"

View File

@@ -50,6 +50,7 @@ import com.navi.moneymanager.common.illustration.repository.ImageRepository.Comp
import com.navi.moneymanager.common.illustration.ui.Illustration
import com.navi.moneymanager.common.ui.composable.base.MMText
import com.navi.moneymanager.preonboard.launcher.model.ProgressBarBottomSheetData
import com.navi.naviwidgets.utils.formatAmount
@Composable
fun ProgressBarBottomSheet(
@@ -228,7 +229,7 @@ private fun GoalSetProgressBarBottomSheet(
append(
buildString {
append(stringResource(R.string.spend_goal_bracket))
append(((data.progress)?.times(100)?.toInt().toString()))
append(data.progress?.times(100)?.toInt()?.formatAmount().toString())
append(stringResource(R.string.percent_bracket))
}
)

View File

@@ -161,7 +161,7 @@
<string name="past_months_can_t_have_spend_goals">Past months cant have spend goals</string>
<string name="of_spend_goal">of spend goal</string>
<string name="spent">"Spent "</string>
<string name="exhausted_exceeded">Exhausted / exceeded </string>
<string name="exhausted_exceeded">"Exhausted / exceeded "</string>
<string name="your_selected_spend_goal_is_lower_than_what_you_ve_already_spent">Your selected spend goal is lower than what you\'ve already spent.</string>
<string name="are_you_sure_this_is_what_you_want">Are you sure this is what you want?</string>
<string name="go_back">Go back</string>