-
Notifications
You must be signed in to change notification settings - Fork 75
管理者とメンターが休会から復帰したユーザーの休会情報を確認できるようにした #9666
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
komagata
merged 26 commits into
main
from
feature/hibernation_info_remain_displayed_after_comeback
Apr 2, 2026
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
38be979
休会情報をメンターと管理者が常に確認できるように修正
s-tone-gs 008e8a2
復帰ユーザーの休会情報表示のテストコードを作成
s-tone-gs e11b8a9
休会した回数を管理者・メンター・本人が確認できるようにした
s-tone-gs 6f1cc69
休会回数の表示のテストコードを作成
s-tone-gs 754abdf
休会情報の表示項目を変更
s-tone-gs 8825562
hukkiを既存のテストに影響しない属性に変更
s-tone-gs 328b9ba
テストメソッドの数を削減
s-tone-gs d45da97
開発環境での動作確認用データを作成
s-tone-gs ab5a58e
矛盾したデータを修正
s-tone-gs 812ace7
休会情報にデザインを入れた
machida 5262cca
管理者、メンター確認用 休会情報ブロックにデザインを入れた
machida 533de49
ダッシュボードに休会履歴を表示
s-tone-gs 4a00dd5
休会情報の表示をDRYに修正
s-tone-gs 06441f5
ファイル名をhibernation_history.rbにリネーム
s-tone-gs e1ecaff
冗長な記述を削除
s-tone-gs 4886674
デザインの修正に応じてプロフィールの休会履歴表示のテストを修正
s-tone-gs 05438d9
デザインの修正に応じてダッシュボードに表示される休会情報のテストを修正
s-tone-gs d9a38d2
equal?を==に修正
s-tone-gs 51ff2f3
yamlキーの重複を解消
s-tone-gs 61f9880
unsubscribe_email_tokenの重複を解消
s-tone-gs e802ad3
使用していない翻訳キーを削除
s-tone-gs bf26fb4
retire_deadlineメソッドが休会期限の日時も返すように修正
s-tone-gs 5a8ac59
discordプロフィールのシードデータに不正な値があったため修正
s-tone-gs 982dfcd
非存在確認のテストがfixtureのデータ数に依存しないように修正
s-tone-gs 8274e6d
モデルメソッドを削除
s-tone-gs d2cb799
不要な変数を削除
s-tone-gs File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,75 @@ | ||
| .a-card class=('is-only-mentor' unless user == current_user) | ||
| header.card-header.is-sm | ||
| h2.card-header__title | ||
| | 休会履歴 | ||
| | (#{user.hibernations.count}回) | ||
| hr.a-border-tint | ||
| .user-data | ||
| .user-data__row | ||
| - user.hibernations.order(created_at: :desc).each_with_index do |hibernation, i| | ||
| - number = user.hibernations.count - i | ||
| - if i.zero? && user.hibernated? | ||
| .user-metas.is-only-mentor | ||
| h2.user-metas__title | ||
| | 現在 | ||
| | #{number}回目の | ||
| | 休会中 | ||
| .user-metas__items | ||
| .user-metas__item | ||
| .user-metas__item-label 休会開始日時 | ||
| .user-metas__item-value | ||
| = l user.hibernated_at | ||
| .user-metas__item | ||
| .user-metas__item-label 復帰予定日時 | ||
| .user-metas__item-value | ||
| - if hibernation.scheduled_return_on.present? | ||
| = l hibernation.scheduled_return_on | ||
| - else | ||
| | 未登録 | ||
|
|
||
| .user-metas__item | ||
| .user-metas__item-label 休会期限日時 | ||
| .user-metas__item-value | ||
| - if !user.auto_retire | ||
| span.user-metas__item-value-text | ||
| | 企業都合休会中(#{user.hibernation_days}日) | ||
| - else | ||
| span.user-metas__item-value-text(class=user.countdown_danger_tag) | ||
| = user.retire_deadline | ||
|
|
||
| .user-metas__item | ||
| .user-metas__item-label | ||
| = Hibernation.human_attribute_name :reason | ||
| .user-metas__item-value | ||
| .a-short-text | ||
| - if hibernation.reason.present? | ||
| = simple_format(hibernation.reason) | ||
| - else | ||
| | 未登録 | ||
| - else | ||
| .user-metas class=('is-only-mentor' unless user == current_user) | ||
| h2.user-metas__title | ||
| | #{number}回目の休会 | ||
| .user-metas__items | ||
| .user-metas__item | ||
| .user-metas__item-label | ||
| - if hibernation.returned_at? | ||
| | 休会期間 | ||
| - else | ||
| | 休会予定期間 | ||
|
|
||
| .user-metas__item-value | ||
| = l hibernation.created_at | ||
| | 〜 | ||
| - if hibernation.returned_at? | ||
| = l hibernation.returned_at | ||
| - else | ||
| = l hibernation.scheduled_return_on | ||
| | 予定 | ||
|
|
||
| .user-metas__item | ||
| .user-metas__item-label | ||
| = Hibernation.human_attribute_name :reason | ||
| .user-metas__item-value | ||
| .a-short-text | ||
| = simple_format(hibernation.reason) |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -178,3 +178,7 @@ talk47: | |
| talk48: | ||
| user: kensyu-invoice | ||
| action_completed: true | ||
|
|
||
| talk49: | ||
| user: hukki | ||
| action_completed: true | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| require 'application_system_test_case' | ||
|
|
||
| module Home | ||
| class HibernationHistoryTest < ApplicationSystemTestCase | ||
| test 'show my hibernation history on dashboard' do | ||
| visit_with_auth '/', 'hukki' | ||
| assert_selector '.card-header__title', text: '休会履歴(1回)' | ||
| assert_selector '.user-metas__title', text: '1回目の休会' | ||
| end | ||
|
coderabbitai[bot] marked this conversation as resolved.
|
||
|
|
||
| test 'should not show hibernation history on dashboard when logged in user never hibernated' do | ||
| visit_with_auth '/', 'kimura' | ||
| assert_selector '.page-header__title', text: 'ダッシュボード' | ||
| assert_no_selector '.card-header__title', text: '休会履歴(1回)' | ||
| assert_no_selector '.user-metas__title', text: '1回目の休会' | ||
| end | ||
| end | ||
| end | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -12,7 +12,7 @@ class User::CoursesTest < ApplicationSystemTestCase | |
| test 'show users sorted by rails course' do | ||
| visit_with_auth '/users/courses', 'kimura' | ||
| assert_selector('a.tab-nav__item-link.is-active', text: 'Rails') | ||
| assert_text 'Railsエンジニアコース(31)' | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 既存のテストも理解した上で修正してていいですね! |
||
| assert_text 'Railsエンジニアコース(32)' | ||
| assert_selector '.users-item', count: 24 | ||
| assert_link 'kimuramitai' | ||
| assert_text 'Kimura Mitai' | ||
|
|
||
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
今回のPRとは関係ないですが、インデントがおかしかったので修正しました。