Skip to content

Commit

Permalink
Merge pull request #7416 from fjordllc/feature/show-celebration-sever…
Browse files Browse the repository at this point in the history
…al-times-for-report-submittion

日報提出のお祝いメッセージを特定の回数で表示する
  • Loading branch information
komagata authored Apr 7, 2024
2 parents a34e9bc + f800e5d commit d343032
Show file tree
Hide file tree
Showing 21 changed files with 42 additions and 5 deletions.
Binary file modified app/assets/images/celebrate-report-count/100.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/1000.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/200.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/222.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/300.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/333.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/400.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/500.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/555.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/600.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/700.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/777.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/800.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/celebrate-report-count/900.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion app/controllers/reports_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ def flash_contents(report)
celebrate_report_count: celebrating_count(report) }
end

CELEBRATING_COUNTS = [100].freeze
CELEBRATING_COUNTS = [100, 200, 222, 300, 333, 400, 500, 555, 600, 700, 777, 800, 900, 1000].freeze

def celebrating_count(report)
return nil if report.wip
Expand Down
4 changes: 2 additions & 2 deletions app/views/reports/_celebrate_report_count_body.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@
p
| おめでとうございます!!
br
| #{flash[:celebrate_report_count]}日目の日報を提出しました。
| #{report_count}日目の日報を提出しました。
.modal-celebrate-report-count-body__image-container
= image_tag('celebrate-report-count/100.png', class: 'modal-celebrate-report-count-body__image')
= image_tag("celebrate-report-count/#{report_count}.png", class: 'modal-celebrate-report-count-body__image')
4 changes: 2 additions & 2 deletions app/views/reports/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
- if flash[:notify_help] && flash[:celebrate_report_count]
= render '/shared/modal', id: 'modal-notify-help', modal_title: '🎉 おめでとう!', auto_show: true
.modal__description
= render 'celebrate_report_count_body'
= render 'celebrate_report_count_body', report_count: flash[:celebrate_report_count]
.modal__description.is-md
= render 'notify_help_body'
- elsif flash[:notify_help]
Expand All @@ -94,4 +94,4 @@
- elsif flash[:celebrate_report_count]
= render '/shared/modal', id: 'modal-report-counts-celebration', modal_title: '🎉 おめでとう!', auto_show: true
.modal__description
= render 'celebrate_report_count_body'
= render 'celebrate_report_count_body', report_count: flash[:celebrate_report_count]
5 changes: 5 additions & 0 deletions db/fixtures/discord_profiles.yml
Original file line number Diff line number Diff line change
Expand Up @@ -289,3 +289,8 @@ discord_profire_pjord:
user: pjord
account_name:
times_url:

discord_profile_nippou199: # ステージング環境で日報200回目のお祝いメッセージの動作確認が終わり次第、削除します
user: nippou199
account_name:
times_url:
10 changes: 10 additions & 0 deletions db/fixtures/reports.yml
Original file line number Diff line number Diff line change
Expand Up @@ -322,3 +322,13 @@ report<%= i + 71 %>:
MaruMaru Inc.で研修をしました。
reported_on: <%= Time.now - 1.month + i.day %>
<% end %>

<% (1..199).each do |i| %> # ステージング環境で日報200回目のお祝いメッセージの動作確認が終わり次第、削除します
report<%= i + 87 %>:
user: nippou199
title: <%= "お祝いメッセージ確認用の日報#{i}" %>
emotion: 2
description: |-
<%= "#{i}日目の日報です" %>
reported_on: <%= Time.now - 1.year + i.day %>
<% end %>
4 changes: 4 additions & 0 deletions db/fixtures/talks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -227,3 +227,7 @@ talk_kensyu-end-over-1-week:
talk_kensyu-not-setting-end-date:
user: kensyu-not-setting-end-date
action_completed: true

talk_nippou199: # ステージング環境で日報200回目のお祝いメッセージの動作確認が終わり次第、削除します
user: nippou199
action_completed: true
18 changes: 18 additions & 0 deletions db/fixtures/users.yml
Original file line number Diff line number Diff line change
Expand Up @@ -1388,3 +1388,21 @@ pjord:
created_at: "2024-03-05 00:00:30"
sent_student_followup_message: true
last_activity_at: "2021-02-01 00:00:30"

nippou199: # ステージング環境で日報200回目のお祝いメッセージの動作確認が終わり次第、削除します
login_name: nippou199
email: [email protected]
crypted_password: $2a$10$n/xv4/1luueN6plzm2OyDezWlZFyGHjQEf4hwAW1r3k.lCm0frPK. # testtest
salt: zW3kQ9ubsxQQtzzzs4ap
name: Nippou Ooi
name_kana: ニッポウ オオイ
description: "日報を199回提出しました。"
course: course1
job: unemployed
os: mac_apple
experience: inexperienced
country_code: JP
updated_at: "2014-01-01 00:00:14"
created_at: "2014-01-01 00:00:14"
sent_student_followup_message: true
last_activity_at: "2014-01-01 00:00:14"

0 comments on commit d343032

Please sign in to comment.