diff --git a/app/dashboards/user_dashboard.rb b/app/dashboards/user_dashboard.rb index 5e9c13ebc..4a02aa844 100644 --- a/app/dashboards/user_dashboard.rb +++ b/app/dashboards/user_dashboard.rb @@ -13,6 +13,8 @@ class UserDashboard < Administrate::BaseDashboard confirmed?: Field::Boolean, created_at: Field::DateTime, updated_at: Field::DateTime, + blocked_at: Field::DateTime, + blocked_reason: Field::String, current_sign_in_at: Field::DateTime, dossiers: Field::HasMany }.freeze @@ -36,7 +38,9 @@ class UserDashboard < Administrate::BaseDashboard :email, :confirmed?, :current_sign_in_at, - :created_at + :created_at, + :blocked_at, + :blocked_reason ].freeze # FORM_ATTRIBUTES diff --git a/app/views/manager/application/_user_meta.html.erb b/app/views/manager/application/_user_meta.html.erb index 46185a0a4..4b76f3ff7 100644 --- a/app/views/manager/application/_user_meta.html.erb +++ b/app/views/manager/application/_user_meta.html.erb @@ -11,7 +11,8 @@ Usager
- <%= link_to('Voir son compte utilisateur', manager_user_path(user)) %> + <% style = "background-color: red;color: white;" if user.blocked_at %> + <%= link_to('Voir son compte utilisateur', manager_user_path(user), style: style) %>
diff --git a/app/views/manager/users/show.html.erb b/app/views/manager/users/show.html.erb index 24b793aa9..03e68bc26 100644 --- a/app/views/manager/users/show.html.erb +++ b/app/views/manager/users/show.html.erb @@ -20,8 +20,9 @@ as well as a link to its edit page. <% user = page.resource %>