mirror of
https://github.com/actualbudget/actual.git
synced 2026-03-09 03:32:54 -05:00
Add reports to command bar (#7002)
* Add reports to command bar * Add release notes
This commit is contained in:
@@ -25,6 +25,7 @@ import { Command } from 'cmdk';
|
||||
import { CellValue, CellValueText } from './spreadsheet/CellValue';
|
||||
|
||||
import { useAccounts } from '@desktop-client/hooks/useAccounts';
|
||||
import { useDashboardPages } from '@desktop-client/hooks/useDashboardPages';
|
||||
import { useMetadataPref } from '@desktop-client/hooks/useMetadataPref';
|
||||
import { useModalState } from '@desktop-client/hooks/useModalState';
|
||||
import { useNavigate } from '@desktop-client/hooks/useNavigate';
|
||||
@@ -143,6 +144,7 @@ export function CommandBar() {
|
||||
|
||||
const allAccounts = useAccounts();
|
||||
const { data: customReports = [] } = useReports();
|
||||
const { data: dashboardPages = [] } = useDashboardPages();
|
||||
|
||||
const accounts = allAccounts.filter(acc => !acc.closed);
|
||||
|
||||
@@ -220,6 +222,15 @@ export function CommandBar() {
|
||||
],
|
||||
onSelect: ({ id }) => handleNavigate(`/accounts/${id}`),
|
||||
},
|
||||
{
|
||||
key: 'reports',
|
||||
heading: t('Reports'),
|
||||
items: dashboardPages.map(dashboardPage => ({
|
||||
...dashboardPage,
|
||||
Icon: SvgReports,
|
||||
})),
|
||||
onSelect: ({ id }) => handleNavigate(`/reports/${id}`),
|
||||
},
|
||||
{
|
||||
key: 'reports-custom',
|
||||
heading: t('Custom Reports'),
|
||||
|
||||
6
upcoming-release-notes/7002.md
Normal file
6
upcoming-release-notes/7002.md
Normal file
@@ -0,0 +1,6 @@
|
||||
---
|
||||
category: Enhancements
|
||||
authors: [bonroyage]
|
||||
---
|
||||
|
||||
Add reports to command bar
|
||||
Reference in New Issue
Block a user