Some updates to the tag overview for #3066 and #3067

This commit is contained in:
James Cole
2020-01-30 18:56:08 +01:00
parent a6fab50c20
commit b697b71e59
5 changed files with 127 additions and 103 deletions

View File

@@ -159,7 +159,9 @@ class ReportController extends Controller
// get journals for entire period:
$data = [];
$chartData = [];
$chartData = [
];
/** @var GroupCollectorInterface $collector */
$collector = app(GroupCollectorInterface::class);
$collector->setRange($start, $end)->withAccountInformation();

View File

@@ -201,18 +201,17 @@ class TagController extends Controller
$newestTagDate = null === $repository->newestTag() ? new Carbon : $repository->newestTag()->date;
$oldestTagDate->startOfYear();
$newestTagDate->endOfYear();
$clouds = [];
$clouds['no-date'] = $repository->tagCloud(null);
$tags = [];
$tags['no-date'] = $repository->getTagsInYear(null);
while ($newestTagDate > $oldestTagDate) {
$year = $newestTagDate->year;
$clouds[$year] = $repository->tagCloud($year);
$tags[$year] = $repository->getTagsInYear($year);
$newestTagDate->subYear();
}
$count = $repository->count();
return view('tags.index', compact('clouds', 'count'));
return view('tags.index', compact('tags', 'count'));
}
/**