From 020c0497ba8b37b2b1644f57114e06eb9bac02a2 Mon Sep 17 00:00:00 2001 From: Ephraim Atta-Duncan Date: Thu, 14 Aug 2025 10:17:45 +0000 Subject: [PATCH] chore: minor changes --- .../components/filters/date-range-filter.tsx | 6 +- .../admin-organisation-overview-table.tsx | 42 ++--- .../tables/admin-organisations-table.tsx | 8 +- .../tables/organisation-insights-table.tsx | 67 +++++--- .../routes/_authenticated+/admin+/_layout.tsx | 4 +- .../admin+/documents._index.tsx | 7 +- .../admin+/organisation-insights.$id.tsx | 13 +- .../admin+/organisation-insights._index.tsx | 26 ++-- .../get-organisation-detailed-insights.ts | 146 +++++++++++------- .../server-only/admin/get-signing-volume.ts | 7 +- packages/lib/types/search-params.ts | 2 + 11 files changed, 187 insertions(+), 141 deletions(-) diff --git a/apps/remix/app/components/filters/date-range-filter.tsx b/apps/remix/app/components/filters/date-range-filter.tsx index a4409cc2a..aa79774bd 100644 --- a/apps/remix/app/components/filters/date-range-filter.tsx +++ b/apps/remix/app/components/filters/date-range-filter.tsx @@ -4,6 +4,7 @@ import { msg } from '@lingui/core/macro'; import { useLingui } from '@lingui/react'; import { useUpdateSearchParams } from '@documenso/lib/client-only/hooks/use-update-search-params'; +import type { DateRange } from '@documenso/lib/types/search-params'; import { Select, SelectContent, @@ -13,7 +14,7 @@ import { } from '@documenso/ui/primitives/select'; type DateRangeFilterProps = { - currentRange: string; + currentRange: DateRange; }; export const DateRangeFilter = ({ currentRange }: DateRangeFilterProps) => { @@ -24,7 +25,7 @@ export const DateRangeFilter = ({ currentRange }: DateRangeFilterProps) => { const handleRangeChange = (value: string) => { startTransition(() => { updateSearchParams({ - dateRange: value, + dateRange: value as DateRange, page: 1, }); }); @@ -32,7 +33,6 @@ export const DateRangeFilter = ({ currentRange }: DateRangeFilterProps) => { return (
- {_(msg`Time Range:`)}