Skip to content

Commit

Permalink
Display badge numbers in Participants table
Browse files Browse the repository at this point in the history
- Include column of badge numbers in particpants table
- Allows searching by badge number for potentially faster check-in
  • Loading branch information
taesungh committed Jan 27, 2024
1 parent 2263491 commit 6d9ba90
Showing 1 changed file with 10 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -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";
Expand Down Expand Up @@ -43,6 +43,7 @@ const SEARCHABLE_COLUMNS: (keyof Participant)[] = [
"last_name",
"role",
"status",
"badge_number",
];

function createLabelFunction(columnName: string) {
Expand Down Expand Up @@ -83,6 +84,7 @@ function ParticipantsTable({
"lastName",
"role",
"status",
"badgeNumber",
"friday",
"saturday",
"sunday",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 6d9ba90

Please sign in to comment.