Skip to content

Commit

Permalink
Make connected evaluation detail page (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
andresgutgon authored Sep 12, 2024
1 parent 6daddd4 commit 2a9b942
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 8 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
import { getEvaluationByUuidCached } from '$/app/(private)/_data-access'

export default async function EvaluationPage({
params: { evaluationUuid },
}: {
params: { evaluationUuid: string }
}) {
const evaluation = await getEvaluationByUuidCached(evaluationUuid)
return (
<div>
<h1>{evaluation.name}</h1>
<p>{evaluation.description || 'No description for this evaluation'}</p>
</div>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ export default function BatchEvaluationsTable({
.detail({ id: project.id })
.commits.detail({ uuid: commit.uuid })
.documents.detail({ uuid: document.documentUuid })
.evaluations.detail(evaluation.uuid).dashboard.root,
.evaluations.detail(evaluation.uuid).root,
)
}
>
Expand All @@ -62,7 +62,7 @@ export default function BatchEvaluationsTable({
.detail({ id: project.id })
.commits.detail({ uuid: commit.uuid })
.documents.detail({ uuid: document.documentUuid })
.evaluations.detail(evaluation.uuid).dashboard.destroy
.evaluations.detail(evaluation.uuid).destroy
}
>
<Icon name='trash' />
Expand Down
8 changes: 3 additions & 5 deletions apps/web/src/services/routes.ts
Original file line number Diff line number Diff line change
Expand Up @@ -96,11 +96,9 @@ export const ROUTES = {
detail: (uuid: string) => {
const detailRoot = `${evaluationsRoot}/${uuid}`
return {
root,
dashboard: {
root: `${detailRoot}/dashboard`,
destroy: `${detailRoot}/dashboard/destroy`,
},
root: detailRoot,
destroy: `${detailRoot}/destroy`,
createBatch: `${detailRoot}/create-batch`,
}
},
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ async function generateDocumentLogs({
quantity?: number
}) {
return await Promise.all(
Array.from({ length: quantity }).map(() => {
Array.from({ length: quantity }).map(async () => {
return factories
.createDocumentLog({
document,
Expand Down

0 comments on commit 2a9b942

Please sign in to comment.