diff --git a/apps/api/src/server.ts b/apps/api/src/server.ts
index 1514423..dc85239 100644
--- a/apps/api/src/server.ts
+++ b/apps/api/src/server.ts
@@ -616,7 +616,16 @@ export const app = new Elysia()
.get("/:id", async ({ params: { id } }) => {
const verification = await s.Verifications.get(id);
if (!verification) return status(404, { error: "Verification not found" });
- return verification;
+
+ const { contents = [] } = await r2.verificationMedia.list({ prefix: `${verification.assessment_id}/` });
+ const media = contents.map(({ key, size, lastModified }) => ({
+ key,
+ size,
+ lastModified,
+ url: r2.verificationMedia.presign(key, { expiresIn: 60 * 60 }),
+ }));
+
+ return { ...verification, media };
}, {
params: t.Object({ id: BigIntIdSchema })
})
diff --git a/apps/portal/src/routes/(app)/+layout.svelte b/apps/portal/src/routes/(app)/+layout.svelte
index dfd81d6..56da58d 100644
--- a/apps/portal/src/routes/(app)/+layout.svelte
+++ b/apps/portal/src/routes/(app)/+layout.svelte
@@ -28,7 +28,7 @@
{
name: "Verification",
path: "/verification",
- links: [{ name: "Requests", path: "/requests" }],
+ links: [{ name: "Verifications", path: "/verifications" }],
},
];
diff --git a/apps/portal/src/routes/(app)/verification/requests/[id]/+page.svelte b/apps/portal/src/routes/(app)/verification/requests/[id]/+page.svelte
deleted file mode 100644
index 490c977..0000000
--- a/apps/portal/src/routes/(app)/verification/requests/[id]/+page.svelte
+++ /dev/null
@@ -1,471 +0,0 @@
-
-
-
-
-{#if loading}
-
-
-
-{:else if loadError}
-
- {loadError}
-
-{:else if verification}
- {@const v = verification}
-
-
{v.name}
-
{v.status}
-
{v.gender} · age {v.age} · {Math.round(kgToLb(v.weight))} lb
-
-
{reviewedCount} / {ACTIVITIES.length} reviewed
-
-
-
- {#each ACTIVITIES as activity, i (activity)}
- (stepIndex = i)}
- >
- {activity}
- {#if verf[activity] === "pass"}
- ✓
- {:else if verf[activity] === "fail"}
- ✕
- {/if}
-
- {/each}
- (stepIndex = SUMMARY_STEP)}
- >
- Summary
-
-
-
- {#if !isSummaryStep}
- {@const activity = ACTIVITIES[stepIndex]}
-
-
-
{activity}
-
-
Claimed
-
- {formatPerformance(activity, v[PERF_COLUMN[activity]])}
-
-
-
-
- {#if v[MEDIA_KEY_COLUMN[activity]]}
- {@const videoUrl = v[MEDIA_KEY_COLUMN[activity]]}
-
-
-
- Open video in new tab
-
- {:else}
-
- No video uploaded
-
- {/if}
-
-
- setVerf(activity, "pass")}
- >
- Pass
-
- setVerf(activity, "fail")}
- >
- Fail
-
- setVerf(activity, "unset")}
- >
- Clear
-
-
-
-
-
- ← Previous
-
-
- Next →
-
-
-
- {:else}
-
-
Review summary
-
-
-
-
-
- Activity
- Claimed
- Video
- Result
-
-
-
- {#each ACTIVITIES as activity, i (activity)}
-
-
- (stepIndex = i)}
- >
- {activity}
-
-
-
- {formatPerformance(
- activity,
- v[PERF_COLUMN[activity]],
- )}
-
-
- {#if v[MEDIA_KEY_COLUMN[activity]]}
-
- View
-
- {:else}
- None
- {/if}
-
-
- {#if verf[activity] === "pass"}
- Pass
- {:else if verf[activity] === "fail"}
- Fail
- {:else}
- Unreviewed
- {/if}
-
-
- {/each}
-
-
-
-
-
- Reviewer notes
-
-
-
- {#if submitError}
-
- {submitError}
-
- {/if}
-
-
-
- ← Previous
-
-
- {#if isReadOnly}
-
- {v.status === "completed"
- ? "This verification is completed and read-only."
- : v.status === "draft"
- ? "This verification is still a draft (the player hasn't finished uploading) and is read-only."
- : "This verification is waiting on the player to resubmit and is read-only."}
-
- {:else}
-
- {#if !allReviewed}
- Mark every activity Pass or Fail to complete
- {/if}
-
- {submitting === "action"
- ? "Submitting..."
- : "Request action"}
-
-
- {submitting === "complete"
- ? "Submitting..."
- : "Complete"}
-
-
- {/if}
-
-
- {/if}
-{/if}
diff --git a/apps/portal/src/routes/(app)/verification/requests/+page.svelte b/apps/portal/src/routes/(app)/verification/verifications/+page.svelte
similarity index 79%
rename from apps/portal/src/routes/(app)/verification/requests/+page.svelte
rename to apps/portal/src/routes/(app)/verification/verifications/+page.svelte
index 6e96e3a..cb76502 100644
--- a/apps/portal/src/routes/(app)/verification/requests/+page.svelte
+++ b/apps/portal/src/routes/(app)/verification/verifications/+page.svelte
@@ -1,6 +1,5 @@
+
+
+
+{#if loading}
+
+
+
+{:else if loadError}
+
+ {loadError}
+
+{:else if verification}
+ {@const v = verification}
+
+
{v.name}
+
+ {v.status}
+
+
{v.gender} · age {v.age} · {Math.round(kgToLb(v.weight))} lb
+
+
+
+
+
Activities
+ {reviewedCount} / {ACTIVITIES.length} reviewed
+
+
+
+
+
+
+ Activity
+ Claimed
+ Result
+
+
+
+ {#each ACTIVITIES as activity (activity)}
+
+ {activity}
+
+ {formatPerformance(
+ activity,
+ v[PERF_COLUMN[activity]],
+ )}
+
+
+
+
+ toggleVerf(activity, "pass")}
+ >
+ Pass
+
+
+ toggleVerf(activity, "fail")}
+ >
+ Fail
+
+
+
+
+ {/each}
+
+
+
+
+
+
+
Media ({v.media.length})
+
+ {#if v.media.length === 0}
+
No media uploaded
+ {:else}
+
+ {#each v.media as file, i (file.key)}
+
+
+ File {i + 1}
+
+
+ {formatSize(file.size)} · uploaded {formatDate(
+ file.lastModified,
+ )}
+
+
+ {/each}
+
+ {/if}
+
+
+
+
+ Reviewer notes
+
+
+
+ {#if submitError}
+
+ {submitError}
+
+ {/if}
+
+
+ {#if isReadOnly}
+
+ {v.status === "completed"
+ ? "This verification is completed and read-only."
+ : v.status === "draft"
+ ? "This verification is still a draft (the player hasn't finished uploading) and is read-only."
+ : "This verification is waiting on the player to resubmit and is read-only."}
+
+ {:else}
+ {#if !allReviewed}
+ Mark every activity Pass or Fail to complete
+ {/if}
+
+ {submitting === "action" ? "Submitting..." : "Request action"}
+
+
+ {submitting === "complete" ? "Submitting..." : "Complete"}
+
+ {/if}
+
+
+{/if}