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:
2026-07-06 22:17:16 +02:00
parent a9da3a3e7d
commit f2d944b117
3 changed files with 76 additions and 13 deletions
+9 -1
View File
@@ -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,
]);
}