New goals page. Upgraded prisma.

This commit is contained in:
Mike Cao
2025-05-31 02:11:18 -07:00
parent 99330a1a4d
commit 49bcbfd7f9
65 changed files with 769 additions and 1195 deletions

View File

@@ -1,7 +1,8 @@
import { Button, Icon, Modal, DialogTrigger, Dialog, Text } from '@umami/react-zen';
import { useApi, useMessages, useModified } from '@/components/hooks';
import { useMessages } from '@/components/hooks';
import { Trash } from '@/components/icons';
import { ConfirmationForm } from '@/components/common/ConfirmationForm';
import { useDeleteQuery } from '@/components/hooks/queries/useDeleteQuery';
export function ReportDeleteButton({
reportId,
@@ -13,11 +14,7 @@ export function ReportDeleteButton({
onDelete?: () => void;
}) {
const { formatMessage, labels, messages } = useMessages();
const { del, useMutation } = useApi();
const { mutate, isPending, error } = useMutation({
mutationFn: reportId => del(`/reports/${reportId}`),
});
const { touch } = useModified();
const { mutate, isPending, error, touch } = useDeleteQuery(`/reports/${reportId}`);
const handleConfirm = (close: () => void) => {
mutate(reportId as any, {

View File

@@ -18,7 +18,7 @@ export function InsightsParameters() {
};
return (
<Form values={parameters} onSubmit={handleSubmit} gap="6">
<Form values={parameters} onSubmit={handleSubmit}>
<BaseParameters allowWebsiteSelect={!id} />
{parametersSelected && <FieldParameters />}
{parametersSelected && <FilterParameters />}