@@ -63,7 +63,7 @@ |
||
63 | 63 | ); |
64 | 64 | |
65 | 65 | View::composer( |
66 | - ['common/relatives','common/reference','common/relatives-projects', |
|
66 | + ['common/relatives', 'common/reference', 'common/relatives-projects', |
|
67 | 67 | 'common/sample', 'common/skill', 'common/modals/create_reference'], |
68 | 68 | 'App\Http\ViewComposers\RelativeComposer' |
69 | 69 | ); |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | */ |
22 | 22 | public function indexByJob(JobPoster $jobPoster) |
23 | 23 | { |
24 | - $comments = Comment::where('job_poster_id', $jobPoster->id)->get(); |
|
25 | - return response()->json(new ResourceCollection($comments)); |
|
24 | + $comments = Comment::where('job_poster_id', $jobPoster->id)->get(); |
|
25 | + return response()->json(new ResourceCollection($comments)); |
|
26 | 26 | } |
27 | 27 | |
28 | 28 | /** |
@@ -34,12 +34,12 @@ discard block |
||
34 | 34 | */ |
35 | 35 | public function store(StoreComment $request, JobPoster $jobPoster) |
36 | 36 | { |
37 | - $data = $request->validated(); |
|
38 | - $comment = new Comment(); |
|
39 | - $comment->user_id = $request->user()->id; |
|
40 | - $comment->job_poster_id = $jobPoster->id; |
|
41 | - $comment->fill($data); |
|
42 | - $comment->save(); |
|
43 | - return response()->json(new JsonResource($comment)); |
|
37 | + $data = $request->validated(); |
|
38 | + $comment = new Comment(); |
|
39 | + $comment->user_id = $request->user()->id; |
|
40 | + $comment->job_poster_id = $jobPoster->id; |
|
41 | + $comment->fill($data); |
|
42 | + $comment->save(); |
|
43 | + return response()->json(new JsonResource($comment)); |
|
44 | 44 | } |
45 | 45 | } |
@@ -264,10 +264,10 @@ discard block |
||
264 | 264 | } |
265 | 265 | |
266 | 266 | /** |
267 | - * Check if the user has the specified role. |
|
268 | - * @param string $role This may be either 'applicant', 'manager', 'hr_advisor' or 'admin'. |
|
269 | - * @return boolean |
|
270 | - */ |
|
267 | + * Check if the user has the specified role. |
|
268 | + * @param string $role This may be either 'applicant', 'manager', 'hr_advisor' or 'admin'. |
|
269 | + * @return boolean |
|
270 | + */ |
|
271 | 271 | public function hasRole($role) |
272 | 272 | { |
273 | 273 | switch ($role) { |
@@ -288,8 +288,8 @@ discard block |
||
288 | 288 | * Set this user to the specified role. |
289 | 289 | * |
290 | 290 | * @param string $role Must be either 'applicant', 'manager', 'hr_advisor' or 'admin'. |
291 | - * @return void |
|
292 | - */ |
|
291 | + * @return void |
|
292 | + */ |
|
293 | 293 | public function setRole(string $role): void |
294 | 294 | { |
295 | 295 | $this->user_role()->associate(UserRole::where('key', $role)->firstOrFail()); |
@@ -12,7 +12,7 @@ |
||
12 | 12 | class ApplicationValidator |
13 | 13 | { |
14 | 14 | |
15 | - public $backendRules = [ |
|
15 | + public $backendRules = [ |
|
16 | 16 | 'job_poster_id' => 'required', |
17 | 17 | 'application_status_id' => 'required', |
18 | 18 | 'applicant_id' => 'required', |
@@ -108,8 +108,7 @@ |
||
108 | 108 | 'function' => |
109 | 109 | function ($entry) { |
110 | 110 | return $entry->submitted_applications_count() > 0 ? |
111 | - '<a target="_blank" href="' . route('manager.jobs.applications', $entry->id) . '">' . $entry->submitted_applications_count() . ' (View <i class="fa fa-external-link"></i>)</a>' : |
|
112 | - $entry->submitted_applications_count(); |
|
111 | + '<a target="_blank" href="' . route('manager.jobs.applications', $entry->id) . '">' . $entry->submitted_applications_count() . ' (View <i class="fa fa-external-link"></i>)</a>' : $entry->submitted_applications_count(); |
|
113 | 112 | } |
114 | 113 | ]); |
115 | 114 |
@@ -786,7 +786,7 @@ discard block |
||
786 | 786 | ->name('api.jobs.setJobStatus'); |
787 | 787 | Route::resource('jobs', 'Api\JobController')->only([ |
788 | 788 | 'show', 'store', 'update', 'index' |
789 | - ])->names([ // Specify custom names because default names collied with existing routes. |
|
789 | + ])->names([// Specify custom names because default names collied with existing routes. |
|
790 | 790 | 'show' => 'api.jobs.show', |
791 | 791 | 'store' => 'api.jobs.store', |
792 | 792 | 'update' => 'api.jobs.update', |
@@ -799,7 +799,7 @@ discard block |
||
799 | 799 | |
800 | 800 | Route::resource('managers', 'Api\ManagerController')->only([ |
801 | 801 | 'show', 'update' |
802 | - ])->names([ // Specify custom names because default names collied with existing routes. |
|
802 | + ])->names([// Specify custom names because default names collied with existing routes. |
|
803 | 803 | 'show' => 'api.managers.show', |
804 | 804 | 'update' => 'api.managers.update' |
805 | 805 | ]); |
@@ -41,7 +41,7 @@ discard block |
||
41 | 41 | 'limit' => 120, |
42 | 42 | ]); |
43 | 43 | |
44 | - $this->crud->addField([ // Select |
|
44 | + $this->crud->addField([// Select |
|
45 | 45 | 'label' => 'Owner User Role', |
46 | 46 | 'type' => 'select', |
47 | 47 | 'name' => 'owner_user_role_id', // the db column for the foreign key |
@@ -50,7 +50,7 @@ discard block |
||
50 | 50 | 'model' => \App\Models\UserRole::class, // foreign key model |
51 | 51 | ]); |
52 | 52 | |
53 | - $this->crud->addField([ // Select |
|
53 | + $this->crud->addField([// Select |
|
54 | 54 | 'label' => 'From Status', |
55 | 55 | 'type' => 'select', |
56 | 56 | 'name' => 'from_job_poster_status_id', // the db column for the foreign key |
@@ -59,7 +59,7 @@ discard block |
||
59 | 59 | 'model' => \App\Models\Lookup\JobPosterStatus::class, // foreign key model |
60 | 60 | ]); |
61 | 61 | |
62 | - $this->crud->addField([ // Select |
|
62 | + $this->crud->addField([// Select |
|
63 | 63 | 'label' => 'To Status', |
64 | 64 | 'type' => 'select', |
65 | 65 | 'name' => 'to_job_poster_status_id', // the db column for the foreign key |