Various code cleanup and fixed alignments.

This commit is contained in:
James Cole
2024-01-01 14:41:31 +01:00
parent 8b9dce70bb
commit 657262f179
119 changed files with 1022 additions and 1021 deletions

View File

@@ -72,12 +72,12 @@ class AccountController extends Controller
*/
public function accounts(AutocompleteRequest $request): JsonResponse
{
$data = $request->getData();
$types = $data['types'];
$query = $data['query'];
$date = $data['date'] ?? today(config('app.timezone'));
$return = [];
$result = $this->repository->searchAccount((string) $query, $types, $this->parameters->get('limit'));
$data = $request->getData();
$types = $data['types'];
$query = $data['query'];
$date = $data['date'] ?? today(config('app.timezone'));
$return = [];
$result = $this->repository->searchAccount((string) $query, $types, $this->parameters->get('limit'));
// TODO this code is duplicated in the V2 Autocomplete controller, which means this code is due to be deprecated.
$defaultCurrency = app('amount')->getDefaultCurrency();
@@ -96,7 +96,7 @@ class AccountController extends Controller
);
}
$return[] = [
$return[] = [
'id' => (string) $account->id,
'name' => $account->name,
'name_with_balance' => $nameWithBalance,