diff --git a/app/Support/Binder/AccountList.php b/app/Support/Binder/AccountList.php index 24b249db28..2c1baab334 100644 --- a/app/Support/Binder/AccountList.php +++ b/app/Support/Binder/AccountList.php @@ -23,6 +23,7 @@ declare(strict_types=1); namespace FireflyIII\Support\Binder; use FireflyIII\Models\Account; +use FireflyIII\Models\AccountType; use Illuminate\Routing\Route; use Illuminate\Support\Collection; use Log; @@ -44,22 +45,35 @@ class AccountList implements BinderInterface public static function routeBinder(string $value, Route $route): Collection { if (auth()->check()) { - $list = []; - $incoming = explode(',', $value); - foreach ($incoming as $entry) { - $list[] = (int)$entry; + + $collection = new Collection; + if ($value === 'allAssetAccounts') { + /** @var \Illuminate\Support\Collection $collection */ + $collection = auth()->user()->accounts() + ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id') + ->where('account_types.type', AccountType::ASSET) + ->get(['accounts.*']); } - $list = array_unique($list); - if (\count($list) === 0) { - Log::error('Account list is empty.'); - throw new NotFoundHttpException; // @codeCoverageIgnore + if ($value !== 'allAssetAccounts') { + + $list = []; + $incoming = explode(',', $value); + foreach ($incoming as $entry) { + $list[] = (int)$entry; + } + $list = array_unique($list); + if (\count($list) === 0) { + Log::error('Account list is empty.'); + throw new NotFoundHttpException; // @codeCoverageIgnore + } + + /** @var \Illuminate\Support\Collection $collection */ + $collection = auth()->user()->accounts() + ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id') + ->whereIn('accounts.id', $list) + ->get(['accounts.*']); } - /** @var \Illuminate\Support\Collection $collection */ - $collection = auth()->user()->accounts() - ->leftJoin('account_types', 'account_types.id', '=', 'accounts.account_type_id') - ->whereIn('accounts.id', $list) - ->get(['accounts.*']); if ($collection->count() > 0) { $collection = $collection->sortBy( function (Account $account) { diff --git a/public/css/firefly.css b/public/css/firefly.css index 25487e0ffe..dacc76681a 100644 --- a/public/css/firefly.css +++ b/public/css/firefly.css @@ -153,7 +153,7 @@ body.waiting * { } span.info-box-text a, span.info-box-number a { - color: #000; + color: #fff; } span.info-box-icon a { @@ -161,7 +161,7 @@ span.info-box-icon a { } span.info-box-text a:hover, span.info-box-number a:hover { - color: #000; + color: #fff; text-decoration: underline; } @@ -169,4 +169,4 @@ span.info-box-text a:hover, span.info-box-number a:hover { max-height: 300px; overflow-y: auto; overflow-x: hidden; -} \ No newline at end of file +} diff --git a/resources/views/partials/boxes.twig b/resources/views/partials/boxes.twig index 583e00f2a2..68708cbc25 100644 --- a/resources/views/partials/boxes.twig +++ b/resources/views/partials/boxes.twig @@ -6,7 +6,8 @@
- {{ 'balance'|_ }} + + {{ 'balance'|_ }}
@@ -14,7 +15,6 @@
-
@@ -26,7 +26,7 @@
- {{ 'bills_to_pay'|_ }} + {{ 'bills_to_pay'|_ }}
@@ -45,7 +45,7 @@
- {{ 'left_to_spend'|_ }} + {{ 'left_to_spend'|_ }}
@@ -65,7 +65,8 @@
- {{ 'net_worth'|_ }} + + {{ 'net_worth'|_ }}