Skip to content

Commit

Permalink
Show only active user.
Browse files Browse the repository at this point in the history
  • Loading branch information
Eric-Guo committed Oct 28, 2024
1 parent 8ceec9f commit b949506
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/views/admin/home/index.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,8 @@
<div class="card mb-4 text-white bg-primary">
<div class="card-body pb-0 d-flex justify-content-between align-items-start">
<div>
<div class="fs-4 fw-semibold"><%= User.count -%></div>
<div><%= t('user.account') -%></div>
<div class="fs-4 fw-semibold"><%= User.where(is_active: true).count -%></div>
<div><%= t('user.active_user') -%></div>
</div>
</div>
<div class="c-chart-wrapper mt-3 mx-3" style="height:70px;" data-controller="dashboard"
Expand Down
2 changes: 1 addition & 1 deletion config/initializers/filter_parameter_logging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,5 @@
# Use this to limit dissemination of sensitive information.
# See the ActiveSupport::ParameterFilter documentation for supported notations and behaviors.
Rails.application.config.filter_parameters += [
:passw, :email, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
:passw, :secret, :token, :_key, :crypt, :salt, :certificate, :otp, :ssn
]
1 change: 1 addition & 0 deletions config/locales/user/en.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ en:
user:
users: "User"
account: "Account"
active_user: "Active user"
email: "Email"
admin: "Admin"
change_my_password: "Change my password"
Expand Down
1 change: 1 addition & 0 deletions config/locales/user/zh-CN.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ zh-CN:
user:
users: "用户"
account: "账户"
active_user: "有效用户"
email: "电子邮件"
admin: "管理员"
change_my_password: "更改我的密码"
Expand Down

0 comments on commit b949506

Please sign in to comment.