akaunting 3.0 (the last dance)

This commit is contained in:
Burak Civan
2022-06-01 10:15:55 +03:00
parent cead09f6d4
commit d9c0764572
3812 changed files with 126831 additions and 102949 deletions

View File

@@ -114,6 +114,42 @@ class Dashboard extends Model
return $alias;
}
/**
* Get the line actions.
*
* @return array
*/
public function getLineActionsAttribute()
{
$actions = [];
if ($this->enabled) {
$actions[] = [
'title' => trans('general.switch'),
'icon' => 'settings_ethernet',
'url' => route('dashboards.switch', $this->id),
'permission' => 'read-common-dashboards',
];
}
$actions[] = [
'title' => trans('general.edit'),
'icon' => 'edit',
'url' => route('dashboards.edit', $this->id),
'permission' => 'update-common-dashboards',
];
$actions[] = [
'type' => 'delete',
'icon' => 'delete',
'route' => 'dashboards.destroy',
'permission' => 'delete-common-dashboards',
'model' => $this,
];
return $actions;
}
/**
* Create a new factory instance for the model.
*