mirror of
https://github.com/umami-software/umami.git
synced 2026-02-04 04:37:11 +01:00
Merge remote-tracking branch 'origin/dev' into dev
This commit is contained in:
commit
3a332b5947
40 changed files with 354 additions and 177 deletions
|
|
@ -7,7 +7,7 @@ import { BoardAddButton } from './BoardAddButton';
|
|||
export function BoardsPage() {
|
||||
return (
|
||||
<PageBody>
|
||||
<Column>
|
||||
<Column margin="2">
|
||||
<PageHeader title="My Boards">
|
||||
<BoardAddButton />
|
||||
</PageHeader>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export function LinksPage() {
|
|||
|
||||
return (
|
||||
<PageBody>
|
||||
<Column gap="6">
|
||||
<Column gap="6" margin="2">
|
||||
<PageHeader title={formatMessage(labels.links)}>
|
||||
<LinkAddButton teamId={teamId} />
|
||||
</PageHeader>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export function PixelsPage() {
|
|||
|
||||
return (
|
||||
<PageBody>
|
||||
<Column gap="6">
|
||||
<Column gap="6" margin="2">
|
||||
<PageHeader title={formatMessage(labels.pixels)}>
|
||||
<PixelAddButton teamId={teamId} />
|
||||
</PageHeader>
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ export function WebsitesPage() {
|
|||
|
||||
return (
|
||||
<PageBody>
|
||||
<Column gap="6">
|
||||
<Column gap="6" margin="2">
|
||||
<PageHeader title={formatMessage(labels.websites)}>
|
||||
<WebsiteAddButton teamId={teamId} />
|
||||
</PageHeader>
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ export function RevenuePage({ websiteId }: { websiteId: string }) {
|
|||
|
||||
return (
|
||||
<Column gap>
|
||||
<WebsiteControls websiteId={websiteId} allowFilter={false} />
|
||||
<WebsiteControls websiteId={websiteId} />
|
||||
<Revenue websiteId={websiteId} startDate={startDate} endDate={endDate} />
|
||||
</Column>
|
||||
);
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ export function CohortDeleteButton({
|
|||
const { formatMessage, labels } = useMessages();
|
||||
const { del, useMutation } = useApi();
|
||||
const { mutate, isPending, error } = useMutation({
|
||||
mutationFn: () => del(`/websites/${websiteId}/cohorts/${cohortId}`),
|
||||
mutationFn: () => del(`/websites/${websiteId}/segments/${cohortId}`),
|
||||
});
|
||||
const { touch } = useModified();
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import { canUpdateWebsite, canViewWebsite } from '@/validations';
|
||||
import { uuid } from '@/lib/crypto';
|
||||
import { parseRequest } from '@/lib/request';
|
||||
import { getQueryFilters, parseRequest } from '@/lib/request';
|
||||
import { json, unauthorized } from '@/lib/response';
|
||||
import { segmentTypeParam, searchParams } from '@/lib/schema';
|
||||
import { createSegment, getWebsiteSegments } from '@/queries';
|
||||
|
|
@ -28,7 +28,9 @@ export async function GET(
|
|||
return unauthorized();
|
||||
}
|
||||
|
||||
const segments = await getWebsiteSegments(websiteId, type);
|
||||
const filters = await getQueryFilters(query);
|
||||
|
||||
const segments = await getWebsiteSegments(websiteId, type, filters);
|
||||
|
||||
return json(segments);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue