This commit is contained in:
Adrian Hopek
2022-04-08 12:42:24 +02:00
parent 4af0482a93
commit 6506855bba
50 changed files with 581 additions and 196 deletions

View File

@@ -33,7 +33,8 @@ class YearPeriodRetriever
$selected = $this->selected();
$current = $this->current();
$years = YearPeriod::query()->whereIn("year", $this->offset($selected->year))->get();
$years = YearPeriod::all();
$navigation = $years->map(fn(YearPeriod $yearPeriod) => $this->toNavigation($yearPeriod));
return [
@@ -43,11 +44,6 @@ class YearPeriodRetriever
];
}
protected function offset(int $year): array
{
return range($year - 2, $year + 2);
}
protected function toNavigation(YearPeriod $yearPeriod): array
{
return [