fix: [문서양식] 기본 표시 개수 200개로 변경 및 per_page 드롭다운 사라지는 문제 수정

This commit is contained in:
김보곤
2026-03-21 14:03:02 +09:00
parent 8fb171c360
commit acbb9dbc19
4 changed files with 7 additions and 9 deletions

View File

@@ -71,7 +71,7 @@ public function index(Request $request): View
}
$templates = $query->orderBy('updated_at', 'desc')
->paginate($request->input('per_page', 10));
->paginate($request->input('per_page', 200));
// 연결된 품목 ID 수집 및 품목명 조회
$allItemIds = $templates->pluck('linked_item_ids')->flatten()->filter()->unique()->values()->toArray();

View File

@@ -31,7 +31,7 @@ window.getCookie = function(name) {
window.getPerPageFromCookie = function() {
const savedPerPage = getCookie('pagination_per_page');
return savedPerPage ? savedPerPage : '10'; // 기본값 10
return savedPerPage ? savedPerPage : '200'; // 기본값 200
};
// ============================================

View File

@@ -32,7 +32,7 @@ class="bg-indigo-600 hover:bg-indigo-700 text-white px-4 py-2 rounded-lg transit
<!-- 필터 영역 -->
<x-filter-collapsible id="filterForm">
<form id="filterForm" class="flex flex-wrap gap-2 sm:gap-4">
<input type="hidden" name="per_page" id="perPageInput" value="10">
<input type="hidden" name="per_page" id="perPageInput" value="200">
<input type="hidden" name="page" id="pageInput" value="1">
<!-- 검색 -->

View File

@@ -159,9 +159,7 @@ class="text-gray-600 hover:text-red-600 transition"
</table>
</div>
<!-- 페이지네이션 -->
@if($templates->hasPages())
<div class="px-4 py-3 border-t border-gray-200">
@include('partials.pagination', ['paginator' => $templates, 'htmxTarget' => '#template-table', 'htmxTrigger' => 'filterSubmit'])
</div>
@endif
<!-- 페이지네이션 (항상 표시: per_page 드롭다운 포함) -->
<div class="px-4 py-3 border-t border-gray-200">
@include('partials.pagination', ['paginator' => $templates, 'htmxTarget' => '#template-table', 'htmxTrigger' => 'filterSubmit'])
</div>