mirror of
https://github.com/umami-software/umami.git
synced 2026-02-13 00:55:37 +01:00
Refactored queries.
This commit is contained in:
parent
18e36aa7b3
commit
b16f5cc067
67 changed files with 523 additions and 576 deletions
27
src/app/(main)/teams/[teamId]/reports/TeamReports.tsx
Normal file
27
src/app/(main)/teams/[teamId]/reports/TeamReports.tsx
Normal file
|
|
@ -0,0 +1,27 @@
|
|||
'use client';
|
||||
import Link from 'next/link';
|
||||
import { Button, Flexbox, Icon, Icons, Text } from 'react-basics';
|
||||
import { useMessages } from 'components/hooks';
|
||||
import ReportsDataTable from 'app/(main)/reports/ReportsDataTable';
|
||||
|
||||
export function TeamReports({ websiteId }) {
|
||||
const { formatMessage, labels } = useMessages();
|
||||
|
||||
return (
|
||||
<>
|
||||
<Flexbox alignItems="center" justifyContent="end">
|
||||
<Link href={`/reports/create`}>
|
||||
<Button variant="primary">
|
||||
<Icon>
|
||||
<Icons.Plus />
|
||||
</Icon>
|
||||
<Text>{formatMessage(labels.createReport)}</Text>
|
||||
</Button>
|
||||
</Link>
|
||||
</Flexbox>
|
||||
<ReportsDataTable websiteId={websiteId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
|
||||
export default TeamReports;
|
||||
10
src/app/(main)/teams/[teamId]/reports/create/page.tsx
Normal file
10
src/app/(main)/teams/[teamId]/reports/create/page.tsx
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
import { Metadata } from 'next';
|
||||
import ReportTemplates from 'app/(main)/reports/create/ReportTemplates';
|
||||
|
||||
export default function () {
|
||||
return <ReportTemplates />;
|
||||
}
|
||||
|
||||
export const metadata: Metadata = {
|
||||
title: 'Create Report | umami',
|
||||
};
|
||||
15
src/app/(main)/teams/[teamId]/reports/page.tsx
Normal file
15
src/app/(main)/teams/[teamId]/reports/page.tsx
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
import { Metadata } from 'next';
|
||||
import ReportsHeader from 'app/(main)/reports/ReportsHeader';
|
||||
import ReportsDataTable from 'app/(main)/reports/ReportsDataTable';
|
||||
|
||||
export default function ({ params: { teamId } }) {
|
||||
return (
|
||||
<>
|
||||
<ReportsHeader />
|
||||
<ReportsDataTable teamId={teamId} />
|
||||
</>
|
||||
);
|
||||
}
|
||||
export const metadata: Metadata = {
|
||||
title: 'Reports | umami',
|
||||
};
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
import WebsiteDetails from '../../../../websites/[websiteId]/WebsiteDetails';
|
||||
import WebsiteDetails from 'app/(main)/websites/[websiteId]/WebsiteDetails';
|
||||
|
||||
export default function TeamWebsitePage({ params: { websiteId } }) {
|
||||
return <WebsiteDetails websiteId={websiteId} />;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue