Merge pull request #9373 from demarches-simplifiees/show-blocked-user-in-manager
Avertit dans le manager si l'utilisateur est bloqué
This commit is contained in:
commit
50e7090b9e
3 changed files with 9 additions and 3 deletions
|
@ -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
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
Usager
|
||||
</dt>
|
||||
<dd class="attribute-data attribute-data--meta-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) %>
|
||||
</dd>
|
||||
</dl>
|
||||
|
||||
|
|
|
@ -20,8 +20,9 @@ as well as a link to its edit page.
|
|||
<% user = page.resource %>
|
||||
|
||||
<header class="main-content__header" role="banner">
|
||||
<h1 class="main-content__page-title">
|
||||
<h1 class="main-content__page-title" style="<%= "background-color: red;color: white;" if user.blocked_at %>">
|
||||
<%= content_for(:title) %>
|
||||
<%= "Bloqué" if user.blocked_at %>
|
||||
</h1>
|
||||
|
||||
<div>
|
||||
|
|
Loading…
Reference in a new issue