mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-09-04 19:53:44 +00:00
Can now update order of accounts efficiently.
This commit is contained in:
@@ -82,6 +82,7 @@ class ShowController extends Controller
|
||||
$pageSize = (int)app('preferences')->getForUser(auth()->user(), 'listPageSize', 50)->data;
|
||||
|
||||
// get list of accounts. Count it and split it.
|
||||
$this->repository->sortAccounts();
|
||||
$collection = $this->repository->getAccountsByType($types);
|
||||
$count = $collection->count();
|
||||
$accounts = $collection->slice(($this->parameters->get('page') - 1) * $pageSize, $pageSize);
|
||||
|
@@ -62,7 +62,6 @@ class UpdateRequest extends FormRequest
|
||||
'account_type' => $this->nullableString('type'),
|
||||
'account_type_id' => null,
|
||||
'currency_id' => $this->nullableInteger('currency_id'),
|
||||
'order' => $this->integer('order'),
|
||||
'currency_code' => $this->nullableString('currency_code'),
|
||||
'virtual_balance' => $this->nullableString('virtual_balance'),
|
||||
'iban' => $this->nullableString('iban'),
|
||||
@@ -77,6 +76,9 @@ class UpdateRequest extends FormRequest
|
||||
'interest' => $this->nullableString('interest'),
|
||||
'interest_period' => $this->nullableString('interest_period'),
|
||||
];
|
||||
if(null !== $this->get('order')) {
|
||||
$data['order'] = $this->integer('order');
|
||||
}
|
||||
|
||||
$data = $this->appendLocationData($data, null);
|
||||
|
||||
|
Reference in New Issue
Block a user