diff --git a/apps/app/next.config.ts b/apps/app/next.config.ts
index af2ceb8a0..223327801 100644
--- a/apps/app/next.config.ts
+++ b/apps/app/next.config.ts
@@ -61,6 +61,8 @@ const config: NextConfig = {
],
},
+ serverExternalPackages: ['jspdf'],
+
experimental: {
serverActions: {
// NOTE: Attachment uploads may be sent as base64 strings, which increases payload size.
diff --git a/apps/app/package.json b/apps/app/package.json
index 262fe8df2..4a8e8e4b1 100644
--- a/apps/app/package.json
+++ b/apps/app/package.json
@@ -19,9 +19,6 @@
"@browserbasehq/stagehand": "^3.0.5",
"@calcom/atoms": "^1.0.102-framer",
"@calcom/embed-react": "^1.5.3",
- "@trycompai/auth": "workspace:*",
- "@trycompai/company": "workspace:*",
- "@trycompai/integration-platform": "workspace:*",
"@date-fns/tz": "^1.2.0",
"@dnd-kit/core": "^6.3.1",
"@dnd-kit/modifiers": "^9.0.0",
@@ -68,9 +65,12 @@
"@tiptap/react": "3.16.0",
"@trigger.dev/react-hooks": "4.4.3",
"@trigger.dev/sdk": "4.4.3",
+ "@trycompai/auth": "workspace:*",
+ "@trycompai/company": "workspace:*",
"@trycompai/db": "1.3.22",
"@trycompai/design-system": "^1.0.32",
"@trycompai/email": "workspace:*",
+ "@trycompai/integration-platform": "workspace:*",
"@types/canvas-confetti": "^1.9.0",
"@types/react-syntax-highlighter": "^15.5.13",
"@types/three": "^0.180.0",
@@ -100,7 +100,7 @@
"mammoth": "^1.11.0",
"motion": "^12.35.0",
"nanoid": "^5.1.6",
- "next": "^16.0.10",
+ "next": "^16.2.0",
"next-safe-action": "^8.0.3",
"next-themes": "^0.4.4",
"nuqs": "^2.4.3",
diff --git a/apps/app/src/app/(app)/[orgId]/documents/[formType]/page.tsx b/apps/app/src/app/(app)/[orgId]/documents/[formType]/page.tsx
index 99aa17aa5..45fa4f409 100644
--- a/apps/app/src/app/(app)/[orgId]/documents/[formType]/page.tsx
+++ b/apps/app/src/app/(app)/[orgId]/documents/[formType]/page.tsx
@@ -2,6 +2,7 @@ import { CompanyFormPageClient } from '@/app/(app)/[orgId]/documents/components/
import { Breadcrumb, PageLayout } from '@trycompai/design-system';
import Link from 'next/link';
import { notFound } from 'next/navigation';
+import { Suspense } from 'react';
import { evidenceFormDefinitions, evidenceFormTypeSchema } from '../forms';
export default async function CompanyFormDetailPage({
@@ -30,10 +31,12 @@ export default async function CompanyFormDetailPage({
{ label: formDefinition.title, isCurrent: true },
]}
/>
-
+
+
+
);
}
diff --git a/apps/app/src/app/(app)/[orgId]/documents/components/CompanyFormPageClient.tsx b/apps/app/src/app/(app)/[orgId]/documents/components/CompanyFormPageClient.tsx
index c701bcc3c..73927bba3 100644
--- a/apps/app/src/app/(app)/[orgId]/documents/components/CompanyFormPageClient.tsx
+++ b/apps/app/src/app/(app)/[orgId]/documents/components/CompanyFormPageClient.tsx
@@ -31,12 +31,17 @@ import {
InputGroupAddon,
InputGroupInput,
PageHeader,
+ Stack,
Table,
TableBody,
TableCell,
TableHead,
TableHeader,
TableRow,
+ Tabs,
+ TabsContent,
+ TabsList,
+ TabsTrigger,
Text,
} from '@trycompai/design-system';
import {
@@ -57,7 +62,7 @@ import {
DialogTitle,
} from '@trycompai/ui/dialog';
import Link from 'next/link';
-import { useRouter } from 'next/navigation';
+import { useRouter, useSearchParams } from 'next/navigation';
import { useCallback, useMemo, useRef, useState } from 'react';
import { toast } from 'sonner';
import useSWR, { useSWRConfig } from 'swr';
@@ -147,6 +152,8 @@ export function CompanyFormPageClient({
isPlatformAdmin?: boolean;
}) {
const router = useRouter();
+ const searchParams = useSearchParams();
+ const defaultTab = searchParams.get('tab') || 'submissions';
const { mutate: globalMutate } = useSWRConfig();
const [search, setSearch] = useState('');
const [isExporting, setIsExporting] = useState(false);
@@ -397,175 +404,185 @@ export function CompanyFormPageClient({
- {/* ─── Submissions List ─── */}
-
-
-
-
-
-
- setSearch(event.target.value)}
- />
-
-
-
- {isLoading ? (
-
-
-
-
-
- No submissions yet
-
- Start by creating a new submission, click the New Submission button above.
-
-
-
- ) : !data || data.submissions.length === 0 ? (
-
-
-
-
-
- No submissions yet
-
- Start by creating a new submission, click the New Submission button above.
-
-
-
- ) : (
-
-
-
- {isMeeting && }
-
- {formType === 'access-request' && }
- {showSummaryColumn && }
- {isAdminOrOwner && }
-
-
-
-
- Submission Date
-
- {isMeeting && (
-
- Meeting Type
-
- )}
-
- Submitted By
-
- {formType === 'access-request' && (
-
- Status
-
- )}
- {showSummaryColumn && Summary}
- {isAdminOrOwner && (
-
- Actions
-
- )}
-
-
-
- {data.submissions.map((submission) => {
- const summaryValue = summaryField
- ? String(submission.data[summaryField.key] ?? '')
- : '';
- const matrixSummary = matrixSummaryField
- ? `${getMatrixRowCount(submission.data[matrixSummaryField.key])} row(s)`
- : '';
- const rowSummary = summaryField ? truncate(summaryValue, 80) : matrixSummary;
-
- const submissionFormType = submission.formType ?? formType;
-
- return (
-
- router.push(
- `/${organizationId}/documents/${submissionFormType}/submissions/${submission.id}`,
- )
- }
- style={{ cursor: 'pointer' }}
- >
-
-
- {formatSubmissionDate(
- submission.data.submissionDate,
- submission.submittedAt,
- )}
-
-
+
+
+
+ Submissions
+ Findings
+
+
+
+
+
+
+
+
+
+ setSearch(event.target.value)}
+ />
+
+
+
+ {isLoading ? (
+
+
+
+
+
+ No submissions yet
+
+ Start by creating a new submission, click the New Submission button above.
+
+
+
+ ) : !data || data.submissions.length === 0 ? (
+
+
+
+
+
+ No submissions yet
+
+ Start by creating a new submission, click the New Submission button above.
+
+
+
+ ) : (
+
+
+
+ {isMeeting && }
+
+ {formType === 'access-request' && }
+ {showSummaryColumn && }
+ {isAdminOrOwner && }
+
+
+
+
+ Submission Date
+
{isMeeting && (
-
-
- {MEETING_TYPE_LABELS[submissionFormType] ?? submissionFormType}
-
-
+
+ Meeting Type
+
)}
-
-
- {submission.submittedBy?.name ?? submission.submittedBy?.email ?? 'Unknown'}
-
-
+
+ Submitted By
+
{formType === 'access-request' && (
-
-
-
-
-
- )}
- {showSummaryColumn && (
-
-
- {rowSummary || '—'}
-
-
+
+ Status
+
)}
+ {showSummaryColumn && Summary}
{isAdminOrOwner && (
- e.stopPropagation()}>
-
-
- e.stopPropagation()}
- >
-
-
-
- {
- e.stopPropagation();
- setSubmissionToDelete(submission);
- setDeleteDialogOpen(true);
- }}
- >
-
- Delete
-
-
-
-
-
+
+ Actions
+
)}
- );
- })}
-
-
- )}
-
+
+
+ {data.submissions.map((submission) => {
+ const summaryValue = summaryField
+ ? String(submission.data[summaryField.key] ?? '')
+ : '';
+ const matrixSummary = matrixSummaryField
+ ? `${getMatrixRowCount(submission.data[matrixSummaryField.key])} row(s)`
+ : '';
+ const rowSummary = summaryField ? truncate(summaryValue, 80) : matrixSummary;
+
+ const submissionFormType = submission.formType ?? formType;
+
+ return (
+
+ router.push(
+ `/${organizationId}/documents/${submissionFormType}/submissions/${submission.id}`,
+ )
+ }
+ style={{ cursor: 'pointer' }}
+ >
+
+
+ {formatSubmissionDate(
+ submission.data.submissionDate,
+ submission.submittedAt,
+ )}
+
+
+ {isMeeting && (
+
+
+ {MEETING_TYPE_LABELS[submissionFormType] ?? submissionFormType}
+
+
+ )}
+
+
+ {submission.submittedBy?.name ?? submission.submittedBy?.email ?? 'Unknown'}
+
+
+ {formType === 'access-request' && (
+
+
+
+
+
+ )}
+ {showSummaryColumn && (
+
+
+ {rowSummary || '—'}
+
+
+ )}
+ {isAdminOrOwner && (
+ e.stopPropagation()}>
+
+
+ e.stopPropagation()}
+ >
+
+
+
+ {
+ e.stopPropagation();
+ setSubmissionToDelete(submission);
+ setDeleteDialogOpen(true);
+ }}
+ >
+
+ Delete
+
+
+
+
+
+ )}
+
+ );
+ })}
+
+
+ )}
+
+
-
+
+
+
+
+