diff --git a/app/controllers/api/reports/sad_streak_controller.rb b/app/controllers/api/reports/sad_streak_controller.rb deleted file mode 100644 index b8b80da4d8a..00000000000 --- a/app/controllers/api/reports/sad_streak_controller.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -class API::Reports::SadStreakController < API::BaseController - def index - ids = User.where( - hibernated_at: nil, - retired_on: nil, - graduated_on: nil, - sad_streak: true - ).pluck(:last_sad_report_id) - @reports = Report.joins(:user).where(id: ids).order(reported_on: :desc) - end -end diff --git a/app/javascript/components/report.vue b/app/javascript/components/report.vue deleted file mode 100644 index 05ef5a98766..00000000000 --- a/app/javascript/components/report.vue +++ /dev/null @@ -1,102 +0,0 @@ - - - diff --git a/app/javascript/components/sad_reports.vue b/app/javascript/components/sad_reports.vue deleted file mode 100644 index 12fd5e52e23..00000000000 --- a/app/javascript/components/sad_reports.vue +++ /dev/null @@ -1,47 +0,0 @@ - - diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index e6d3faf6e2b..11bc9989c2d 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -70,7 +70,6 @@ import Watches from '../components/watches.vue' import WatchToggle from '../components/watch-toggle.vue' import Footprints from '../components/footprints.vue' import QuestionAnswers from '../components/question-answers.vue' -import SadReports from '../components/sad_reports.vue' import UserProducts from '../components/user-products.vue' import ActionCompletedButton from '../components/action-completed-button.vue' import CourseBooks from '../components/course-books.vue' @@ -85,7 +84,6 @@ mounter.addComponent(Watches) mounter.addComponent(WatchToggle) mounter.addComponent(Footprints) mounter.addComponent(QuestionAnswers) -mounter.addComponent(SadReports) mounter.addComponent(UserProducts) mounter.addComponent(ActionCompletedButton) mounter.addComponent(CourseBooks) diff --git a/app/views/api/reports/sad_streak/index.json.jbuilder b/app/views/api/reports/sad_streak/index.json.jbuilder deleted file mode 100644 index 2998f10b77e..00000000000 --- a/app/views/api/reports/sad_streak/index.json.jbuilder +++ /dev/null @@ -1,10 +0,0 @@ -json.reports @reports do |report| - json.partial! "api/reports/report", report: report - json.partial! "api/reports/checks", checks: report.checks - json.partial! "api/comments/user_icons", report: report - json.user do - json.partial! "api/users/user", user: report.user - end -end - -json.currentUserId current_user.id diff --git a/app/views/users/_sad_emotion_report.html.slim b/app/views/users/_sad_emotion_report.html.slim index 4dd362b86dc..c6555552bbb 100644 --- a/app/views/users/_sad_emotion_report.html.slim +++ b/app/views/users/_sad_emotion_report.html.slim @@ -7,4 +7,4 @@ | のユーザー hr.a-border .card-list - div(data-vue="SadReports") + = render partial: 'reports/report', collection: reports, as: :report, locals: { user_icon_display: true, actions_display: false } diff --git a/config/routes/api.rb b/config/routes/api.rb index c1c8f4901cd..5005451f721 100644 --- a/config/routes/api.rb +++ b/config/routes/api.rb @@ -49,7 +49,6 @@ get 'counts', on: :collection end resources :recents, only: %i(index) - resources :sad_streak, only: %i(index) end resources :watches, only: %i(index) namespace "watches" do