From 640b2f2c821142238f020350421c446da3d77358 Mon Sep 17 00:00:00 2001 From: Vivian Canales Date: Mon, 30 Sep 2024 10:28:33 -0500 Subject: [PATCH] Added activity tracking for background check exemption --- .../background_check_exemptions_controller.rb | 16 ++++++++++++++++ .../public_activity/account/_update.en.html.erb | 4 ++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/app/controllers/admin/background_check_exemptions_controller.rb b/app/controllers/admin/background_check_exemptions_controller.rb index 65997c7897..803d78d2a1 100644 --- a/app/controllers/admin/background_check_exemptions_controller.rb +++ b/app/controllers/admin/background_check_exemptions_controller.rb @@ -4,6 +4,14 @@ def grant @account = Account.find(params[:participant_id]) if @account.grant_background_check_exemption + @account.create_activity( + key: "account.update", + owner: current_account, + params: { + changes: + {background_check_exemption: @account.saved_change_to_background_check_exemption} + } + ) redirect_to admin_participant_path(@account), success: "Background check exemption granted" else @@ -16,6 +24,14 @@ def revoke @account = Account.find(params[:participant_id]) if @account.revoke_background_check_exemption + @account.create_activity( + key: "account.update", + owner: current_account, + params: { + changes: + {background_check_exemption: @account.saved_change_to_background_check_exemption} + } + ) redirect_to admin_participant_path(@account), success: "Background check exemption revoked" else diff --git a/app/views/public_activity/account/_update.en.html.erb b/app/views/public_activity/account/_update.en.html.erb index 8abe0a845d..44b4d539a7 100644 --- a/app/views/public_activity/account/_update.en.html.erb +++ b/app/views/public_activity/account/_update.en.html.erb @@ -24,8 +24,8 @@
  • <%= t(key) %>
  • <% end %> <% else %>