Skip to content

Commit

Permalink
Merge pull request #5740 from fjordllc/fix0panels
Browse files Browse the repository at this point in the history
メンターダッシュボードの不具合を修正
  • Loading branch information
machida authored Nov 7, 2022
2 parents 2a1af3b + fac6e87 commit 3acf02e
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 11 deletions.
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

0 comments on commit 3acf02e

Please sign in to comment.