From 6d9ba9097ea71bea87c338c4a7e85b82c6e93798 Mon Sep 17 00:00:00 2001 From: Taesung Hwang Date: Sat, 27 Jan 2024 00:36:48 -0800 Subject: [PATCH] Display badge numbers in Participants table - Include column of badge numbers in particpants table - Allows searching by badge number for potentially faster check-in --- .../participants/components/ParticipantsTable.tsx | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/apps/site/src/app/admin/participants/components/ParticipantsTable.tsx b/apps/site/src/app/admin/participants/components/ParticipantsTable.tsx index 958d6b80..cde9f734 100644 --- a/apps/site/src/app/admin/participants/components/ParticipantsTable.tsx +++ b/apps/site/src/app/admin/participants/components/ParticipantsTable.tsx @@ -1,6 +1,6 @@ import { ReactElement, useCallback, useState } from "react"; -import { useCollection } from "@cloudscape-design/collection-hooks"; +import { useCollection } from "@cloudscape-design/collection-hooks"; import Box from "@cloudscape-design/components/box"; import Button from "@cloudscape-design/components/button"; import CollectionPreferences from "@cloudscape-design/components/collection-preferences"; @@ -43,6 +43,7 @@ const SEARCHABLE_COLUMNS: (keyof Participant)[] = [ "last_name", "role", "status", + "badge_number", ]; function createLabelFunction(columnName: string) { @@ -83,6 +84,7 @@ function ParticipantsTable({ "lastName", "role", "status", + "badgeNumber", "friday", "saturday", "sunday", @@ -199,6 +201,13 @@ function ParticipantsTable({ ariaLabel: createLabelFunction("status"), sortingField: "status", }, + { + id: "badgeNumber", + header: "Badge Number", + cell: (item: Participant) => item.badge_number, + ariaLabel: createLabelFunction("Badge Number"), + sortingField: "badge_number", + }, { id: "friday", header: "Fri",