@@ -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 | ); |
@@ -79,8 +79,7 @@ |
||
| 79 | 79 | 'function' => |
| 80 | 80 | function ($entry) { |
| 81 | 81 | return $entry->submitted_applications_count() > 0 ? |
| 82 | - '<a target="_blank" href="' . route('manager.jobs.applications', $entry->id) . '">' . $entry->submitted_applications_count() . ' (View <i class="fa fa-external-link"></i>)</a>' : |
|
| 83 | - $entry->submitted_applications_count(); |
|
| 82 | + '<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(); |
|
| 84 | 83 | } |
| 85 | 84 | ]); |
| 86 | 85 | |
@@ -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 | } |
@@ -566,7 +566,7 @@ |
||
| 566 | 566 | return 1; // Draft. |
| 567 | 567 | } elseif ($this->published_at === null) { |
| 568 | 568 | return 2; // Review requested, but not approved. |
| 569 | - } elseif ($this->open_date_time === null || $this->open_date_time >$now) { |
|
| 569 | + } elseif ($this->open_date_time === null || $this->open_date_time > $now) { |
|
| 570 | 570 | return 3; // Approved, but not open. |
| 571 | 571 | } elseif ($this->close_date_time === null || $this->close_date_time > $now) { |
| 572 | 572 | // Approved and currently open. |
@@ -684,7 +684,7 @@ discard block |
||
| 684 | 684 | ->name('api.jobs.submit'); |
| 685 | 685 | Route::resource('jobs', 'Api\JobController')->only([ |
| 686 | 686 | 'show', 'store', 'update', 'index' |
| 687 | - ])->names([ // Specify custom names because default names collied with existing routes. |
|
| 687 | + ])->names([// Specify custom names because default names collied with existing routes. |
|
| 688 | 688 | 'show' => 'api.jobs.show', |
| 689 | 689 | 'store' => 'api.jobs.store', |
| 690 | 690 | 'update' => 'api.jobs.update', |
@@ -697,7 +697,7 @@ discard block |
||
| 697 | 697 | |
| 698 | 698 | Route::resource('managers', 'Api\ManagerController')->only([ |
| 699 | 699 | 'show', 'update' |
| 700 | - ])->names([ // Specify custom names because default names collied with existing routes. |
|
| 700 | + ])->names([// Specify custom names because default names collied with existing routes. |
|
| 701 | 701 | 'show' => 'api.managers.show', |
| 702 | 702 | 'update' => 'api.managers.update' |
| 703 | 703 | ]); |
@@ -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', |
@@ -213,7 +213,7 @@ |
||
| 213 | 213 | */ |
| 214 | 214 | public function downloadApplicants(User $user, JobPoster $jobPoster): bool |
| 215 | 215 | { |
| 216 | - return $user->isAdmin() && ( $jobPoster->status() == 'published' || $jobPoster->status() == 'closed' ); |
|
| 216 | + return $user->isAdmin() && ($jobPoster->status() == 'published' || $jobPoster->status() == 'closed'); |
|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | } |
@@ -16,13 +16,13 @@ discard block |
||
| 16 | 16 | * Setup for the Resource CRUD panel. Everything here is applied on ALL operations. |
| 17 | 17 | * |
| 18 | 18 | * @return void |
| 19 | - */ |
|
| 19 | + */ |
|
| 20 | 20 | public function setup() |
| 21 | 21 | { |
| 22 | - $this->crud->setModel('App\Models\Resource'); |
|
| 23 | - $this->crud->setRoute('admin/resource'); |
|
| 24 | - $this->crud->setEntityNameStrings('resource', 'resources'); |
|
| 25 | - $this->crud->removeButton('preview'); |
|
| 22 | + $this->crud->setModel('App\Models\Resource'); |
|
| 23 | + $this->crud->setRoute('admin/resource'); |
|
| 24 | + $this->crud->setEntityNameStrings('resource', 'resources'); |
|
| 25 | + $this->crud->removeButton('preview'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | }, |
| 53 | 53 | 'searchLogic' => function ($query, $column, $searchTerm) use ($locale) : void { |
| 54 | 54 | $query->orWhere('name->' . $locale, 'ilike', "%$searchTerm%"); |
| 55 | - }, |
|
| 55 | + }, |
|
| 56 | 56 | ]); |
| 57 | 57 | } |
| 58 | 58 | |
@@ -66,22 +66,22 @@ discard block |
||
| 66 | 66 | $this->crud->setValidation(ResourceCrudRequest::class); |
| 67 | 67 | |
| 68 | 68 | $this->crud->addField([ |
| 69 | - 'name' => 'name', |
|
| 70 | - 'type' => 'text', |
|
| 71 | - 'label' => 'Title', |
|
| 69 | + 'name' => 'name', |
|
| 70 | + 'type' => 'text', |
|
| 71 | + 'label' => 'Title', |
|
| 72 | 72 | ]); |
| 73 | 73 | |
| 74 | 74 | $this->crud->addField([ |
| 75 | - 'name' => 'name', |
|
| 76 | - 'type' => 'text', |
|
| 77 | - 'label' => 'Title' |
|
| 75 | + 'name' => 'name', |
|
| 76 | + 'type' => 'text', |
|
| 77 | + 'label' => 'Title' |
|
| 78 | 78 | ]); |
| 79 | 79 | |
| 80 | 80 | $this->crud->addField([ |
| 81 | - 'name' => 'file', |
|
| 82 | - 'label' => 'File', |
|
| 83 | - 'type' => 'upload', |
|
| 84 | - 'upload' => true, |
|
| 81 | + 'name' => 'file', |
|
| 82 | + 'label' => 'File', |
|
| 83 | + 'type' => 'upload', |
|
| 84 | + 'upload' => true, |
|
| 85 | 85 | ]); |
| 86 | 86 | } |
| 87 | 87 | |
@@ -94,4 +94,4 @@ discard block |
||
| 94 | 94 | { |
| 95 | 95 | $this->setupCreateOperation(); |
| 96 | 96 | } |
| 97 | - } |
|
| 97 | + } |
|
@@ -4,7 +4,7 @@ |
||
| 4 | 4 | use Backpack\CRUD\app\Http\Controllers\CrudController; |
| 5 | 5 | use Illuminate\Support\Facades\App; |
| 6 | 6 | |
| 7 | -class ResourcesCrudController extends CrudController { |
|
| 7 | +class ResourcesCrudController extends CrudController{ |
|
| 8 | 8 | |
| 9 | 9 | use \Backpack\CRUD\app\Http\Controllers\Operations\ListOperation; |
| 10 | 10 | use \Backpack\CRUD\app\Http\Controllers\Operations\CreateOperation; |