Refactored queries.
This commit is contained in:
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} />;
|
||||
|
||||
Reference in New Issue
Block a user