@@ -12,7 +12,7 @@ |
||
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 | $response = $next($request); |
18 | 18 |
@@ -50,6 +50,6 @@ |
||
50 | 50 | ) |
51 | 51 | ); |
52 | 52 | } |
53 | - return $response; |
|
53 | + return $response; |
|
54 | 54 | } |
55 | 55 | } |
@@ -29,7 +29,7 @@ |
||
29 | 29 | * Convert a job poster to the array expected by API requests, |
30 | 30 | * with all criteria, |
31 | 31 | * and with translation arrays in both languages. |
32 | - * |
|
32 | + * |
|
33 | 33 | * @param \App\Models\JobPoster $job Incoming Job Poster object. |
34 | 34 | * @return mixed[] |
35 | 35 | */ |
@@ -37,7 +37,7 @@ |
||
37 | 37 | { |
38 | 38 | $criteria = Criteria::where('job_poster_id', $job->id)->get(); |
39 | 39 | |
40 | - $toApiArray = function ($model) { |
|
40 | + $toApiArray = function($model){ |
|
41 | 41 | return array_merge($model->toArray(), $model->getTranslationsArray()); |
42 | 42 | }; |
43 | 43 | $criteriaTranslated = $criteria->map($toApiArray); |
@@ -26,12 +26,12 @@ |
||
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
29 | - * Show the form for editing the applicant's experience |
|
30 | - * |
|
31 | - * @param \Illuminate\Http\Request $request Incoming request object. |
|
32 | - * @param \App\Models\Applicant $applicant Incoming applicant object. |
|
33 | - * @return \Illuminate\Http\Response |
|
34 | - */ |
|
29 | + * Show the form for editing the applicant's experience |
|
30 | + * |
|
31 | + * @param \Illuminate\Http\Request $request Incoming request object. |
|
32 | + * @param \App\Models\Applicant $applicant Incoming applicant object. |
|
33 | + * @return \Illuminate\Http\Response |
|
34 | + */ |
|
35 | 35 | public function edit(Request $request, Applicant $applicant) |
36 | 36 | { |
37 | 37 | return view('applicant/profile_02_experience', [ |
@@ -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', |
@@ -70,9 +70,9 @@ |
||
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 | - }, function ($value) : void { |
|
75 | + }, function($value) : void { |
|
76 | 76 | $this->crud->addClause('where', 'user_role_id', $value); |
77 | 77 | }); |
78 | 78 | } |
@@ -177,8 +177,8 @@ |
||
177 | 177 | 'type' => 'date_picker', |
178 | 178 | 'label' => 'Letter of Offer Issuance Date', |
179 | 179 | 'date_picker_options' => [ |
180 | - 'todayBtn' => 'linked', |
|
181 | - 'format' => 'yyyy-mm-dd', |
|
180 | + 'todayBtn' => 'linked', |
|
181 | + 'format' => 'yyyy-mm-dd', |
|
182 | 182 | ], |
183 | 183 | ]); |
184 | 184 | if ($this->crud->getCurrentEntry() && |
@@ -63,8 +63,8 @@ discard block |
||
63 | 63 | 'type' => 'closure', |
64 | 64 | 'label' => 'Manager', |
65 | 65 | 'orderable' => false, |
66 | - 'function' => function ($entry) { |
|
67 | - return '<a href="' . route('manager.profile.edit', $entry->manager->user->id) . '" target="_blank">' . $entry->manager->user->full_name . '</a>'; |
|
66 | + 'function' => function($entry){ |
|
67 | + return '<a href="'.route('manager.profile.edit', $entry->manager->user->id).'" target="_blank">'.$entry->manager->user->full_name.'</a>'; |
|
68 | 68 | } |
69 | 69 | ]); |
70 | 70 | $this->crud->addColumn([ |
@@ -84,10 +84,10 @@ discard block |
||
84 | 84 | 'name' => 'departments', |
85 | 85 | 'type' => 'select2_multiple', |
86 | 86 | 'label' => 'Departments' |
87 | - ], function () { |
|
87 | + ], function(){ |
|
88 | 88 | return Department::all()->pluck('name', 'id')->toArray(); |
89 | - }, function ($values) { |
|
90 | - $this->crud->addClause('WhereHas', 'department', function ($query) use ($values) { |
|
89 | + }, function($values){ |
|
90 | + $this->crud->addClause('WhereHas', 'department', function($query) use ($values) { |
|
91 | 91 | foreach (json_decode($values) as $key => $value) { |
92 | 92 | if ($key === 0) { |
93 | 93 | $query->where('id', $value); |
@@ -40,18 +40,17 @@ |
||
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 | ]; |
50 | 50 | |
51 | 51 | // Display slightly different views on different portals. |
52 | 52 | $view = WhichPortal::isManagerPortal() ? |
53 | - 'manager/application_post' : |
|
54 | - 'applicant/application_preview'; |
|
53 | + 'manager/application_post' : 'applicant/application_preview'; |
|
55 | 54 | |
56 | 55 | if (WhichPortal::isManagerPortal()) { |
57 | 56 | // Load things required for review component. |