Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Display badge numbers in Participants table #378

Merged
merged 1 commit into from
Jan 27, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading