From 26da10fdf27fcea37f1f8abee81e75c2609f0879 Mon Sep 17 00:00:00 2001 From: teppei machida Date: Sat, 5 Nov 2022 02:28:59 +0900 Subject: [PATCH 1/2] =?UTF-8?q?panels=E3=81=AE=E3=83=87=E3=82=B6=E3=82=A4?= =?UTF-8?q?=E3=83=B3=E5=B4=A9=E3=82=8C=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/atoms/_a-panels.sass | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/assets/stylesheets/atoms/_a-panels.sass b/app/assets/stylesheets/atoms/_a-panels.sass index 05d189413cc..275bb442b11 100644 --- a/app/assets/stylesheets/atoms/_a-panels.sass +++ b/app/assets/stylesheets/atoms/_a-panels.sass @@ -7,3 +7,5 @@ .a-panels__item .a-card +size(100%) + .page-body__columns + display: block From fac6e87c6d2e5f69b1a3b5a0646b19eda9ce2a76 Mon Sep 17 00:00:00 2001 From: teppei machida Date: Mon, 7 Nov 2022 11:17:39 +0900 Subject: [PATCH 2/2] =?UTF-8?q?=E3=83=A1=E3=83=B3=E3=82=BF=E3=83=BC?= =?UTF-8?q?=E3=83=80=E3=83=83=E3=82=B7=E3=83=A5=E3=83=9C=E3=83=BC=E3=83=89?= =?UTF-8?q?=E3=81=AE=E4=B8=8D=E5=85=B7=E5=90=88=E3=82=92=E4=BF=AE=E6=AD=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/assets/stylesheets/atoms/_a-panels.sass | 2 -- app/javascript/products.vue | 23 ++++++++++++++------- app/views/home/_mentor_dashboard.html.slim | 5 +---- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/app/assets/stylesheets/atoms/_a-panels.sass b/app/assets/stylesheets/atoms/_a-panels.sass index 275bb442b11..05d189413cc 100644 --- a/app/assets/stylesheets/atoms/_a-panels.sass +++ b/app/assets/stylesheets/atoms/_a-panels.sass @@ -7,5 +7,3 @@ .a-panels__item .a-card +size(100%) - .page-body__columns - display: block diff --git a/app/javascript/products.vue b/app/javascript/products.vue index 04e41c7e0ac..271f05dc06b 100644 --- a/app/javascript/products.vue +++ b/app/javascript/products.vue @@ -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 @@ -21,7 +21,7 @@ :currentUserId='currentUserId', :isMentor='isMentor') template(v-for='product_n_days_passed in productsGroupedByElapsedDays') - .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( @@ -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', @@ -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 === '/' diff --git a/app/views/home/_mentor_dashboard.html.slim b/app/views/home/_mentor_dashboard.html.slim index e2e80e0a11c..ff63270ba2b 100644 --- a/app/views/home/_mentor_dashboard.html.slim +++ b/app/views/home/_mentor_dashboard.html.slim @@ -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