Updated cohort processing.
This commit is contained in:
@@ -92,16 +92,9 @@ export function FilterBar({ websiteId }: { websiteId: string }) {
|
||||
</TooltipTrigger>
|
||||
)}
|
||||
<Modal>
|
||||
<Dialog title={formatMessage(labels.segment)} style={{ width: 400 }}>
|
||||
<Dialog title={formatMessage(labels.segment)} style={{ width: 800, minHeight: 300 }}>
|
||||
{({ close }) => {
|
||||
return (
|
||||
<SegmentEditForm
|
||||
websiteId={websiteId}
|
||||
onClose={close}
|
||||
filters={filters}
|
||||
showFilters={false}
|
||||
/>
|
||||
);
|
||||
return <SegmentEditForm websiteId={websiteId} onClose={close} filters={filters} />;
|
||||
}}
|
||||
</Dialog>
|
||||
</Modal>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { useState } from 'react';
|
||||
import { Column, Tabs, TabList, Tab, TabPanel, Row, Button } from '@umami/react-zen';
|
||||
import { useDateRange, useMessages } from '@/components/hooks';
|
||||
import { useMessages } from '@/components/hooks';
|
||||
import { FieldFilters } from '@/components/input/FieldFilters';
|
||||
import { SegmentFilters } from '@/components/input/SegmentFilters';
|
||||
|
||||
@@ -23,10 +23,6 @@ export function FilterEditForm({
|
||||
const [currentFilters, setCurrentFilters] = useState(filters);
|
||||
const [currentSegment, setCurrentSegment] = useState(segmentId);
|
||||
|
||||
const {
|
||||
dateRange: { startDate, endDate },
|
||||
} = useDateRange(websiteId);
|
||||
|
||||
const handleReset = () => {
|
||||
setCurrentFilters([]);
|
||||
setCurrentSegment(null);
|
||||
@@ -49,13 +45,7 @@ export function FilterEditForm({
|
||||
<Tab id="segments">{formatMessage(labels.segments)}</Tab>
|
||||
</TabList>
|
||||
<TabPanel id="fields">
|
||||
<FieldFilters
|
||||
websiteId={websiteId}
|
||||
value={currentFilters}
|
||||
startDate={startDate}
|
||||
endDate={endDate}
|
||||
onSave={setCurrentFilters}
|
||||
/>
|
||||
<FieldFilters websiteId={websiteId} value={currentFilters} onChange={setCurrentFilters} />
|
||||
</TabPanel>
|
||||
<TabPanel id="segments" style={{ height: 400 }}>
|
||||
<SegmentFilters
|
||||
|
||||
Reference in New Issue
Block a user