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>
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 33 KiB After Width: | Height: | Size: 33 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 32 KiB After Width: | Height: | Size: 32 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 31 KiB After Width: | Height: | Size: 31 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 25 KiB After Width: | Height: | Size: 25 KiB |
|
Before Width: | Height: | Size: 24 KiB After Width: | Height: | Size: 24 KiB |
|
Before Width: | Height: | Size: 27 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 26 KiB After Width: | Height: | Size: 26 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 30 KiB After Width: | Height: | Size: 30 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 29 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 27 KiB |
|
Before Width: | Height: | Size: 29 KiB After Width: | Height: | Size: 28 KiB |
|
Before Width: | Height: | Size: 28 KiB After Width: | Height: | Size: 28 KiB |
@@ -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>
|
||||
|
||||
@@ -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],
|
||||
);
|
||||
}
|
||||
|
||||
6
upcoming-release-notes/5307.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Enhancements
|
||||
authors: [youngcw]
|
||||
---
|
||||
|
||||
Reword button and title of the overspending banner when in tracking budget
|
||||