mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 12:47:13 +01:00
Report parameters.
This commit is contained in:
parent
b10b490088
commit
e7fef80d79
4 changed files with 9 additions and 17 deletions
|
|
@ -25,8 +25,8 @@ export function ReportHeader({ icon }) {
|
|||
if (!report.id) {
|
||||
create(report, {
|
||||
onSuccess: async ({ id }) => {
|
||||
router.push(`/reports/${id}`, null, { shallow: true });
|
||||
showToast({ message: formatMessage(messages.saved), variant: 'success' });
|
||||
router.push(`/reports/${id}`, null, { shallow: true });
|
||||
},
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ import { ReportContext } from 'components/pages/reports/Report';
|
|||
import NoData from 'components/common/NoData';
|
||||
import styles from './EventDataParameters.module.css';
|
||||
import { DATA_TYPES } from 'lib/constants';
|
||||
import BaseParameters from '../BaseParameters';
|
||||
|
||||
function useFields(websiteId, startDate, endDate) {
|
||||
const { get, useQuery } = useApi();
|
||||
|
|
@ -31,16 +32,9 @@ export function EventDataParameters() {
|
|||
runReport(values);
|
||||
};
|
||||
|
||||
if (!websiteId || !dateRange) {
|
||||
return null;
|
||||
}
|
||||
|
||||
if (isLoading) {
|
||||
return <Loading icon="dots" />;
|
||||
}
|
||||
|
||||
return (
|
||||
<Form ref={ref} values={parameters} error={error} onSubmit={handleSubmit}>
|
||||
<BaseParameters />
|
||||
<FormRow label={formatMessage(labels.fields)}>
|
||||
<div className={styles.fields}>
|
||||
{!data?.length && <NoData />}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
import { useContext, useRef, useState } from 'react';
|
||||
import { useContext, useRef } from 'react';
|
||||
import { useMessages } from 'hooks';
|
||||
import {
|
||||
Icon,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue