Multi-tenant platform (182 pages, 228 API routes, ~30 modules) built on a deterministic verification core: clinical-trial claims checked against ClinicalTrials.gov registered results and raw event counts (ARR/NNT/RR+CI recomputed in code, oracle-tested), code-enforced exact-span grounding, and multi-source cross-verification. Auth/RBAC/multi-tenancy, document processing at scale (unpdf + Docling), agentic workflows, Claude Science connector, compliance/audit, billing, public API, and more. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
35 lines
1.2 KiB
TypeScript
35 lines
1.2 KiB
TypeScript
"use client";
|
|
|
|
import { useSearchParams } from "next/navigation";
|
|
import Link from "next/link";
|
|
import { ModuleHeader } from "../_components/ModuleHeader";
|
|
import { ReportBuilder } from "../_components/ReportBuilder";
|
|
import { useActiveOrgRole, canEdit } from "../_components/useActiveOrgRole";
|
|
|
|
// Report builder page. Composes the ModuleHeader with the ReportBuilder
|
|
// (LayoutEditor + FilterEditor + PreviewPanel). An optional ?id param switches
|
|
// the builder into edit mode for an existing definition.
|
|
export default function ReportBuilderPage() {
|
|
const role = useActiveOrgRole();
|
|
const searchParams = useSearchParams();
|
|
const id = searchParams.get("id") ?? undefined;
|
|
|
|
return (
|
|
<div>
|
|
<ModuleHeader
|
|
title={id ? "Edit report" : "New report"}
|
|
description="Shape the layout, set filters, and preview the composed result."
|
|
actions={
|
|
<Link
|
|
href="/console/reporting"
|
|
className="rounded-md border border-ink/10 bg-white px-3 py-1.5 text-sm text-ink/60 hover:bg-paper"
|
|
>
|
|
Back to reports
|
|
</Link>
|
|
}
|
|
/>
|
|
<ReportBuilder definitionId={id} canEdit={canEdit(role)} />
|
|
</div>
|
|
);
|
|
}
|