diff --git a/apps/web/src/app/(dashboard)/documents/page.tsx b/apps/web/src/app/(dashboard)/documents/page.tsx
index f461d58e2..832d7a7af 100644
--- a/apps/web/src/app/(dashboard)/documents/page.tsx
+++ b/apps/web/src/app/(dashboard)/documents/page.tsx
@@ -18,6 +18,7 @@ import {
} from '~/components/(dashboard)/period-selector/types';
import { DocumentStatus } from '~/components/formatter/document-status';
+import { UploadDocument } from '../dashboard/upload-document';
import { DocumentsDataTable } from './data-table';
export type DocumentsPageProps = {
@@ -72,25 +73,11 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage
return (
-
All Documents
-
+
+
Documents
-
- All
-
-
-
-
-
-
-
- {Math.min(stats.DRAFT, 99)}
-
-
-
-
@@ -110,26 +97,30 @@ export default async function DocumentsPage({ searchParams = {} }: DocumentsPage
+
+
+
+
+
+
+ {Math.min(stats.DRAFT, 99)}
+
+
+
+
+
+ All
+
- {/* If we're viewing all documents for all time and there's nuffin we should should an add document component instead */}
- {isNoResults ? (
-
- ) : (
-
- )}
+
);
diff --git a/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx b/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx
index d0927c323..279b8ea43 100644
--- a/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx
+++ b/apps/web/src/components/(dashboard)/layout/desktop-nav.tsx
@@ -14,18 +14,8 @@ export const DesktopNav = ({ className, ...props }: DesktopNavProps) => {
return (
-
- Dashboard
-
- {
)}
>
Documents
-
- {/*
- Settings
*/}
);
diff --git a/apps/web/src/components/formatter/document-status.tsx b/apps/web/src/components/formatter/document-status.tsx
index fbe1e1a3b..4e1ccf742 100644
--- a/apps/web/src/components/formatter/document-status.tsx
+++ b/apps/web/src/components/formatter/document-status.tsx
@@ -13,11 +13,6 @@ type FriendlyStatus = {
};
const FRIENDLY_STATUS_MAP: Record = {
- DRAFT: {
- label: 'Draft',
- icon: File,
- color: 'text-yellow-500',
- },
PENDING: {
label: 'Pending',
icon: Clock,
@@ -28,6 +23,11 @@ const FRIENDLY_STATUS_MAP: Record = {
icon: CheckCircle2,
color: 'text-green-500',
},
+ DRAFT: {
+ label: 'Draft',
+ icon: File,
+ color: 'text-yellow-500',
+ },
};
export type DocumentStatusProps = HTMLAttributes & {
diff --git a/apps/web/src/components/forms/signin.tsx b/apps/web/src/components/forms/signin.tsx
index 449863e71..ae9540869 100644
--- a/apps/web/src/components/forms/signin.tsx
+++ b/apps/web/src/components/forms/signin.tsx
@@ -44,7 +44,7 @@ export const SignInForm = ({ className }: SignInFormProps) => {
await signIn('credentials', {
email,
password,
- callbackUrl: '/dashboard',
+ callbackUrl: '/documents',
}).catch((err) => {
console.error(err);
});
diff --git a/apps/web/src/middleware.ts b/apps/web/src/middleware.ts
index 8aabb75ea..8c7405dbe 100644
--- a/apps/web/src/middleware.ts
+++ b/apps/web/src/middleware.ts
@@ -2,7 +2,7 @@ import { NextRequest, NextResponse } from 'next/server';
export default async function middleware(req: NextRequest) {
if (req.nextUrl.pathname === '/') {
- const redirectUrl = new URL('/dashboard', req.url);
+ const redirectUrl = new URL('/documents', req.url);
return NextResponse.redirect(redirectUrl);
}