Skip to content
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

メンターダッシュボードの不具合を修正 #5740

Merged
merged 2 commits into from
Nov 7, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions app/javascript/products.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@
i.fa-regular.fa-smile
p.o-empty-message__text
| {{ title }}はありません
.page-content.is-products(v-else)
div(:class='contentClassName')(v-else)
nav.pagination(v-if='totalPages > 1')
pager(v-bind='pagerProps')
.page-body__columns
.page-body__column.is-main
div(:class='columnsClassName')
div(:class='columnClassName')
.a-card(v-if='productsGroupedByElapsedDays === null')
.card-list
.card-list__items
Expand All @@ -21,7 +21,7 @@
:currentUserId='currentUserId',
:isMentor='isMentor')
template(v-for='product_n_days_passed in productsGroupedByElapsedDays') <!-- product_n_days_passedはn日経過の提出物 -->
.a-card(
.a-card(:class='cardClassName')(
v-if='!isDashboard || (isDashboard && product_n_days_passed.elapsed_days >= 5)')
//- prettier-ignore: need space between v-if and id
header.card-header.a-elapsed-days(
Expand Down Expand Up @@ -62,7 +62,7 @@
| {{ product_n_days_passed.elapsed_days }}日経過
span.card-header__count(v-if='selectedTab === "unassigned"')
| ({{ countProductsGroupedBy(product_n_days_passed) }})
.card-list(:class='listClassName')
.card-list
.card-list__items
product(
v-for='product in product_n_days_passed.products',
Expand Down Expand Up @@ -140,8 +140,17 @@ export default {
clickHandle: this.paginateClickCallback
}
},
listClassName() {
return this.isDashboard ? 'has-scroll' : ''
contentClassName() {
return this.isDashboard ? 'block' : 'page-content is-products'
},
columnsClassName() {
return this.isDashboard ? 'block' : 'page-body__columns'
},
columnClassName() {
return this.isDashboard ? 'block' : 'page-body__column is-main'
},
cardClassName() {
return this.isDashboard ? 'h-auto' : ''
},
isDashboard() {
return location.pathname === '/'
Expand Down
5 changes: 1 addition & 4 deletions app/views/home/_mentor_dashboard.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,7 @@
h2.dashboard-category__title
| 提出物状況
.dashboard-category__body
.a-panels
.a-panels__items
.a-panels__item
#js-products(data-title="#{title}" data-selected-tab="unassigned" data-mentor-login="#{mentor_login?}" data-current-user-id="#{current_user.id}")
#js-products(data-title="#{title}" data-selected-tab="unassigned" data-mentor-login="#{mentor_login?}" data-current-user-id="#{current_user.id}")
.dashboard-contents__col.is-main
.dashboard-contents__categories
.dashboard-category
Expand Down