Implementation of verification action endpoints
This commit is contained in:
@@ -11,7 +11,8 @@
|
||||
const LIMIT = 25;
|
||||
|
||||
const STATUS_BADGE: Record<VerificationStatus, string> = {
|
||||
request: "badge-info",
|
||||
draft: "badge-ghost",
|
||||
submitted: "badge-info",
|
||||
in_review: "badge-warning",
|
||||
action_requested: "badge-error",
|
||||
completed: "badge-success",
|
||||
@@ -47,7 +48,7 @@
|
||||
let loading = $state(true);
|
||||
let loadError = $state<string | null>(null);
|
||||
let offset = $state(0);
|
||||
let status = $state<VerificationStatus | "">("request");
|
||||
let status = $state<VerificationStatus | "">("submitted");
|
||||
|
||||
async function refresh() {
|
||||
loading = true;
|
||||
@@ -91,7 +92,8 @@
|
||||
onchange={(e) => setStatus(e.currentTarget.value)}
|
||||
>
|
||||
<option value="">All statuses</option>
|
||||
<option value="request">Request</option>
|
||||
<option value="draft">Draft</option>
|
||||
<option value="submitted">Submitted</option>
|
||||
<option value="action_requested">Action requested</option>
|
||||
<option value="completed">Completed</option>
|
||||
</select>
|
||||
|
||||
@@ -19,7 +19,8 @@
|
||||
const ACTIVITIES = Object.values(Activity);
|
||||
|
||||
const STATUS_BADGE: Record<VerificationStatus, string> = {
|
||||
request: "badge-info",
|
||||
draft: "badge-ghost",
|
||||
submitted: "badge-info",
|
||||
in_review: "badge-warning",
|
||||
action_requested: "badge-error",
|
||||
completed: "badge-success",
|
||||
@@ -126,8 +127,8 @@
|
||||
);
|
||||
const allReviewed = $derived(reviewedCount === ACTIVITIES.length);
|
||||
const isReadOnly = $derived(
|
||||
verification?.status === "completed" ||
|
||||
verification?.status === "action_requested",
|
||||
verification?.status !== "submitted" &&
|
||||
verification?.status !== "in_review",
|
||||
);
|
||||
|
||||
async function load() {
|
||||
@@ -432,7 +433,9 @@
|
||||
<span class="text-sm opacity-70">
|
||||
{v.status === "completed"
|
||||
? "This verification is completed and read-only."
|
||||
: "This verification is waiting on the player to resubmit and is 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."}
|
||||
</span>
|
||||
{:else}
|
||||
<div class="flex items-center gap-2">
|
||||
|
||||
Reference in New Issue
Block a user