mirror of
https://github.com/umami-software/umami.git
synced 2026-02-09 15:17:23 +01:00
New reports screens.
This commit is contained in:
parent
293e84acab
commit
2b13002f1b
9 changed files with 101 additions and 14 deletions
13
pages/reports/create.js
Normal file
13
pages/reports/create.js
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
import AppLayout from 'components/layout/AppLayout';
|
||||
import ReportTemplates from 'components/pages/reports/ReportTemplates';
|
||||
import { useMessages } from 'hooks';
|
||||
|
||||
export default function ReportsPage() {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.reports)}>
|
||||
<ReportTemplates />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
|
@ -1,21 +1,13 @@
|
|||
import { useState } from 'react';
|
||||
import { Item, Tabs } from 'react-basics';
|
||||
import AppLayout from 'components/layout/AppLayout';
|
||||
import ReportList from 'components/pages/reports/ReportList';
|
||||
import useMessages from 'hooks/useMessages';
|
||||
import ReportsList from 'components/pages/reports/ReportsList';
|
||||
|
||||
export default function ReportsPage() {
|
||||
const [tab, setTab] = useState('create');
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<AppLayout title={formatMessage(labels.reports)}>
|
||||
<Tabs selectedKey={tab} onSelect={setTab} style={{ marginBottom: 30, fontSize: 14 }}>
|
||||
<Item key="create">{formatMessage(labels.reports)}</Item>
|
||||
<Item key="saved">{formatMessage(labels.save)}</Item>
|
||||
</Tabs>
|
||||
{tab === 'create' && <ReportList />}
|
||||
{tab === 'saved' && <h1>My reports</h1>}
|
||||
<ReportsList />
|
||||
</AppLayout>
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue