This commit is contained in:
James Cole
2019-09-04 07:51:31 +02:00
parent 47de2fec28
commit d107e78641
17 changed files with 81 additions and 46 deletions

View File

@@ -57,6 +57,8 @@ class ShowController extends Controller
{
parent::__construct();
app('view')->share('showCategory', true);
// translations:
$this->middleware(
function ($request, $next) {
@@ -116,7 +118,7 @@ class ShowController extends Controller
$collector
->setAccounts(new Collection([$account]))
->setLimit($pageSize)
->setPage($page)->withAccountInformation()
->setPage($page)->withAccountInformation()->withCategoryInformation()
->setRange($start, $end);
$groups = $collector->getPaginatedGroups();
$groups->setPath(route('accounts.show', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]));
@@ -158,7 +160,7 @@ class ShowController extends Controller
$periods = new Collection;
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
$collector->setAccounts(new Collection([$account]))->setLimit($pageSize)->setPage($page)->withAccountInformation();
$collector->setAccounts(new Collection([$account]))->setLimit($pageSize)->setPage($page)->withAccountInformation()->withCategoryInformation();
$groups = $collector->getPaginatedGroups();
$groups->setPath(route('accounts.show.all', [$account->id]));
$chartUri = route('chart.account.period', [$account->id, $start->format('Y-m-d'), $end->format('Y-m-d')]);