diff --git a/src/app/researcher/studies/page.tsx b/src/app/researcher/studies/page.tsx
index 2e21ad2..5e48822 100644
--- a/src/app/researcher/studies/page.tsx
+++ b/src/app/researcher/studies/page.tsx
@@ -1,7 +1,7 @@
import { db } from '@/database'
import { Container, Flex, Button, Paper, Title, Group, Alert, Anchor } from '@mantine/core'
import Link from '../../../../node_modules/next/link'
-import { b64toUUID } from '@/lib/uuid'
+import { uuidToB64 } from '@/lib/uuid'
import { studyRowStyle, studyStatusStyle, studyTitleStyle } from './styles.css'
import { humanizeStatus } from '@/lib/status'
@@ -41,9 +41,9 @@ export default async function StudyReviewPage() {
{study.title}
{study.piName}
{humanizeStatus(study.status)}
-
- Proceed to review ≫
-
+
+ Proceed to review ≫
+
))}
diff --git a/src/app/researcher/study/[encodedStudyId]/edit/schema.ts b/src/app/researcher/study/[encodedStudyId]/edit/schema.ts
index 22d6c5d..96f16d7 100644
--- a/src/app/researcher/study/[encodedStudyId]/edit/schema.ts
+++ b/src/app/researcher/study/[encodedStudyId]/edit/schema.ts
@@ -5,8 +5,8 @@ import { zodResolver } from 'mantine-form-zod-resolver'
const schema = z
.object({
title: z.string().min(3).max(100),
- description: z.string().min(3).max(100),
- piName: z.string().min(3).max(100),
+ description: z.string().min(3).max(500),
+ piName: z.string().min(3).max(1500),
highlights: z.boolean().nullish(), // .preprocess((value) => value === 'on', z.boolean()).nullish(),
eventCapture: z.boolean().nullish(),
outputMimeType: z.string().nullish(),
diff --git a/src/app/researcher/study/[encodedStudyId]/review/page.tsx b/src/app/researcher/study/[encodedStudyId]/review/page.tsx
index 20f13b9..d001431 100644
--- a/src/app/researcher/study/[encodedStudyId]/review/page.tsx
+++ b/src/app/researcher/study/[encodedStudyId]/review/page.tsx
@@ -1,6 +1,6 @@
import { Paper, Center, Title, Stack, Group } from '@mantine/core'
import { db } from '@/database'
-import { uuidToB64 } from '@/lib/uuid'
+import { b64toUUID } from '@/lib/uuid'
import { StudyPanel } from './panel'
import { AlertNotFound } from '@/components/errors'
import { ResearcherBreadcrumbs } from '@/components/page-breadcrumbs'
@@ -15,7 +15,7 @@ export default async function StudyReviewPage({
const study = await db
.selectFrom('study')
.selectAll()
- .where('id', '=', uuidToB64(encodedStudyId))
+ .where('id', '=', b64toUUID(encodedStudyId))
.executeTakeFirst()
if (!study) {
diff --git a/src/app/researcher/study/[encodedStudyId]/review/results.tsx b/src/app/researcher/study/[encodedStudyId]/review/results.tsx
index 66b8e3a..1582916 100644
--- a/src/app/researcher/study/[encodedStudyId]/review/results.tsx
+++ b/src/app/researcher/study/[encodedStudyId]/review/results.tsx
@@ -11,9 +11,11 @@ import { DataTable } from 'mantine-datatable'
import { fetchRunResultsAction } from './actions'
import { ErrorAlert } from '@/components/errors'
import { IconDownload } from '@tabler/icons-react'
+import { slugify } from '@/lib/string'
type RunResultsProps = {
run: { id: string }
+ study: { title: string }
}
const ViewCSV: FC = ({ run }) => {
@@ -48,7 +50,7 @@ const ViewCSV: FC = ({ run }) => {
return (
= ({ run }) => {
)
}
-export const PreviewCSVResultsBtn: FC = ({ run }) => {
+export const PreviewCSVResultsBtn: FC = ({ run, study }) => {
const [opened, { open, close }] = useDisclosure(false)
return (
@@ -68,7 +70,7 @@ export const PreviewCSVResultsBtn: FC = ({ run }) => {
onClose={close}
size="100%"
title={
-
+
}>Download Results
}
@@ -79,7 +81,7 @@ export const PreviewCSVResultsBtn: FC = ({ run }) => {
}}
centered
>
-
+