diff --git a/app/routes/events-team_.report.tsx b/app/routes/events-team_.report.tsx index eeb5659..e848b9e 100644 --- a/app/routes/events-team_.report.tsx +++ b/app/routes/events-team_.report.tsx @@ -35,7 +35,7 @@ export async function loader({ context }: { context: RequestContext }) { } const eventMemberQuery = await context.env.D1.prepare( - "SELECT id, name FROM et_members;", + "SELECT id, name, roblox_id FROM et_members;", ).all(); const eventsQuery = await context.env.D1.prepare( "SELECT answered_at, created_by, performed_at, reached_minimum_player_count, type FROM events WHERE month = ? AND year = ?;", @@ -44,7 +44,10 @@ export async function loader({ context }: { context: RequestContext }) { .all(); const memberMap = Object.fromEntries( eventMemberQuery.results.map((entry) => { - return [entry.id, { name: entry.name, points: 0 }]; + return [ + entry.id, + { name: entry.name, points: 0, roblox_id: entry.roblox_id }, + ]; }), ); @@ -74,7 +77,7 @@ export async function loader({ context }: { context: RequestContext }) { export default function () { const data = useLoaderData() as { - [k: string]: { name: string; points: number }; + [k: string]: { name: string; points: number; roblox_id?: number }; }; const now = new Date(); let month = now.getUTCMonth(); @@ -100,6 +103,7 @@ export default function () { ID Name Points + Roblox ID @@ -108,6 +112,7 @@ export default function () { {key} {value.name} {value.points} + {value.roblox_id} ))}