From 7a21189e0deb7ccb5556c194c379e920d0464778 Mon Sep 17 00:00:00 2001 From: Griffin Smith Date: Wed, 29 Dec 2021 19:02:27 -0500 Subject: feat(grfn/bbbg): Add "RSVP" column to event attendees Also sort, first by rsvp, then by signed in, then by last check, then by name Change-Id: I15d2e4a5693290d9c1cfd09196982e7a6957a138 Reviewed-on: https://cl.tvl.fyi/c/depot/+/4742 Reviewed-by: grfn Autosubmit: grfn Tested-by: BuildkiteCI --- users/grfn/bbbg/src/bbbg/handlers/events.clj | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'users/grfn/bbbg') diff --git a/users/grfn/bbbg/src/bbbg/handlers/events.clj b/users/grfn/bbbg/src/bbbg/handlers/events.clj index 2264d36e7d67..fcebb199f0cb 100644 --- a/users/grfn/bbbg/src/bbbg/handlers/events.clj +++ b/users/grfn/bbbg/src/bbbg/handlers/events.clj @@ -101,16 +101,26 @@ [:thead [:th "Meetup Name"] [:th "Discord Name"] + [:th "RSVP"] [:th "Signed In"] [:th "Last Vaccination Check"]] [:tbody - (for [attendee attendees] + (for [attendee (sort-by (juxt (comp not ::event-attendee/rsvpd-attending?) + (comp not ::event-attendee/attended?) + (comp some? :last-check) + ::attendee/meetup-name) + attendees)] [:tr [:td.attendee-name (::attendee/meetup-name attendee)] [:td [:label.mobile-label "Discord Name: "] (or (not-empty (::attendee/discord-name attendee)) "—")] + [:td + [:label.mobile-label "Signed In: "] + (if (::event-attendee/rsvpd-attending? attendee) + [:span {:title "Yes"} "✔️"] + [:span {:title "No"} "❌"])] [:td [:label.mobile-label "Signed In: "] (if (::event-attendee/attended? attendee) -- cgit 1.4.1