Skip to content

Commit

Permalink
Merge pull request #6261 from fjordllc/feature/reports-vue-to-react
Browse files Browse the repository at this point in the history
show画面でページネーションが表示されないように修正しました
  • Loading branch information
komagata authored Feb 25, 2023
2 parents ac8ef02 + 4690fc2 commit e65d60a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
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)

0 comments on commit e65d60a

Please sign in to comment.