diff --git a/app/assets/images/celebrate-report-count/100.png b/app/assets/images/celebrate-report-count/100.png index 5b99ee49285..0be477cb1a8 100644 Binary files a/app/assets/images/celebrate-report-count/100.png and b/app/assets/images/celebrate-report-count/100.png differ diff --git a/app/assets/images/celebrate-report-count/1000.png b/app/assets/images/celebrate-report-count/1000.png new file mode 100644 index 00000000000..2358e03cbc5 Binary files /dev/null and b/app/assets/images/celebrate-report-count/1000.png differ diff --git a/app/assets/images/celebrate-report-count/200.png b/app/assets/images/celebrate-report-count/200.png new file mode 100644 index 00000000000..aca6d665e51 Binary files /dev/null and b/app/assets/images/celebrate-report-count/200.png differ diff --git a/app/assets/images/celebrate-report-count/222.png b/app/assets/images/celebrate-report-count/222.png new file mode 100644 index 00000000000..3d4a999e7b0 Binary files /dev/null and b/app/assets/images/celebrate-report-count/222.png differ diff --git a/app/assets/images/celebrate-report-count/300.png b/app/assets/images/celebrate-report-count/300.png new file mode 100644 index 00000000000..2ca35ebd312 Binary files /dev/null and b/app/assets/images/celebrate-report-count/300.png differ diff --git a/app/assets/images/celebrate-report-count/333.png b/app/assets/images/celebrate-report-count/333.png new file mode 100644 index 00000000000..d1024285358 Binary files /dev/null and b/app/assets/images/celebrate-report-count/333.png differ diff --git a/app/assets/images/celebrate-report-count/400.png b/app/assets/images/celebrate-report-count/400.png new file mode 100644 index 00000000000..c814c1e5ea2 Binary files /dev/null and b/app/assets/images/celebrate-report-count/400.png differ diff --git a/app/assets/images/celebrate-report-count/500.png b/app/assets/images/celebrate-report-count/500.png new file mode 100644 index 00000000000..7b53f2c8a31 Binary files /dev/null and b/app/assets/images/celebrate-report-count/500.png differ diff --git a/app/assets/images/celebrate-report-count/555.png b/app/assets/images/celebrate-report-count/555.png new file mode 100644 index 00000000000..afe76fbf72d Binary files /dev/null and b/app/assets/images/celebrate-report-count/555.png differ diff --git a/app/assets/images/celebrate-report-count/600.png b/app/assets/images/celebrate-report-count/600.png new file mode 100644 index 00000000000..d043dc2c8f0 Binary files /dev/null and b/app/assets/images/celebrate-report-count/600.png differ diff --git a/app/assets/images/celebrate-report-count/700.png b/app/assets/images/celebrate-report-count/700.png new file mode 100644 index 00000000000..347fdfb11af Binary files /dev/null and b/app/assets/images/celebrate-report-count/700.png differ diff --git a/app/assets/images/celebrate-report-count/777.png b/app/assets/images/celebrate-report-count/777.png new file mode 100644 index 00000000000..c600cdd3b38 Binary files /dev/null and b/app/assets/images/celebrate-report-count/777.png differ diff --git a/app/assets/images/celebrate-report-count/800.png b/app/assets/images/celebrate-report-count/800.png new file mode 100644 index 00000000000..034cd6637b5 Binary files /dev/null and b/app/assets/images/celebrate-report-count/800.png differ diff --git a/app/assets/images/celebrate-report-count/900.png b/app/assets/images/celebrate-report-count/900.png new file mode 100644 index 00000000000..a900c407e4e Binary files /dev/null and b/app/assets/images/celebrate-report-count/900.png differ diff --git a/app/controllers/reports_controller.rb b/app/controllers/reports_controller.rb index e037224b7d3..fcd05638e1e 100644 --- a/app/controllers/reports_controller.rb +++ b/app/controllers/reports_controller.rb @@ -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 diff --git a/app/views/reports/_celebrate_report_count_body.html.slim b/app/views/reports/_celebrate_report_count_body.html.slim index 67efbeefcf9..0b793c47f0e 100644 --- a/app/views/reports/_celebrate_report_count_body.html.slim +++ b/app/views/reports/_celebrate_report_count_body.html.slim @@ -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') diff --git a/app/views/reports/show.html.slim b/app/views/reports/show.html.slim index 2fa5563232b..3cc9691e9a0 100644 --- a/app/views/reports/show.html.slim +++ b/app/views/reports/show.html.slim @@ -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] @@ -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] diff --git a/db/fixtures/discord_profiles.yml b/db/fixtures/discord_profiles.yml index a49ebfe138a..260e2fbca4f 100644 --- a/db/fixtures/discord_profiles.yml +++ b/db/fixtures/discord_profiles.yml @@ -289,3 +289,8 @@ discord_profire_pjord: user: pjord account_name: times_url: + +discord_profile_nippou199: # ステージング環境で日報200回目のお祝いメッセージの動作確認が終わり次第、削除します + user: nippou199 + account_name: + times_url: diff --git a/db/fixtures/reports.yml b/db/fixtures/reports.yml index 276d9287bc7..f0f6e8782d0 100644 --- a/db/fixtures/reports.yml +++ b/db/fixtures/reports.yml @@ -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 %> diff --git a/db/fixtures/talks.yml b/db/fixtures/talks.yml index f2c24f1d1d0..9a7e68403b3 100644 --- a/db/fixtures/talks.yml +++ b/db/fixtures/talks.yml @@ -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 diff --git a/db/fixtures/users.yml b/db/fixtures/users.yml index 81bb1e5166e..483d22b57f1 100644 --- a/db/fixtures/users.yml +++ b/db/fixtures/users.yml @@ -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: nippou199@fjord.jp + 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"