A local-first personal finance app
Add reports to command bar (#7002)
Royd3f2f1f7ae30
diff --git a/packages/desktop-client/src/components/CommandBar.tsx b/packages/desktop-client/src/components/CommandBar.tsxindex c039205e59..d7f4f3ea79 100644--- a/packages/desktop-client/src/components/CommandBar.tsx+++ b/packages/desktop-client/src/components/CommandBar.tsx@@ -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'),diff --git a/upcoming-release-notes/7002.md b/upcoming-release-notes/7002.mdnew file mode 100644index 0000000000..c136b3c08c--- /dev/null+++ b/upcoming-release-notes/7002.md@@ -0,0 +1,6 @@+---+category: Enhancements+authors: [bonroyage]+---++Add reports to command bar