diff --git a/apps/web/pages/documents.tsx b/apps/web/pages/documents.tsx index 92dd7c782..f3fb52239 100644 --- a/apps/web/pages/documents.tsx +++ b/apps/web/pages/documents.tsx @@ -18,6 +18,7 @@ import { DocumentStatus } from "@prisma/client"; import { Tooltip as ReactTooltip } from "react-tooltip"; import { Button, IconButton, SelectBox } from "@documenso/ui"; import { NextPageContext } from "next"; +import prisma from "@documenso/prisma"; const DocumentsPage: NextPageWithLayout = (props: any) => { const router = useRouter(); @@ -35,7 +36,7 @@ const DocumentsPage: NextPageWithLayout = (props: any) => { { label: "Last 7 days", value: 7 }, { label: "Last 30 days", value: 30 }, { label: "Last 3 months", value: 90 }, - { label: "Last 12 months", value: 66 }, + { label: "Last 12 months", value: 366 }, ]; const [selectedStatusFilter, setSelectedStatusFilter] = useState( @@ -98,6 +99,8 @@ const DocumentsPage: NextPageWithLayout = (props: any) => { (today.getTime() - documentDate.getTime()) / millisecondsInDay ); + console.log(diffInDays); + // Check if the difference is letss or equal to lastXDays return diffInDays <= lastXDays; } @@ -196,6 +199,12 @@ const DocumentsPage: NextPageWithLayout = (props: any) => { > Status + + Created + {

+ + {new Date(document.created).toLocaleDateString()} +