Merge pull request #2425 from mehmetcoban/master
show selected category on category component
This commit is contained in:
commit
349e86d299
@ -37,6 +37,10 @@ class Category extends Form
|
||||
$this->categories->put($model->category->id, $model->category->name);
|
||||
}
|
||||
|
||||
if($model = $this->getParentData('model')) {
|
||||
$this->selected = $model->category_id;
|
||||
}
|
||||
|
||||
if (empty($this->selected) && (in_array($type, ['income', 'expense']))) {
|
||||
$this->selected = setting('default.' . $type . '_category');
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user