-
Notifications
You must be signed in to change notification settings - Fork 71
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
【メンター向け機能】提出物に未アサインタブを追加 #3027
Merged
komagata
merged 18 commits into
main
from
feature/add-not-assigned-tab-to-products-page
Aug 13, 2021
Merged
【メンター向け機能】提出物に未アサインタブを追加 #3027
Changes from all commits
Commits
Show all changes
18 commits
Select commit
Hold shift + click to select a range
05bad16
unassigned_controllerを作成
fugakkbn 816e193
API用のunassigned_controllerを作成
fugakkbn 8fa0233
unassigned_controllerのjbuilderファイルを作成
fugakkbn 5cca45f
unassigned_controller#indexのviewファイルを作成
fugakkbn ccdc979
unassignedのルーティングを追加
fugakkbn 845c3df
unassignedのscopeを追加
fugakkbn 84c85c9
Cacheクラスにunassigned用のメソッドを追加
fugakkbn 2dce584
ProductCallbacksでunassigned用のキャッシュクリアを追加
fugakkbn 05e05cb
メンター用の提出物一覧ページに「未アサイン」タブを追加
fugakkbn c4e5f0d
「未アサイン」タブ用にVueファイルを修正
fugakkbn 2c7354b
システムテストを追加
fugakkbn 0d9c969
テストを個数に依存しない形に修正
fugakkbn 7f842c1
システムテストを追加
fugakkbn fdd4898
左メニューの提出物ボタンに表示される数を未アサインの提出物数に変更
fugakkbn ffc548f
テストを個数に依存しない形に修正
fugakkbn 32f5656
テストの重複を削除
fugakkbn 9617b51
未アサインタブとそのカウンターにid属性を付与
fugakkbn e57d961
テストを修正
fugakkbn 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 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 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,11 @@ | ||
# frozen_string_literal: true | ||
|
||
class API::Products::UnassignedController < API::BaseController | ||
before_action :require_staff_login_for_api | ||
def index | ||
@products = Product.unassigned.unchecked.not_wip.list.page(params[:page]) | ||
@latest_product_submitted_just_5days = @products.find { |product| product.elapsed_days == 5 } | ||
@latest_product_submitted_just_6days = @products.find { |product| product.elapsed_days == 6 } | ||
@latest_product_submitted_over_7days = @products.find { |product| product.elapsed_days >= 7 } | ||
end | ||
end |
This file contains 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,6 @@ | ||
# frozen_string_literal: true | ||
|
||
class Products::UnassignedController < ApplicationController | ||
before_action :require_staff_login | ||
def index; end | ||
end |
This file contains 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 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 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 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 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 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,9 @@ | ||
json.products do | ||
json.array! @products do |product| | ||
json.partial! "api/products/product", product: product | ||
end | ||
end | ||
json.total_pages @products.page(1).total_pages | ||
json.latest_product_submitted_just_5days @latest_product_submitted_just_5days | ||
json.latest_product_submitted_just_6days @latest_product_submitted_just_6days | ||
json.latest_product_submitted_over_7days @latest_product_submitted_over_7days |
This file contains 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 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 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,12 @@ | ||
- title '未アサインの提出物' | ||
|
||
header.page-header | ||
.container | ||
.page-header__inner | ||
h2.page-header__title | ||
= title | ||
|
||
.page-tools | ||
= render 'products/tabs' | ||
|
||
#js-products(data-title="#{title}" data-selected-tab="unassigned" data-mentor-login="#{mentor_login?}" data-current-user-id="#{current_user.id}") |
This file contains 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 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
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.
/products/unassigned?read=false
みたいにパラメーターが追加されたときに動きがおかしくなったりは大丈夫でしょうか~?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.
#3067 (comment)
こちらでやりとりさせてもらったのと同様に、クエリパラメーターが追加されても大丈夫そうです🙆🏻♂️
念のため動作確認もしましたが挙動は変わらずでした。