-
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
会社個別 > 提出物一覧を vue.js 化した #4549
会社個別 > 提出物一覧を vue.js 化した #4549
Conversation
593cf9e
to
dc44442
Compare
|
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.
@clio209 さん
お疲れ様です。レビュー依頼ありがとうございました!遅くなってしまい申し訳ありません💦
提出物に関してあまり触れてこなかったので、とても勉強になりました!
コメントしましたので、ご確認いただけたらと思います🙏
|
||
def index | ||
@products = Product | ||
.list | ||
.order_for_list | ||
.page(params[:page]) | ||
@products = @products.joins(:user).where(users: { company_id: params[:company_id] }) if params[:company_id] |
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.
なるほど、joinsメソッドでテーブルを結合させて絞り込んでいるんですね👍
.thread-list.a-card | ||
= render partial: 'products/product', collection: @products, as: :product | ||
= paginate @products | ||
#js-company-products(company-id="#{@company.id}" data-title="#{title}" data-mentor-login="#{mentor_login?}" data-current-user-id="#{current_user.id}") |
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.
#js-company-products(company-id="#{@company.id}" data-title="#{title}" data-mentor-login="#{mentor_login?}" data-current-user-id="#{current_user.id}") | |
#js-company-products(company-id="#{@company.id}" data-title="#{title}" data-mentor-login="#{mentor_login?}" data-current-user-id="#{current_user.id}") |
page-body
を消すか、一段下げるかですかね🤔
<script> | ||
import Pager from 'pager.vue' | ||
import Product from 'product.vue' | ||
export default { |
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.
export default { | |
export default { |
公式ドキュメントなど1行空いていることが多い気がしますね
props: { | ||
title: title, | ||
companyID: companyID, | ||
isMentor: isMentor === 'true', |
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.
文字列で渡すことでwarningを回避しているんですね!
app/javascript/company-products.vue
Outdated
nav.pagination(v-if='totalPages > 1') | ||
pager(v-bind='pagerProps') |
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.
nav.pagination(v-if='totalPages > 1') | |
pager(v-bind='pagerProps') | |
nav.pagination(v-if='totalPages > 1') | |
pager(v-bind='pagerProps') |
こちらもcontainerの中のような気がします。
app/javascript/company-products.vue
Outdated
(this.params.tag ? `tags/${this.params.tag}` : '') + | ||
`?page=${this.currentPage}` + | ||
(this.params.target ? `&target=${this.params.target}` : '') + | ||
(this.params.watch ? `&watch=${this.params.watch}` : '') + |
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.
tag
、target
、watch
などユーザーに関連するものですかね🤔
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.
コメントありがとうございます。削除いたしました。
app/javascript/company-products.vue
Outdated
targetName() { | ||
return this.currentTag || this.currentTarget | ||
}, |
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.
今回使用されていないのでは…と思います!(多分company-userから流用してきた流れかと😄)
こちら以外にもこのvueファイルで不必要なメソッドなどがありそうなので、一度見返していただけたらと思います🙏
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.
有難うございます!!不必要な箇所を作事いたしました🙇♂️
|
||
<script> | ||
import Pager from 'pager.vue' | ||
import Product from 'product.vue' |
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.
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.
コメント有難うございます!komagataさんに確認いたします。
@komagata さん
こちら、この表記(提出者、メンター)が表示されても問題ないでしょうか?元来誰がコメントしているのかまでアイコンで見えることから、この表記が出ても論理的に問題ないのかなとは思います。またはこの表記を消した方が良いでしょうか?
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.
@clio209 こちらそのままで問題ございません〜
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.
@garammasala29 さん
レビュー有難うございます!修正しましたので、お時間ある時にご確認いただけますと幸いです。
fb36639
to
a735df6
Compare
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.
@clio209 さん
お疲れ様です。ご修正ありがとうございました😄
少しコメントしていますが、LGTMとさせていただきます👍
@@ -9,4 +9,4 @@ header.page-header | |||
- if current_user.admin? || current_user.mentor? | |||
= render 'products/tabs' | |||
|
|||
#js-products(data-title="#{title}" data-selected-tab="all" data-mentor-login="#{mentor_login?}" data-current-user-id="#{current_user.id}") | |||
#js-products(data-title="#{title}" data-selected-tab="all" data-mentor-login="#{mentor_login?}" data-current-user-id="#{current_user.id}") |
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.
今回のissueに関連はないかなと思うので、差分が出ていて気になりました!
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.
すいません、毎回コンフリクトが起こり、色々弄って先祖返りしたりしたためかと思われます。。恥💦💦
app/javascript/company-products.vue
Outdated
if (this.params.target) { | ||
return ( | ||
location.pathname + | ||
`?target=${this.params.target}` + |
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.
ここにもまだtarget
が残っていそうですね🤔
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.
ご確認本当にありがとうございます!!
@komagata |
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.
conflictの修正をお願いします〜
7823d1c
to
5473768
Compare
e2a76a6
to
df60ae1
Compare
@komagata |
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.
確認させて頂きました。OKです〜🙆♂️
概要
会社個別ページ>提出物一覧をvue.js化しました。以下のPRを参考にしています。
変更前
変更後
確認方法
feature/convert-companies-products-to-vuejsl
をローカルに取り込み、会社個別 > 提出物一覧画面でvue.js化されていることを確認する