diff --git a/app/javascript/elapsed_days.vue b/app/javascript/elapsed_days.vue
deleted file mode 100644
index 6a8f156caa0..00000000000
--- a/app/javascript/elapsed_days.vue
+++ /dev/null
@@ -1,57 +0,0 @@
-
-nav.page-body__column.is-sub
- .page-nav.a-card
- ol.page-nav__items.elapsed-days
- li.page-nav__item.is-reply-deadline(
- :class='activeClass(countProductsByElapsedDays(7))')
- a.page-nav__item-link(href='#7days-elapsed')
- span.page-nav__item-link-inner
- | 7日以上経過
- | ({{ countProductsByElapsedDays(7) }})
- li.page-nav__item.is-reply-alert(
- :class='activeClass(countProductsByElapsedDays(6))')
- a.page-nav__item-link(href='#6days-elapsed')
- span.page-nav__item-link-inner
- | 6日経過
- | ({{ countProductsByElapsedDays(6) }})
- li.page-nav__item.is-reply-warning(
- :class='activeClass(countProductsByElapsedDays(5))')
- a.page-nav__item-link(href='#5days-elapsed')
- span.page-nav__item-link-inner
- | 5日経過
- | ({{ countProductsByElapsedDays(5) }})
- li.page-nav__item(
- v-for='passedDay in [4, 3, 2, 1]',
- :class='activeClass(countProductsByElapsedDays(passedDay))')
- a.page-nav__item-link(:href='"#" + passedDay + "days-elapsed"')
- span.page-nav__item-link-inner
- | {{ passedDay }}日経過
- | ({{ countProductsByElapsedDays(passedDay) }})
- li.page-nav__item(:class='activeClass(countProductsByElapsedDays(0))')
- a.page-nav__item-link(href='#0days-elapsed')
- span.page-nav__item-link-inner
- | 今日提出
- | ({{ countProductsByElapsedDays(0) }})
-
-
-
diff --git a/app/javascript/products.js b/app/javascript/products.js
index c5fca65084b..b92721d6e1b 100644
--- a/app/javascript/products.js
+++ b/app/javascript/products.js
@@ -7,20 +7,16 @@ document.addEventListener('DOMContentLoaded', () => {
const products = document.querySelector(selector)
if (products) {
const title = products.getAttribute('data-title')
- const selectedTab = products.getAttribute('data-selected-tab')
const isMentor = products.getAttribute('data-mentor-login')
const currentUserId = Number(products.getAttribute('data-current-user-id'))
- const checkerId = products.getAttribute('data-checker-id')
new Vue({
store,
render: (h) =>
h(Products, {
props: {
title: title,
- selectedTab: selectedTab,
isMentor: isMentor === 'true',
- currentUserId: currentUserId,
- checkerId: checkerId
+ currentUserId: currentUserId
}
})
}).$mount(selector)
diff --git a/app/javascript/products.vue b/app/javascript/products.vue
index e7a710fa674..0aeb90fcbe7 100644
--- a/app/javascript/products.vue
+++ b/app/javascript/products.vue
@@ -1,10 +1,6 @@
.page-content.is-products(v-if='!loaded')
- .page-body__columns(v-if='isUnassigned')
- .page-body__column.is-main
- loadingListPlaceholder
- nav.page-body__column.is-sub
- div(v-else)
+ div
loadingListPlaceholder
.o-empty-message(v-else-if='products.length === 0')
@@ -19,73 +15,6 @@
p.o-empty-message__text
| 5日経過した提出物はありません
-//- 未アサイン
-.page-content.is-products(v-else-if='isUnassigned')
- .page-body__columns
- .page-body__column.is-main
- template(v-for='product_n_days_passed in productsGroupedByElapsedDays')
- .a-card(
- v-if='!isDashboard || (isDashboard && product_n_days_passed.elapsed_days >= 5)')
- //- TODO 以下を共通化する
- //- prettier-ignore: need space between v-if and id
- header.card-header.a-elapsed-days(
- v-if='product_n_days_passed.elapsed_days === 0', id='0days-elapsed'
- )
- h2.card-header__title
- | 今日提出
- span.card-header__count(v-if='selectedTab === "unassigned"')
- | ({{ countProductsGroupedBy(product_n_days_passed) }})
- //- prettier-ignore: need space between v-else-if and id
- header.card-header.a-elapsed-days.is-reply-warning(
- v-else-if='product_n_days_passed.elapsed_days === 5', id='5days-elapsed'
- )
- h2.card-header__title
- | {{ product_n_days_passed.elapsed_days }}日経過
- span.card-header__count(v-if='selectedTab === "unassigned"')
- | ({{ countProductsGroupedBy(product_n_days_passed) }})
- //- prettier-ignore: need space between v-else-if and id
- header.card-header.a-elapsed-days.is-reply-alert(
- v-else-if='product_n_days_passed.elapsed_days === 6', id='6days-elapsed'
- )
- h2.card-header__title
- | {{ product_n_days_passed.elapsed_days }}日経過
- span.card-header__count(v-if='selectedTab === "unassigned"')
- | ({{ countProductsGroupedBy(product_n_days_passed) }})
- //- prettier-ignore: need space between v-else-if and id
- header.card-header.a-elapsed-days.is-reply-deadline(
- v-else-if='product_n_days_passed.elapsed_days === 7', id='7days-elapsed'
- )
- h2.card-header__title
- | {{ product_n_days_passed.elapsed_days }}日以上経過
- span.card-header__count(v-if='selectedTab === "unassigned"')
- | ({{ countProductsGroupedBy(product_n_days_passed) }})
- header.card-header.a-elapsed-days(
- v-else,
- :id='elapsedDaysId(product_n_days_passed.elapsed_days)')
- h2.card-header__title
- | {{ product_n_days_passed.elapsed_days }}日経過
- span.card-header__count(v-if='selectedTab === "unassigned"')
- | ({{ countProductsGroupedBy(product_n_days_passed) }})
- //- 共通化ここまで
-
- .card-list
- .card-list__items
- product(
- v-for='product in product_n_days_passed.products',
- :key='product.id',
- :product='product',
- :currentUserId='currentUserId',
- :isMentor='isMentor',
- :display-user-icon='displayUserIcon')
- .under-cards(v-if='isDashboard')
- unconfirmed-links-open-button(
- v-if='isMentor && selectedTab != "all" && !isDashboard',
- :label='`${unconfirmedLinksName}の提出物を一括で開く`')
- elapsedDays(
- v-if='!isDashboard && selectedTab === "unassigned"',
- :productsGroupedByElapsedDays='productsGroupedByElapsedDays',
- :countProductsGroupedBy='countProductsGroupedBy')
-
//- ダッシュボード
div(v-else-if='isDashboard')
template(v-for='product_n_days_passed in productsGroupedByElapsedDays')
@@ -98,7 +27,7 @@ div(v-else-if='isDashboard')
)
h2.card-header__title
| 今日提出
- span.card-header__count(v-if='selectedTab === "unassigned"')
+ span.card-header__count
| ({{ countProductsGroupedBy(product_n_days_passed) }})
//- prettier-ignore: need space between v-else-if and id
header.card-header.a-elapsed-days.is-reply-warning(
@@ -106,7 +35,7 @@ div(v-else-if='isDashboard')
)
h2.card-header__title
| {{ product_n_days_passed.elapsed_days }}日経過
- span.card-header__count(v-if='selectedTab === "unassigned"')
+ span.card-header__count
| ({{ countProductsGroupedBy(product_n_days_passed) }})
//- prettier-ignore: need space between v-else-if and id
header.card-header.a-elapsed-days.is-reply-alert(
@@ -114,7 +43,7 @@ div(v-else-if='isDashboard')
)
h2.card-header__title
| {{ product_n_days_passed.elapsed_days }}日経過
- span.card-header__count(v-if='selectedTab === "unassigned"')
+ span.card-header__count
| ({{ countProductsGroupedBy(product_n_days_passed) }})
//- prettier-ignore: need space between v-else-if and id
header.card-header.a-elapsed-days.is-reply-deadline(
@@ -122,14 +51,14 @@ div(v-else-if='isDashboard')
)
h2.card-header__title
| {{ product_n_days_passed.elapsed_days }}日以上経過
- span.card-header__count(v-if='selectedTab === "unassigned"')
+ span.card-header__count
| ({{ countProductsGroupedBy(product_n_days_passed) }})
header.card-header.a-elapsed-days(
v-else,
:id='elapsedDaysId(product_n_days_passed.elapsed_days)')
h2.card-header__title
| {{ product_n_days_passed.elapsed_days }}日経過
- span.card-header__count(v-if='selectedTab === "unassigned"')
+ span.card-header__count
| ({{ countProductsGroupedBy(product_n_days_passed) }})
//- 共通化ここまで
@@ -155,95 +84,38 @@ div(v-else-if='isDashboard')
href='/products/unassigned#4days-elapsed',
v-else)
| {{ countAlmostPassed5days() }}件の提出物が、
8時間以内に5日経過に到達します。
-
-//- 全て, 未完了
-.page-content.is-products(v-else)
- nav.pagination(v-if='totalPages > 1')
- pager(v-bind='pagerProps')
- .a-card
- .card-list
- .card-list__items
- product(
- v-for='product in products',
- :key='product.id',
- :product='product',
- :currentUserId='currentUserId',
- :isMentor='isMentor',
- :display-user-icon='displayUserIcon')
- unconfirmed-links-open-button(
- v-if='isMentor && selectedTab != "all" && !isDashboard',
- :label='`${unconfirmedLinksName}の提出物を一括で開く`')
- nav.pagination(v-if='totalPages > 1')
- pager(v-bind='pagerProps')
diff --git a/app/javascript/unconfirmed_links_open_button.vue b/app/javascript/unconfirmed_links_open_button.vue
deleted file mode 100644
index f207a73e2ba..00000000000
--- a/app/javascript/unconfirmed_links_open_button.vue
+++ /dev/null
@@ -1,27 +0,0 @@
-
-div
- hr.a-border-tint
- .unconfirmed_links.card-footer.is-only-mentor
- .card-main-actions
- ul.card-main-actions__items
- li.card-main-actions__item
- button.thread-unconfirmed-links-form__action.a-button.is-block.is-sm.is-secondary(
- @click='openUnconfirmedItems()') {{ label }}
-
-
diff --git a/app/views/home/_mentor_dashboard.html.slim b/app/views/home/_mentor_dashboard.html.slim
index b52af0ef875..51ec79ecb38 100644
--- a/app/views/home/_mentor_dashboard.html.slim
+++ b/app/views/home/_mentor_dashboard.html.slim
@@ -9,7 +9,7 @@
h2.dashboard-category__title
| 提出物状況
.dashboard-category__body
- #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-mentor-login="#{mentor_login?}" data-current-user-id="#{current_user.id}")
.dashboard-contents__col.is-main
.dashboard-contents__categories
.dashboard-category