Reword the overspending banner for tracking budget. (#5307)

* no hidden

* changes for tracking

* note and cleanup

* sentance case

* exclude income categories

* Update VRT

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
This commit is contained in:
youngcw
2025-07-08 20:02:50 -07:00
committed by GitHub
parent 4be7e03570
commit 64f4d200dd
48 changed files with 26 additions and 5 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 32 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 31 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 30 KiB

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 28 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 28 KiB

After

Width:  |  Height:  |  Size: 28 KiB

View File

@@ -639,18 +639,29 @@ function OverspendingBanner({ month, onBudgetAction, budgetType, ...props }) {
modal: {
name: 'category-autocomplete',
options: {
title: t('Cover overspending'),
title:
budgetType === 'envelope'
? t('Cover overspending')
: t('Overspent categories'),
month,
categoryGroups: categoryGroupsToShow,
showHiddenCategories: true,
onSelect: onOpenCoverCategoryModal,
onSelect:
budgetType === 'envelope' ? onOpenCoverCategoryModal : null,
clearOnSelect: true,
closeOnSelect: false,
},
},
}),
);
}, [categoryGroupsToShow, dispatch, month, onOpenCoverCategoryModal, t]);
}, [
categoryGroupsToShow,
dispatch,
month,
onOpenCoverCategoryModal,
t,
budgetType,
]);
const numberOfOverspentCategories = overspentCategories.length;
if (numberOfOverspentCategories === 0) {
@@ -682,7 +693,8 @@ function OverspendingBanner({ month, onBudgetAction, budgetType, ...props }) {
</Text>
</View>
<Button onPress={onOpenCategorySelectionModal} style={PILL_STYLE}>
<Trans>Cover</Trans>
{budgetType === 'envelope' && <Trans>Cover</Trans>}
{budgetType === 'tracking' && <Trans>View</Trans>}
</Button>
</View>
</Banner>

View File

@@ -116,7 +116,10 @@ export function useOverspentCategories({ month }: UseOverspentCategoriesProps) {
return useMemo(
() =>
categories.filter(category => overspentCategoryIds.includes(category.id)),
categories.filter(
category =>
overspentCategoryIds.includes(category.id) && !category.is_income,
),
[categories, overspentCategoryIds],
);
}

View File

@@ -0,0 +1,6 @@
---
category: Enhancements
authors: [youngcw]
---
Reword button and title of the overspending banner when in tracking budget