diff --git a/app/controllers/home_controller.rb b/app/controllers/home_controller.rb index 54e54c26f59..04c03805be7 100644 --- a/app/controllers/home_controller.rb +++ b/app/controllers/home_controller.rb @@ -13,6 +13,7 @@ def index @inactive_students = User.with_attached_avatar.inactive_students_and_trainees.order(last_activity_at: :desc) @job_seeking_users = User.with_attached_avatar.job_seeking.includes(:reports, :products, :works, :course, :company) @collegue_trainees = current_user.collegue_trainees&.with_attached_avatar&.includes(:reports, :products, :comments) + @reports = Report.list display_events_on_dashboard display_welcome_message_for_adviser set_required_fields diff --git a/app/javascript/components/report.vue b/app/javascript/components/report.vue index e1d7b1aa4b7..dd512ffa493 100644 --- a/app/javascript/components/report.vue +++ b/app/javascript/components/report.vue @@ -84,6 +84,7 @@ import CommentUserIcon from 'comment-user-icon' export default { + name: 'Report', components: { 'comment-user-icon': CommentUserIcon }, diff --git a/app/javascript/packs/application.js b/app/javascript/packs/application.js index 71f1366556b..8db87fbe090 100644 --- a/app/javascript/packs/application.js +++ b/app/javascript/packs/application.js @@ -78,6 +78,7 @@ import Watches from '../components/watches.vue' import WatchToggle from '../components/watch-toggle.vue' import UserMentorMemo from '../components/user_mentor_memo.vue' import Talks from '../components/talks.vue' +import Report from '../components/report.vue' const mounter = new VueMounter() mounter.addComponent(Hello) @@ -95,6 +96,7 @@ mounter.addComponent(Watches) mounter.addComponent(WatchToggle) mounter.addComponent(UserMentorMemo) mounter.addComponent(Talks) +mounter.addComponent(Report) mounter.mount() // Support component names relative to this directory: diff --git a/app/views/users/_sad_emotion_report.html.slim b/app/views/users/_sad_emotion_report.html.slim index d52401b80cc..f6e31b3260c 100644 --- a/app/views/users/_sad_emotion_report.html.slim +++ b/app/views/users/_sad_emotion_report.html.slim @@ -6,4 +6,5 @@ = image_tag Report.faces['sad'], id: 'sad', alt: 'sad', class: 'card-header__title-emotion-image' | のユーザー .card-list - = render partial: 'reports/report', collection: reports, as: :report + div(data-vue="Report" data-vue-report="#{@report}") +