mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-14 09:23:39 -06:00
Fix #2603
This commit is contained in:
parent
595a90cb0a
commit
ef85b1180f
app/Support/Binder
@ -55,8 +55,8 @@ class AccountList implements BinderInterface
|
||||
->where('account_types.type', AccountType::ASSET)
|
||||
->orderBy('accounts.name', 'ASC')
|
||||
->get(['accounts.*']);
|
||||
//Log::debug(sprintf('Collection length is %d', $collection->count()));
|
||||
}
|
||||
|
||||
if ('allAssetAccounts' !== $value) {
|
||||
$incoming = array_map('\intval', explode(',', $value));
|
||||
$list = array_merge(array_unique($incoming), [0]);
|
||||
|
@ -43,8 +43,15 @@ class BudgetList implements BinderInterface
|
||||
*/
|
||||
public static function routeBinder(string $value, Route $route): Collection
|
||||
{
|
||||
//Log::debug(sprintf('Now in BudgetList::routeBinder("%s")', $value));
|
||||
if (auth()->check()) {
|
||||
|
||||
if ('allBudgets' === $value) {
|
||||
return auth()->user()->budgets()->where('active', 1)
|
||||
->orderBy('order', 'ASC')
|
||||
->orderBy('name', 'ASC')
|
||||
->get();
|
||||
}
|
||||
|
||||
$list = array_unique(array_map('\intval', explode(',', $value)));
|
||||
|
||||
// @codeCoverageIgnoreStart
|
||||
|
@ -43,6 +43,12 @@ class CategoryList implements BinderInterface
|
||||
public static function routeBinder(string $value, Route $route): Collection
|
||||
{
|
||||
if (auth()->check()) {
|
||||
if ('allCategories' === $value) {
|
||||
return auth()->user()->categories()
|
||||
->orderBy('name', 'ASC')
|
||||
->get();
|
||||
}
|
||||
|
||||
$list = array_unique(array_map('\intval', explode(',', $value)));
|
||||
if (0 === count($list)) {
|
||||
throw new NotFoundHttpException; // @codeCoverageIgnore
|
||||
|
@ -44,6 +44,14 @@ class TagList implements BinderInterface
|
||||
public static function routeBinder(string $value, Route $route): Collection
|
||||
{
|
||||
if (auth()->check()) {
|
||||
|
||||
if ('allTags' === $value) {
|
||||
return auth()->user()->tags()
|
||||
->orderBy('tag', 'ASC')
|
||||
->get();
|
||||
}
|
||||
|
||||
|
||||
$list = array_unique(array_map('\strtolower', explode(',', $value)));
|
||||
Log::debug('List of tags is', $list);
|
||||
// @codeCoverageIgnoreStart
|
||||
|
Loading…
Reference in New Issue
Block a user