Funnel report updates. Fixed insights report.

This commit is contained in:
Mike Cao 2024-04-03 14:44:49 -07:00
parent 3aee54009c
commit cf8d49f867
8 changed files with 94 additions and 47 deletions

View file

@ -191,7 +191,7 @@ export default function FieldFilterEditForm({
)}
</Flexbox>
<Button variant="primary" onClick={handleAdd} disabled={isDisabled}>
{isNew ? formatMessage(labels.add) : formatMessage(labels.update)}
{formatMessage(isNew ? labels.add : labels.update)}
</Button>
</FormRow>
</Form>

View file

@ -74,7 +74,8 @@ export function FilterParameters() {
return (
<ParameterList.Item key={name} onRemove={() => handleRemove(name)}>
<FilterParameter
{...dateRange}
startDate={dateRange.startDate}
endDate={dateRange.endDate}
websiteId={websiteId}
name={name}
label={label}

View file

@ -4,6 +4,7 @@ import Icons from 'components/icons';
import Empty from 'components/common/Empty';
import { useMessages } from 'components/hooks';
import styles from './ParameterList.module.css';
import classNames from 'classnames';
export interface ParameterListProps {
children?: ReactNode;
@ -22,15 +23,17 @@ export function ParameterList({ children }: ParameterListProps) {
const Item = ({
children,
className,
onClick,
onRemove,
}: {
children?: ReactNode;
className?: string;
onClick?: () => void;
onRemove?: () => void;
}) => {
return (
<div className={styles.item} onClick={onClick}>
<div className={classNames(styles.item, className)} onClick={onClick}>
{children}
<Icon onClick={onRemove}>
<Icons.Close />