mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Small chart improvements for #1865
This commit is contained in:
parent
d1c7a9767a
commit
5011531066
@ -383,8 +383,12 @@ class CategoryController extends Controller
|
|||||||
{
|
{
|
||||||
$range = app('preferences')->get('viewRange', '1M')->data;
|
$range = app('preferences')->get('viewRange', '1M')->data;
|
||||||
$start = app('navigation')->startOfPeriod($date, $range);
|
$start = app('navigation')->startOfPeriod($date, $range);
|
||||||
$end = app('navigation')->endOfPeriod($date, $range);
|
$end = session()->get('end');
|
||||||
$data = $this->makePeriodChart($category, $start, $end);
|
if ($end < $start) {
|
||||||
|
$end = app('navigation')->endOfPeriod($date, $range);
|
||||||
|
}
|
||||||
|
|
||||||
|
$data = $this->makePeriodChart($category, $start, $end);
|
||||||
|
|
||||||
return response()->json($data);
|
return response()->json($data);
|
||||||
}
|
}
|
||||||
@ -411,7 +415,7 @@ class CategoryController extends Controller
|
|||||||
|
|
||||||
|
|
||||||
if ($cache->has()) {
|
if ($cache->has()) {
|
||||||
return $cache->get(); // @codeCoverageIgnore
|
//return $cache->get(); // @codeCoverageIgnore
|
||||||
}
|
}
|
||||||
|
|
||||||
/** @var AccountRepositoryInterface $accountRepository */
|
/** @var AccountRepositoryInterface $accountRepository */
|
||||||
|
Loading…
Reference in New Issue
Block a user