From 925b05e004913a624e6fa1928a71ca0c6268190a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9Cxxq250=E2=80=9D?= <“xxq250@qq.com”> Date: Mon, 5 Sep 2022 11:38:23 +0800 Subject: [PATCH] =?UTF-8?q?nps=E5=B7=B2=E6=89=93=E5=88=86=E5=8C=BA?= =?UTF-8?q?=E5=88=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/admins/nps_controller.rb | 1 + app/views/admins/nps/_user_np_list.html.erb | 2 +- app/views/admins/nps/index.html.erb | 4 ++++ 3 files changed, 6 insertions(+), 1 deletion(-) diff --git a/app/controllers/admins/nps_controller.rb b/app/controllers/admins/nps_controller.rb index 4eacba4e7..491e62778 100644 --- a/app/controllers/admins/nps_controller.rb +++ b/app/controllers/admins/nps_controller.rb @@ -7,6 +7,7 @@ class Admins::NpsController < Admins::BaseController sql = 'CONCAT(users.lastname, users.firstname) LIKE :keyword OR users.nickname LIKE :keyword OR users.login LIKE :keyword OR users.mail LIKE :keyword OR users.phone LIKE :keyword' @user_nps = @user_nps.where(sql, keyword: "%#{keyword}%") end + @user_nps = @user_nps.where("action_type != 'close'") if params[:done_score].present? @user_nps = paginate @user_nps.includes(:user) end diff --git a/app/views/admins/nps/_user_np_list.html.erb b/app/views/admins/nps/_user_np_list.html.erb index f4246c701..f2d5196e9 100644 --- a/app/views/admins/nps/_user_np_list.html.erb +++ b/app/views/admins/nps/_user_np_list.html.erb @@ -21,7 +21,7 @@