fixed performans..
This commit is contained in:
parent
70a5e5acdd
commit
1bd3c5a153
|
|
@ -30,6 +30,10 @@ abstract class Index extends Component
|
|||
public $page;
|
||||
|
||||
public $permissionCreate;
|
||||
|
||||
public $permissionUpdate;
|
||||
|
||||
public $permissionDelete;
|
||||
/* -- Main End -- */
|
||||
|
||||
/* -- Buttons Start -- */
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class Account extends Form
|
|||
$this->selected = $account_id;
|
||||
|
||||
if (! $this->accounts->has($account_id)) {
|
||||
$account = Model::with('transactions')->find($account_id);
|
||||
$account = Model::with(['transactions', 'income_transactions', 'expense_transactions', 'currency'])->find($account_id);
|
||||
|
||||
$this->accounts->push($account);
|
||||
}
|
||||
|
|
@ -69,9 +69,9 @@ class Account extends Form
|
|||
protected function getAccounts()
|
||||
{
|
||||
if ($this->hideCurrency) {
|
||||
return Model::with('transactions')->enabled()->orderBy('name')->get();
|
||||
return Model::with(['transactions', 'income_transactions', 'expense_transactions', 'currency'])->enabled()->orderBy('name')->get();
|
||||
}
|
||||
|
||||
return Model::with('transactions')->enabled()->orderBy('name')->get();
|
||||
return Model::with(['transactions', 'income_transactions', 'expense_transactions', 'currency'])->enabled()->orderBy('name')->get();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue