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

show画面でページネーションが表示されないように修正しました #6261

Merged
merged 1 commit into from
Feb 25, 2023
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
6 changes: 3 additions & 3 deletions app/javascript/components/Reports.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import Pagination from './Pagination'
import PracticeFilterDropdown from './PracticeFilterDropdown'
import UnconfirmedLink from './UnconfirmedLink'

export default function Reports({ all = false, userId = '', practices = false, unchecked = false, displayUserIcon = true, companyId = '', practiceId = '' }) {
export default function Reports({ all = false, userId = '', practices = false, unchecked = false, displayUserIcon = true, companyId = '', practiceId = '', displayPagination = true }) {
const per = 20
const neighbours = 4
const defaultPage = parseInt(queryString.parse(location.search).page) || 1
Expand Down Expand Up @@ -73,7 +73,7 @@ export default function Reports({ all = false, userId = '', practices = false, u
/>
)}
<div className="page-content reports">
{data.totalPages > 1 && (
{data.totalPages > 1 && displayPagination && (
<Pagination
sum={data.totalPages * per}
per={per}
Expand All @@ -99,7 +99,7 @@ export default function Reports({ all = false, userId = '', practices = false, u
{unchecked && (
<UnconfirmedLink label={'未チェックの日報を一括で開く'} />
)}
{data.totalPages > 1 && (
{data.totalPages > 1 && displayPagination && (
<Pagination
sum={data.totalPages * per}
per={per}
Expand Down
4 changes: 2 additions & 2 deletions app/views/reports/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@
| 提出物
.side-tabs-contents
.side-tabs-contents__item#side-tabs-content-1
= react_component('Reports', userId: @report.user.id, displayUserIcon: false)
= react_component('Reports', userId: @report.user.id, displayUserIcon: false, displayPagination: false)
.side-tabs-contents__item#side-tabs-content-2.is-only-mentor
.user-info
= render 'users/user_secret_attributes', user: @report.user
Expand All @@ -174,7 +174,7 @@
.o-empty-message__text
| 提出物はまだありません。
- else
= react_component('Reports', userId: @report.user.id, displayUserIcon: false)
= react_component('Reports', userId: @report.user.id, displayUserIcon: false, displayPagination: false)

- if flash[:notify_help] && flash[:celebrate_report_count]
= render '/shared/modal', id: 'modal-notify-help', modal_title: '🎉 おめでとう!', auto_show: true
Expand Down
2 changes: 1 addition & 1 deletion app/views/talks/show.html.slim
Original file line number Diff line number Diff line change
Expand Up @@ -86,4 +86,4 @@
class: 'a-button is-sm is-danger is-block'
div(data-vue="UserMentorMemo" data-vue-user-id:number="#{@user.id}" data-vue-products-mode:boolean="#{true}")
.side-tabs-contents__item#side-tabs-content-2
= react_component('Reports', userId: @user.id, displayUserIcon: false)
= react_component('Reports', userId: @user.id, displayUserIcon: false, displayPagination: false)