-
Notifications
You must be signed in to change notification settings - Fork 75
給付金コースのプラクティスの関連日報一覧に元コースの関連日報を表示切替のフィルターを追加 #9515
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
Open
karlley
wants to merge
9
commits into
main
Choose a base branch
from
feature/reports-grant-course-filter
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
9 commits
Select commit
Hold shift + click to select a range
11cabc7
給付金コースのユーザ、日報を追加
karlley 7e5a84b
コース種別のフィルターを追加
karlley 3399cee
タブ選択時のstateとDOM状態がズレるバグを修正
karlley 2cc3580
パラメータを真偽値を使うように変更
karlley 2ee5283
aタグからbuttonタグを使うように変更
karlley d732967
給付金コースの日報が無い時にもフィルターを表示
karlley 9809e11
rubocopでMetrics/PerceivedComplexity:が出ないようにする
karlley c73d17e
給付金コースの不要なカテゴリの初期データを削除
karlley 088ac70
スコープ名の文脈とのズレを解消
karlley 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,57 @@ | ||
| export default class { | ||
| constructor(withGrant, setWithGrant) { | ||
| this.withGrant = withGrant | ||
| this.setWithGrant = setWithGrant | ||
| this.tabs = null | ||
| this.handleSelect = null | ||
| } | ||
|
|
||
| render(element) { | ||
| element.innerHTML = ` | ||
| <nav class="pill-nav"> | ||
| <ul class="pill-nav__items"> | ||
| <li class="pill-nav__item"> | ||
| <button class="pill-nav__item-link" data-with-grant="false">全て</button> | ||
| </li> | ||
| <li class="pill-nav__item"> | ||
| <button class="pill-nav__item-link" data-with-grant="true">給付金コース</button> | ||
| </li> | ||
| </ul> | ||
| </nav | ||
| ` | ||
|
|
||
| this.tabs = element.querySelectorAll('.pill-nav__item-link') | ||
|
|
||
| this.tabs.forEach((tab) => { | ||
| const tabWithGrant = tab.dataset.withGrant === 'true' | ||
| if (tabWithGrant === this.withGrant) { | ||
| tab.classList.add('is-active') | ||
| } | ||
| }) | ||
|
|
||
| this.handleSelect = (event) => { | ||
| const selectedTab = event.currentTarget | ||
| this.tabs.forEach((tab) => { | ||
| tab.classList.remove('is-active') | ||
| }) | ||
| selectedTab.classList.add('is-active') | ||
| const tabWithGrant = selectedTab.dataset.withGrant === 'true' | ||
| this.setWithGrant(tabWithGrant) | ||
| } | ||
|
|
||
| this.tabs.forEach((tab) => { | ||
| tab.addEventListener('click', this.handleSelect) | ||
| }) | ||
| } | ||
|
|
||
| destroy() { | ||
| if (!this.tabs || !this.handleSelect) return | ||
|
|
||
| this.tabs.forEach((tab) => { | ||
| tab.removeEventListener('click', this.handleSelect) | ||
| }) | ||
|
|
||
| this.tabs = null | ||
| this.handleSelect = null | ||
| } | ||
| } | ||
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 |
|---|---|---|
|
|
@@ -1555,3 +1555,23 @@ new-mentor: | |
| created_at: <%= Time.current %> | ||
| sent_student_followup_message: true | ||
| last_activity_at: <%= Time.current %> | ||
|
|
||
| grant-course: | ||
| login_name: grant-course | ||
| email: [email protected] | ||
| crypted_password: $2a$10$n/xv4/1luueN6plzm2OyDezWlZFyGHjQEf4hwAW1r3k.lCm0frPK. # testtest | ||
| salt: zW3kQ9ubsxQQtzzzs4ap | ||
| name: 給付金コースのユーザー | ||
| name_kana: 給付金コースのユーザー | ||
| github_account: grant-course | ||
| twitter_account: grant-course | ||
| facebook_url: https://www.facebook.com/fjordllc/grant-course | ||
| blog_url: http://grant-course.org | ||
| description: "給付金コースを受講中のユーザーです。" | ||
| course: course5 | ||
| job: office_worker | ||
| os: mac | ||
| organization: Rails大学 | ||
| updated_at: "2025-01-01 00:00:00" | ||
| created_at: "2025-01-01 00:00:00" | ||
| last_activity_at: "2025-01-01 00:00:00" | ||
|
Comment on lines
+1559
to
+1577
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. name_kana の形式について確認してください。 フィクスチャの追加自体は問題ありませんが、 name: 給付金コースのユーザー
name_kana: 給付金コースのユーザー # 他のフィクスチャは「キュウフキンコースノユーザー」のようなカタカナ形式テストデータとしては動作に影響しませんが、一貫性のために修正を検討してください。 ♻️ 修正案- name_kana: 給付金コースのユーザー
+ name_kana: キュウフキンコースノユーザー🤖 Prompt for AI Agents |
||
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.
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.
HTML構文エラー:
</nav>の閉じタグが不完全です。Line 20 で
</navとなっており、>が欠落しています。これによりHTMLのパースが正しく行われない可能性があります。🐛 修正案
element.innerHTML = ` <nav class="pill-nav"> <ul class="pill-nav__items"> <li class="pill-nav__item"> <button class="pill-nav__item-link" data-with-grant="false">全て</button> </li> <li class="pill-nav__item"> <button class="pill-nav__item-link" data-with-grant="true">給付金コース</button> </li> </ul> - </nav + </nav> `📝 Committable suggestion
🤖 Prompt for AI Agents