@@ -65,7 +65,7 @@ |
||
| 65 | 65 | */ |
| 66 | 66 | protected function defineGates(): void |
| 67 | 67 | { |
| 68 | - Gate::define('view-assessment-plan', function ($user, $jobPoster) { |
|
| 68 | + Gate::define('view-assessment-plan', function ($user, $jobPoster){ |
|
| 69 | 69 | return $user->isAdmin() || |
| 70 | 70 | $user->isManager() && $jobPoster->manager->user_id === $user->id; |
| 71 | 71 | }); |
@@ -30,7 +30,7 @@ |
||
| 30 | 30 | */ |
| 31 | 31 | public function register() |
| 32 | 32 | { |
| 33 | - $this->app->singleton(WhichPortal::class, function ($app) { |
|
| 33 | + $this->app->singleton(WhichPortal::class, function ($app){ |
|
| 34 | 34 | return new WhichPortal(); |
| 35 | 35 | }); |
| 36 | 36 | } |
@@ -12,7 +12,8 @@ |
||
| 12 | 12 | * @param \Closure $next |
| 13 | 13 | * @return mixed |
| 14 | 14 | */ |
| 15 | - public function handle($request, Closure $next) { |
|
| 15 | + public function handle($request, Closure $next) |
|
| 16 | + { |
|
| 16 | 17 | |
| 17 | 18 | $response = $next($request); |
| 18 | 19 | |
@@ -126,12 +126,12 @@ |
||
| 126 | 126 | // TODO: replace route('manager.show',manager.id) in templates with link using slug. |
| 127 | 127 | $criteria = [ |
| 128 | 128 | 'essential' => $jobPoster->criteria->filter( |
| 129 | - function ($value, $key) { |
|
| 129 | + function ($value, $key){ |
|
| 130 | 130 | return $value->criteria_type->name == 'essential'; |
| 131 | 131 | } |
| 132 | 132 | ), |
| 133 | 133 | 'asset' => $jobPoster->criteria->filter( |
| 134 | - function ($value, $key) { |
|
| 134 | + function ($value, $key){ |
|
| 135 | 135 | return $value->criteria_type->name == 'asset'; |
| 136 | 136 | } |
| 137 | 137 | ), |
@@ -27,7 +27,7 @@ |
||
| 27 | 27 | // Custom strings to display within the backpack UI. |
| 28 | 28 | $this->crud->setEntityNameStrings('classification', 'classifications'); |
| 29 | 29 | |
| 30 | - $this->crud->operation(['create', 'update'], function () { |
|
| 30 | + $this->crud->operation(['create', 'update'], function (){ |
|
| 31 | 31 | $this->crud->addField([ |
| 32 | 32 | 'name' => 'key', |
| 33 | 33 | 'type' => 'text', |
@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | // things like Create Skill, Delete Skills, etc. |
| 34 | 34 | $this->crud->setEntityNameStrings('skill', 'skills'); |
| 35 | 35 | |
| 36 | - $this->crud->operation(['create', 'update'], function () { |
|
| 36 | + $this->crud->operation(['create', 'update'], function (){ |
|
| 37 | 37 | // Add custom fields to the create/update views. |
| 38 | 38 | $this->crud->addField([ |
| 39 | 39 | 'name' => 'name', |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | 'searchLogic' => function ($query, $column, $searchTerm) use ($locale) : void { |
| 109 | 109 | $query->orWhere('name->' . $locale, 'like', "%$searchTerm%"); |
| 110 | 110 | }, |
| 111 | - 'orderLogic' => function ($query, $column, $columnDirection) use ($locale) { |
|
| 111 | + 'orderLogic' => function ($query, $column, $columnDirection) use ($locale){ |
|
| 112 | 112 | return $query->orderBy('name->' . $locale, $columnDirection)->select('*'); |
| 113 | 113 | } |
| 114 | 114 | ]); |
@@ -129,7 +129,7 @@ discard block |
||
| 129 | 129 | 'type' => 'text', |
| 130 | 130 | 'label' => 'Type', |
| 131 | 131 | 'orderable' => true, |
| 132 | - 'orderLogic' => function ($query, $column, $columnDirection) use ($locale) { |
|
| 132 | + 'orderLogic' => function ($query, $column, $columnDirection) use ($locale){ |
|
| 133 | 133 | return $query->orderBy('skill_type_id', $columnDirection)->select('*'); |
| 134 | 134 | } |
| 135 | 135 | ]); |
@@ -163,13 +163,13 @@ discard block |
||
| 163 | 163 | 'key' => 'classifications_filter', |
| 164 | 164 | 'type' => 'select2_multiple', |
| 165 | 165 | 'label' => 'Filter by classification' |
| 166 | - ], function () { |
|
| 166 | + ], function (){ |
|
| 167 | 167 | // The options that show up in the select2. |
| 168 | 168 | return Classification::all()->pluck('key', 'id')->toArray(); |
| 169 | - }, function ($values) { |
|
| 169 | + }, function ($values){ |
|
| 170 | 170 | // If the filter is active. |
| 171 | 171 | foreach (json_decode($values) as $key => $value) { |
| 172 | - $this->crud->query = $this->crud->query->whereHas('classifications', function ($query) use ($value) { |
|
| 172 | + $this->crud->query = $this->crud->query->whereHas('classifications', function ($query) use ($value){ |
|
| 173 | 173 | $query->where('id', $value); |
| 174 | 174 | }); |
| 175 | 175 | } |
@@ -183,7 +183,7 @@ discard block |
||
| 183 | 183 | 'label'=> 'No classification' |
| 184 | 184 | ], |
| 185 | 185 | false, |
| 186 | - function () { |
|
| 186 | + function (){ |
|
| 187 | 187 | $this->crud->query = $this->crud->query->doesntHave('classifications'); |
| 188 | 188 | } |
| 189 | 189 | ); |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | 'name' => 'user_role', |
| 71 | 71 | 'type' => 'select2', |
| 72 | 72 | 'label' => 'Role' |
| 73 | - ], function () { |
|
| 73 | + ], function (){ |
|
| 74 | 74 | return UserRole::all()->keyBy('id')->pluck('name', 'id')->toArray(); |
| 75 | 75 | }, function ($value) : void { |
| 76 | 76 | $this->crud->addClause('where', 'user_role_id', $value); |
@@ -29,7 +29,7 @@ discard block |
||
| 29 | 29 | // Custom strings to display within the backpack UI. |
| 30 | 30 | $this->crud->setEntityNameStrings('department', 'departments'); |
| 31 | 31 | |
| 32 | - $this->crud->operation(['create', 'update'], function () { |
|
| 32 | + $this->crud->operation(['create', 'update'], function (){ |
|
| 33 | 33 | $this->crud->addField([ |
| 34 | 34 | 'name' => 'name', |
| 35 | 35 | 'type' => 'text', |
@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | 'label' => 'Name', |
| 77 | 77 | 'orderable' => true, |
| 78 | 78 | 'limit' => 70, |
| 79 | - 'orderLogic' => function ($query, $column, $columnDirection) use ($locale) { |
|
| 79 | + 'orderLogic' => function ($query, $column, $columnDirection) use ($locale){ |
|
| 80 | 80 | return $query->orderBy('name->' . $locale, $columnDirection)->select('*'); |
| 81 | 81 | } |
| 82 | 82 | ]); |
@@ -40,10 +40,10 @@ |
||
| 40 | 40 | public function show(JobApplication $application) |
| 41 | 41 | { |
| 42 | 42 | $criteria = [ |
| 43 | - 'essential' => $application->job_poster->criteria->filter(function ($value, $key) { |
|
| 43 | + 'essential' => $application->job_poster->criteria->filter(function ($value, $key){ |
|
| 44 | 44 | return $value->criteria_type->name == 'essential'; |
| 45 | 45 | }), |
| 46 | - 'asset' => $application->job_poster->criteria->filter(function ($value, $key) { |
|
| 46 | + 'asset' => $application->job_poster->criteria->filter(function ($value, $key){ |
|
| 47 | 47 | return $value->criteria_type->name == 'asset'; |
| 48 | 48 | }), |
| 49 | 49 | ]; |