shared dashboards
This commit is contained in:
		| @@ -3,9 +3,10 @@ | ||||
| namespace Database\Seeds; | ||||
|  | ||||
| use App\Abstracts\Model; | ||||
| use App\Models\Auth\User; | ||||
| use App\Models\Common\Widget; | ||||
| use App\Models\Common\Dashboard; | ||||
| use App\Utilities\Widgets as WidgetUtility; | ||||
| use App\Utilities\Widgets; | ||||
| use Illuminate\Database\Seeder; | ||||
|  | ||||
| class Dashboards extends Seeder | ||||
| @@ -31,12 +32,11 @@ class Dashboards extends Seeder | ||||
|  | ||||
|         $dashboard = Dashboard::create([ | ||||
|             'company_id' => $company_id, | ||||
|             'user_id' => $user_id, | ||||
|             'name' => trans('general.dashboard'), | ||||
|             'name' => trans_choice('general.dashboards', 1), | ||||
|             'enabled' => 1, | ||||
|         ]); | ||||
|  | ||||
|         $widgets = WidgetUtility::getClasses(false); | ||||
|         $widgets = Widgets::getClasses(false); | ||||
|  | ||||
|         $sort = 1; | ||||
|  | ||||
| @@ -52,5 +52,7 @@ class Dashboards extends Seeder | ||||
|  | ||||
|             $sort++; | ||||
|         } | ||||
|  | ||||
|         User::find($user_id)->dashboards()->attach($dashboard->id); | ||||
|     } | ||||
| } | ||||
|   | ||||
| @@ -38,6 +38,7 @@ class Roles extends Seeder | ||||
|                 'banking-transactions' => 'c,r,u,d', | ||||
|                 'banking-transfers' => 'c,r,u,d', | ||||
|                 'common-companies' => 'c,r,u,d', | ||||
|                 'common-dashboards' => 'c,r,u,d', | ||||
|                 'common-import' => 'c', | ||||
|                 'common-items' => 'c,r,u,d', | ||||
|                 'common-notifications' => 'c,r,u,d', | ||||
| @@ -98,13 +99,14 @@ class Roles extends Seeder | ||||
|                 'banking-transactions' => 'c,r,u,d', | ||||
|                 'banking-transfers' => 'c,r,u,d', | ||||
|                 'common-companies' => 'c,r,u,d', | ||||
|                 'common-dashboards' => 'c,r,u,d', | ||||
|                 'common-import' => 'c', | ||||
|                 'common-items' => 'c,r,u,d', | ||||
|                 'common-notifications' => 'c,r,u,d', | ||||
|                 'common-reports' => 'c,r,u,d', | ||||
|                 'common-search' => 'r', | ||||
|                 'common-uploads' => 'r', | ||||
|                 'common-widgets' => 'r', | ||||
|                 'common-widgets' => 'c,r,u,d', | ||||
|                 'purchases-bills' => 'c,r,u,d', | ||||
|                 'purchases-payments' => 'c,r,u,d', | ||||
|                 'purchases-vendors' => 'c,r,u,d', | ||||
|   | ||||
		Reference in New Issue
	
	Block a user