Operacje: nowrap dla daty/kwoty, ucinanie opisu i stronicowanie 10/str
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -21,12 +21,20 @@ class Operations extends BaseController
|
||||
'type' => $this->request->getGet('type'),
|
||||
];
|
||||
|
||||
$perPage = 10;
|
||||
$total = $this->model()->countFiltered($f);
|
||||
$pages = max(1, (int) ceil($total / $perPage));
|
||||
$page = min($pages, max(1, (int) $this->request->getGet('page')));
|
||||
|
||||
return view('operations/index', [
|
||||
'title' => 'Operacje',
|
||||
'operations' => $this->model()->filtered($f),
|
||||
'operations' => $this->model()->filtered($f, $perPage, $page),
|
||||
'totals' => $this->model()->totals($f),
|
||||
'categories' => model(CategoryModel::class)->tree(),
|
||||
'filter' => $f,
|
||||
'page' => $page,
|
||||
'pages' => $pages,
|
||||
'total' => $total,
|
||||
]);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user