mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-18 18:44:16 +00:00
Auto commit for release 'develop' on 2024-05-18
This commit is contained in:
@@ -55,8 +55,9 @@ class AccountController extends Controller
|
|||||||
$userGroup = $this->validateUserGroup($request);
|
$userGroup = $this->validateUserGroup($request);
|
||||||
$this->repository = app(AccountRepositoryInterface::class);
|
$this->repository = app(AccountRepositoryInterface::class);
|
||||||
$this->repository->setUserGroup($userGroup);
|
$this->repository->setUserGroup($userGroup);
|
||||||
$this->default = app('amount')->getDefaultCurrency();
|
$this->default = app('amount')->getDefaultCurrency();
|
||||||
$this->converter = app(ExchangeRateConverter::class);
|
$this->converter = app(ExchangeRateConverter::class);
|
||||||
|
|
||||||
return $next($request);
|
return $next($request);
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@@ -64,13 +64,13 @@ class CategoryController extends Controller
|
|||||||
public function categories(AutocompleteRequest $request): JsonResponse
|
public function categories(AutocompleteRequest $request): JsonResponse
|
||||||
{
|
{
|
||||||
$queryParameters = $request->getParameters();
|
$queryParameters = $request->getParameters();
|
||||||
$result = $this->repository->searchCategory($queryParameters['query'], $queryParameters['size']);
|
$result = $this->repository->searchCategory($queryParameters['query'], $queryParameters['size']);
|
||||||
$filtered = $result->map(
|
$filtered = $result->map(
|
||||||
static function (Category $item) {
|
static function (Category $item) {
|
||||||
return [
|
return [
|
||||||
'id' => (string)$item->id,
|
'id' => (string)$item->id,
|
||||||
'title' => $item->name,
|
'title' => $item->name,
|
||||||
'meta' => [],
|
'meta' => [],
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
@@ -67,8 +67,8 @@ class TransactionController extends Controller
|
|||||||
$result = $this->repository->searchJournalDescriptions($queryParameters['query'], $queryParameters['size']);
|
$result = $this->repository->searchJournalDescriptions($queryParameters['query'], $queryParameters['size']);
|
||||||
|
|
||||||
// limit and unique
|
// limit and unique
|
||||||
$filtered = $result->unique('description');
|
$filtered = $result->unique('description');
|
||||||
$array = [];
|
$array = [];
|
||||||
|
|
||||||
/** @var TransactionJournal $journal */
|
/** @var TransactionJournal $journal */
|
||||||
foreach ($filtered as $journal) {
|
foreach ($filtered as $journal) {
|
||||||
|
@@ -73,28 +73,28 @@ class AutocompleteRequest extends FormRequest
|
|||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|
||||||
// public function getData(): array
|
// public function getData(): array
|
||||||
// {
|
// {
|
||||||
//
|
//
|
||||||
// return [];
|
// return [];
|
||||||
// $types = $this->convertString('types');
|
// $types = $this->convertString('types');
|
||||||
// $array = [];
|
// $array = [];
|
||||||
// if ('' !== $types) {
|
// if ('' !== $types) {
|
||||||
// $array = explode(',', $types);
|
// $array = explode(',', $types);
|
||||||
// }
|
// }
|
||||||
// $limit = $this->convertInteger('limit');
|
// $limit = $this->convertInteger('limit');
|
||||||
// $limit = 0 === $limit ? 10 : $limit;
|
// $limit = 0 === $limit ? 10 : $limit;
|
||||||
//
|
//
|
||||||
// // remove 'initial balance' and another from allowed types. its internal
|
// // remove 'initial balance' and another from allowed types. its internal
|
||||||
// $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
|
// $array = array_diff($array, [AccountType::INITIAL_BALANCE, AccountType::RECONCILIATION]);
|
||||||
//
|
//
|
||||||
// return [
|
// return [
|
||||||
// 'types' => $array,
|
// 'types' => $array,
|
||||||
// 'query' => $this->convertString('query'),
|
// 'query' => $this->convertString('query'),
|
||||||
// 'date' => $this->getCarbonDate('date'),
|
// 'date' => $this->getCarbonDate('date'),
|
||||||
// 'limit' => $limit,
|
// 'limit' => $limit,
|
||||||
// ];
|
// ];
|
||||||
// }
|
// }
|
||||||
|
|
||||||
public function rules(): array
|
public function rules(): array
|
||||||
{
|
{
|
||||||
|
@@ -37,9 +37,9 @@ class FixIbans extends Command
|
|||||||
{
|
{
|
||||||
use ShowsFriendlyMessages;
|
use ShowsFriendlyMessages;
|
||||||
|
|
||||||
protected $description = 'Removes spaces from IBANs';
|
protected $description = 'Removes spaces from IBANs';
|
||||||
protected $signature = 'firefly-iii:fix-ibans';
|
protected $signature = 'firefly-iii:fix-ibans';
|
||||||
private int $count = 0;
|
private int $count = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Execute the console command.
|
* Execute the console command.
|
||||||
@@ -60,7 +60,7 @@ class FixIbans extends Command
|
|||||||
{
|
{
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
$iban = (string) $account->iban;
|
$iban = (string) $account->iban;
|
||||||
$newIban = app('steam')->filterSpaces($iban);
|
$newIban = app('steam')->filterSpaces($iban);
|
||||||
if ('' !== $iban && $iban !== $newIban) {
|
if ('' !== $iban && $iban !== $newIban) {
|
||||||
$account->iban = $newIban;
|
$account->iban = $newIban;
|
||||||
@@ -77,13 +77,13 @@ class FixIbans extends Command
|
|||||||
|
|
||||||
/** @var Account $account */
|
/** @var Account $account */
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
$userId = $account->user_id;
|
$userId = $account->user_id;
|
||||||
$set[$userId] ??= [];
|
$set[$userId] ??= [];
|
||||||
$iban = (string) $account->iban;
|
$iban = (string) $account->iban;
|
||||||
if ('' === $iban) {
|
if ('' === $iban) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
$type = $account->accountType->type;
|
$type = $account->accountType->type;
|
||||||
if (in_array($type, [AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], true)) {
|
if (in_array($type, [AccountType::LOAN, AccountType::DEBT, AccountType::MORTGAGE], true)) {
|
||||||
$type = 'liabilities';
|
$type = 'liabilities';
|
||||||
}
|
}
|
||||||
|
@@ -124,7 +124,7 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
|
|
||||||
public function findByIbanNull(string $iban, array $types): ?Account
|
public function findByIbanNull(string $iban, array $types): ?Account
|
||||||
{
|
{
|
||||||
$iban = Steam::filterSpaces($iban);
|
$iban = Steam::filterSpaces($iban);
|
||||||
$query = $this->user->accounts()->where('iban', '!=', '')->whereNotNull('iban');
|
$query = $this->user->accounts()->where('iban', '!=', '')->whereNotNull('iban');
|
||||||
|
|
||||||
if (0 !== count($types)) {
|
if (0 !== count($types)) {
|
||||||
|
@@ -81,7 +81,7 @@ class AccountRepository implements AccountRepositoryInterface
|
|||||||
|
|
||||||
public function findByIbanNull(string $iban, array $types): ?Account
|
public function findByIbanNull(string $iban, array $types): ?Account
|
||||||
{
|
{
|
||||||
$iban = Steam::filterSpaces($iban);
|
$iban = Steam::filterSpaces($iban);
|
||||||
$query = $this->userGroup->accounts()->where('iban', '!=', '')->whereNotNull('iban');
|
$query = $this->userGroup->accounts()->where('iban', '!=', '')->whereNotNull('iban');
|
||||||
|
|
||||||
if (0 !== count($types)) {
|
if (0 !== count($types)) {
|
||||||
|
@@ -96,7 +96,6 @@ class UniqueIban implements ValidationRule
|
|||||||
$maxCounts = $this->getMaxOccurrences();
|
$maxCounts = $this->getMaxOccurrences();
|
||||||
|
|
||||||
foreach ($maxCounts as $type => $max) {
|
foreach ($maxCounts as $type => $max) {
|
||||||
|
|
||||||
// make sure to trim the value of $value so all spaces are removed.
|
// make sure to trim the value of $value so all spaces are removed.
|
||||||
$value = Steam::filterSpaces($value);
|
$value = Steam::filterSpaces($value);
|
||||||
|
|
||||||
|
@@ -140,6 +140,7 @@ trait ConvertsDataTypes
|
|||||||
public function clearIban(?string $string): ?string
|
public function clearIban(?string $string): ?string
|
||||||
{
|
{
|
||||||
$string = $this->clearString($string);
|
$string = $this->clearString($string);
|
||||||
|
|
||||||
return Steam::filterSpaces($string);
|
return Steam::filterSpaces($string);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -682,7 +682,7 @@ class Steam
|
|||||||
"\u{3000}", // ideographic space
|
"\u{3000}", // ideographic space
|
||||||
"\u{FEFF}", // zero width no -break space
|
"\u{FEFF}", // zero width no -break space
|
||||||
"\x20", // plain old normal space,
|
"\x20", // plain old normal space,
|
||||||
' '
|
' ',
|
||||||
];
|
];
|
||||||
|
|
||||||
// clear zalgo text
|
// clear zalgo text
|
||||||
|
@@ -117,7 +117,7 @@ return [
|
|||||||
'expression_engine' => false,
|
'expression_engine' => false,
|
||||||
// see cer.php for exchange rates feature flag.
|
// see cer.php for exchange rates feature flag.
|
||||||
],
|
],
|
||||||
'version' => 'develop/2024-05-16',
|
'version' => 'develop/2024-05-18',
|
||||||
'api_version' => '2.0.14',
|
'api_version' => '2.0.14',
|
||||||
'db_version' => 24,
|
'db_version' => 24,
|
||||||
|
|
||||||
|
@@ -2157,7 +2157,7 @@ return [
|
|||||||
'logout' => 'Desconectar',
|
'logout' => 'Desconectar',
|
||||||
'logout_other_sessions' => 'Sair de todas as outras sessões',
|
'logout_other_sessions' => 'Sair de todas as outras sessões',
|
||||||
'toggleNavigation' => 'Alternar navegação',
|
'toggleNavigation' => 'Alternar navegação',
|
||||||
'toggle_dropdown' => 'Toggle dropdown',
|
'toggle_dropdown' => 'Ativar/Desativar Menu Suspenso',
|
||||||
'searchPlaceholder' => 'Pesquisar...',
|
'searchPlaceholder' => 'Pesquisar...',
|
||||||
'version' => 'Versão',
|
'version' => 'Versão',
|
||||||
'dashboard' => 'Painel de Controle',
|
'dashboard' => 'Painel de Controle',
|
||||||
|
Reference in New Issue
Block a user