diff --git a/Gemfile b/Gemfile index 4931ab7f7..d3ac60853 100644 --- a/Gemfile +++ b/Gemfile @@ -41,6 +41,9 @@ gem "sentry-rails" gem "good_job" +# Bitmask flag column on AR models — used for User#event_participation. +gem "active_flag" + # Slack client gem "slack-ruby-client" diff --git a/Gemfile.lock b/Gemfile.lock index 816b0be70..e1fece8d1 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,6 +47,8 @@ GEM erubi (~> 1.11) rails-dom-testing (~> 2.2) rails-html-sanitizer (~> 1.6) + active_flag (2.1.1) + activerecord (>= 5) activejob (8.1.3) activesupport (= 8.1.3) globalid (>= 0.3.6) @@ -659,6 +661,7 @@ PLATFORMS x86_64-linux-musl DEPENDENCIES + active_flag activerecord-import autotuner (~> 1.0) aws-sdk-s3 diff --git a/app/controllers/inertia_controller.rb b/app/controllers/inertia_controller.rb index 01474006d..80b477220 100644 --- a/app/controllers/inertia_controller.rb +++ b/app/controllers/inertia_controller.rb @@ -148,7 +148,9 @@ def inertia_nav_current_user country_code: current_user.country_code, country_name: country&.common_name, streak_days: current_user.streak_days, - admin_level: current_user.admin_level + admin_level: current_user.admin_level, + created_at: current_user.created_at&.iso8601, + event_participation: current_user.event_participation_backfilled? ? current_user.event_participation.to_a.map(&:to_s) : nil } end diff --git a/app/javascript/pages/Home/signedIn/IntervalSelect.svelte b/app/javascript/pages/Home/signedIn/IntervalSelect.svelte index f00d84b2d..22db411ea 100644 --- a/app/javascript/pages/Home/signedIn/IntervalSelect.svelte +++ b/app/javascript/pages/Home/signedIn/IntervalSelect.svelte @@ -1,8 +1,18 @@