Frontend Release 3: Add group-by:tag
Implement the same pattern as other group-by options (from, card, category, merchant), but without a suggested search.
-
Add the ability to Group By Tag from Reports > Expenses (group-by:tag)
- Follow the pattern used for
group-by:from in Top Spenders.
- src/CONST/index.ts - Add
TAG: 'tag' to CONST.SEARCH.GROUP_BY
- src/languages/en.ts (and all language files) - Add
[CONST.SEARCH.GROUP_BY.TAG]: 'Tag' to search.filters.groupBy
-
Add "Tag" to Group Columns on Search Columns Page (follow the same pattern as existing group columns: FROM, CARD, WITHDRAWAL_ID, CATEGORY, MERCHANT)
- Define the GROUP_TAG table column constant in the TABLE_COLUMNS object - src/CONST/index.ts
- Add a TAG entry to GROUP_CUSTOM_COLUMNS to define which group columns are available when grouping by tag. Include tag, expenses, total - src/CONST/index.ts
- Add a TAG entry to GROUP_DEFAULT_COLUMNS that specifies the default columns to show when grouping by tag - src/CONST/index.ts
- Add a user friendly name mapping for the GROUP_TAG column - src/CONST/index.ts
- Handle the TAG case in
getCustomColumns() to return the tag custom columns - src/libs/SearchUIUtils.ts
- Handle the TAG case in
getCustomColumnDefault() to return the default tag columns - src/libs/SearchUIUtils.ts
- Add TAG mappings to both the
customColumns and defaultCustomColumns objects in getColumnsToShow() - src/libs/SearchUIUtils.ts
- Add a conditional check in
getColumnsToShow() to ensure required columns (AVATAR and GROUP_TAG) are always included when grouping by tag - src/libs/SearchUIUtils.ts
- Add a case for GROUP_TAG in
getSearchColumnTranslationKey() that returns the tag translation key - src/libs/SearchUIUtils.ts
- Add GROUP_TAG to the required columns set so it cannot be hidden on the Search Columns Page - src/pages/Search/SearchColumnsPage.tsx
- Add a case for TAG in
getTransactionGroupHeaders() that returns the appropriate column header configuration - src/components/SelectionListWithSections/SearchTableHeader.tsx
- Update the SearchCustomColumnIds type to include the tag custom column values - src/components/Search/types.ts
Issue Owner
Current Issue Owner: @suneox
Frontend Release 3: Add
group-by:tagImplement the same pattern as other group-by options (from, card, category, merchant), but without a suggested search.
Add the ability to Group By Tag from Reports > Expenses (
group-by:tag)group-by:fromin Top Spenders.TAG: 'tag'toCONST.SEARCH.GROUP_BY[CONST.SEARCH.GROUP_BY.TAG]: 'Tag'tosearch.filters.groupByAdd "Tag" to Group Columns on Search Columns Page (follow the same pattern as existing group columns: FROM, CARD, WITHDRAWAL_ID, CATEGORY, MERCHANT)
getCustomColumns()to return the tag custom columns - src/libs/SearchUIUtils.tsgetCustomColumnDefault()to return the default tag columns - src/libs/SearchUIUtils.tscustomColumnsanddefaultCustomColumnsobjects ingetColumnsToShow()- src/libs/SearchUIUtils.tsgetColumnsToShow()to ensure required columns (AVATAR and GROUP_TAG) are always included when grouping by tag - src/libs/SearchUIUtils.tsgetSearchColumnTranslationKey()that returns the tag translation key - src/libs/SearchUIUtils.tsgetTransactionGroupHeaders()that returns the appropriate column header configuration - src/components/SelectionListWithSections/SearchTableHeader.tsxIssue Owner
Current Issue Owner: @suneox