🤖 Auto commit for release 'develop' on 2025-09-26

This commit is contained in:
JC5
2025-09-26 19:43:39 +02:00
parent 853a99852e
commit d3c557ca22
103 changed files with 1411 additions and 1336 deletions

View File

@@ -28,6 +28,7 @@ use FireflyIII\User;
use Illuminate\Contracts\Auth\Authenticatable;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Support\Collection;
use function Safe\json_encode;
/**
@@ -36,16 +37,16 @@ use function Safe\json_encode;
class AccountSearch implements GenericSearchInterface
{
/** @var string */
public const string SEARCH_ALL = 'all';
public const string SEARCH_ALL = 'all';
/** @var string */
public const string SEARCH_IBAN = 'iban';
public const string SEARCH_IBAN = 'iban';
/** @var string */
public const string SEARCH_ID = 'id';
public const string SEARCH_ID = 'id';
/** @var string */
public const string SEARCH_NAME = 'name';
public const string SEARCH_NAME = 'name';
/** @var string */
public const string SEARCH_NUMBER = 'number';
@@ -62,9 +63,10 @@ class AccountSearch implements GenericSearchInterface
public function search(): Collection
{
$searchQuery = $this->user->accounts()
->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id')
->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')
->whereIn('account_types.type', $this->types);
->leftJoin('account_types', 'accounts.account_type_id', '=', 'account_types.id')
->leftJoin('account_meta', 'accounts.id', '=', 'account_meta.account_id')
->whereIn('account_types.type', $this->types)
;
$like = sprintf('%%%s%%', $this->query);
$originalQuery = $this->query;
@@ -135,7 +137,7 @@ class AccountSearch implements GenericSearchInterface
$this->types = $types;
}
public function setUser(Authenticatable | User | null $user): void
public function setUser(Authenticatable|User|null $user): void
{
if ($user instanceof User) {
$this->user = $user;