mirror of
https://github.com/umami-software/umami.git
synced 2026-02-14 01:25:37 +01:00
Moved code into src folder. Added build for component library.
This commit is contained in:
parent
7a7233ead4
commit
ede658771e
490 changed files with 749 additions and 442 deletions
33
src/components/pages/reports/retention/RetentionReport.js
Normal file
33
src/components/pages/reports/retention/RetentionReport.js
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
import RetentionTable from './RetentionTable';
|
||||
import RetentionParameters from './RetentionParameters';
|
||||
import Report from '../Report';
|
||||
import ReportHeader from '../ReportHeader';
|
||||
import ReportMenu from '../ReportMenu';
|
||||
import ReportBody from '../ReportBody';
|
||||
import Magnet from 'assets/magnet.svg';
|
||||
import { REPORT_TYPES } from 'lib/constants';
|
||||
import { parseDateRange } from 'lib/date';
|
||||
import { endOfMonth, startOfMonth } from 'date-fns';
|
||||
|
||||
const defaultParameters = {
|
||||
type: REPORT_TYPES.retention,
|
||||
parameters: {
|
||||
dateRange: parseDateRange(
|
||||
`range:${startOfMonth(new Date()).getTime()}:${endOfMonth(new Date()).getTime()}`,
|
||||
),
|
||||
},
|
||||
};
|
||||
|
||||
export default function RetentionReport({ reportId }) {
|
||||
return (
|
||||
<Report reportId={reportId} defaultParameters={defaultParameters}>
|
||||
<ReportHeader icon={<Magnet />} />
|
||||
<ReportMenu>
|
||||
<RetentionParameters />
|
||||
</ReportMenu>
|
||||
<ReportBody>
|
||||
<RetentionTable />
|
||||
</ReportBody>
|
||||
</Report>
|
||||
);
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue