Skip to content
This repository has been archived by the owner on Nov 5, 2024. It is now read-only.

Commit

Permalink
Add confirmation to Skip All overdue payments functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
jevo160296 committed May 27, 2022
1 parent eada8a2 commit 2e07cc1
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
13 changes: 12 additions & 1 deletion app/src/main/java/com/ivy/wallet/ui/home/HomeTab.kt
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ private fun BoxWithConstraintsScope.UI(
mutableStateOf(null)
}
var moreMenuExpanded by remember { mutableStateOf(ivyContext.moreMenuExpanded) }
var skipAllModalVisible by remember { mutableStateOf(false) }
val setMoreMenuExpanded = { expanded: Boolean ->
moreMenuExpanded = expanded
ivyContext.setMoreMenuExpanded(expanded)
Expand Down Expand Up @@ -255,7 +256,7 @@ private fun BoxWithConstraintsScope.UI(
onPayOrGet = onPayOrGet,
onDismiss = onDismissCustomerJourneyCard,
onSkipTransaction = onSkipTransaction,
onSkipAllTransactions = onSkipAllTransactions
onSkipAllTransactions = { skipAllModalVisible = true }
)
}

Expand Down Expand Up @@ -306,6 +307,16 @@ private fun BoxWithConstraintsScope.UI(
) {
onSetPeriod(it)
}

DeleteModal(
visible = skipAllModalVisible,
title = stringResource(R.string.confirm_skip_all),
description = stringResource(R.string.confirm_skip_all_description),
dismiss = { skipAllModalVisible = false }
) {
onSkipAllTransactions(overdue)
skipAllModalVisible = false
}
}

@ExperimentalAnimationApi
Expand Down
2 changes: 2 additions & 0 deletions app/src/main/res/values-es/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,6 @@
<string name="generating_report">Generando reporte…</string>
<string name="sort_by">" Ordenar por"</string>
<string name="skip_all">Saltar todo</string>
<string name="confirm_skip_all">Confirmar saltar todo</string>
<string name="confirm_skip_all_description">¿Está seguro de saltar todas las transacciones planeadas caducadas?</string>
</resources>
2 changes: 2 additions & 0 deletions app/src/main/res/values/strings.xml
Original file line number Diff line number Diff line change
Expand Up @@ -429,4 +429,6 @@
<string name="generating_report">Generating report…</string>
<string name="sort_by">Sort by</string>
<string name="skip_all">Skip all</string>
<string name="confirm_skip_all">Confirm skip all</string>
<string name="confirm_skip_all_description">Are you sure that you want to skip all overdue planned transactions?</string>
</resources>

0 comments on commit 2e07cc1

Please sign in to comment.