about summary refs log tree commit diff
path: root/users/grfn
diff options
context:
space:
mode:
authorGriffin Smith <grfn@gws.fyi>2021-12-30T00·02-0500
committerclbot <clbot@tvl.fyi>2021-12-30T00·21+0000
commit7a21189e0deb7ccb5556c194c379e920d0464778 (patch)
treef55b2ae45200224d33e9a35bc40fda575fb02b6a /users/grfn
parent4cf86f2e53881e473d881072e55b21179e4dd593 (diff)
feat(grfn/bbbg): Add "RSVP" column to event attendees r/3502
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 <grfn@gws.fyi>
Autosubmit: grfn <grfn@gws.fyi>
Tested-by: BuildkiteCI
Diffstat (limited to 'users/grfn')
-rw-r--r--users/grfn/bbbg/src/bbbg/handlers/events.clj12
1 files changed, 11 insertions, 1 deletions
diff --git a/users/grfn/bbbg/src/bbbg/handlers/events.clj b/users/grfn/bbbg/src/bbbg/handlers/events.clj
index 2264d36e7d..fcebb199f0 100644
--- a/users/grfn/bbbg/src/bbbg/handlers/events.clj
+++ b/users/grfn/bbbg/src/bbbg/handlers/events.clj
@@ -101,10 +101,15 @@
      [: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
@@ -113,6 +118,11 @@
               "—")]
          [: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)
             [:span {:title "Yes"} "✔️"]
             [:span {:title "No"} "❌"])]