@@ -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,8 +76,8 @@ discard block |
||
| 76 | 76 | 'label' => 'Name', |
| 77 | 77 | 'orderable' => true, |
| 78 | 78 | 'limit' => 70, |
| 79 | - 'orderLogic' => function ($query, $column, $columnDirection) use ($locale) { |
|
| 80 | - return $query->orderBy('name->' . $locale, $columnDirection)->select('*'); |
|
| 79 | + 'orderLogic' => function($query, $column, $columnDirection) use ($locale) { |
|
| 80 | + return $query->orderBy('name->'.$locale, $columnDirection)->select('*'); |
|
| 81 | 81 | } |
| 82 | 82 | ]); |
| 83 | 83 | |
@@ -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. |
@@ -159,10 +159,10 @@ discard block |
||
| 159 | 159 | $this->authorize('update', $application); |
| 160 | 160 | |
| 161 | 161 | $criteria = [ |
| 162 | - 'essential' => $jobPoster->criteria->filter(function ($value, $key) { |
|
| 162 | + 'essential' => $jobPoster->criteria->filter(function($value, $key) { |
|
| 163 | 163 | return $value->criteria_type->name == 'essential'; |
| 164 | 164 | }), |
| 165 | - 'asset' => $jobPoster->criteria->filter(function ($value, $key) { |
|
| 165 | + 'asset' => $jobPoster->criteria->filter(function($value, $key) { |
|
| 166 | 166 | return $value->criteria_type->name == 'asset'; |
| 167 | 167 | }), |
| 168 | 168 | ]; |
@@ -204,10 +204,10 @@ discard block |
||
| 204 | 204 | $this->authorize('update', $application); |
| 205 | 205 | |
| 206 | 206 | $criteria = [ |
| 207 | - 'essential' => $jobPoster->criteria->filter(function ($value, $key) { |
|
| 207 | + 'essential' => $jobPoster->criteria->filter(function($value, $key) { |
|
| 208 | 208 | return $value->criteria_type->name == 'essential'; |
| 209 | 209 | }), |
| 210 | - 'asset' => $jobPoster->criteria->filter(function ($value, $key) { |
|
| 210 | + 'asset' => $jobPoster->criteria->filter(function($value, $key) { |
|
| 211 | 211 | return $value->criteria_type->name == 'asset'; |
| 212 | 212 | }), |
| 213 | 213 | ]; |
@@ -246,10 +246,10 @@ discard block |
||
| 246 | 246 | |
| 247 | 247 | $this->authorize('view', $application); |
| 248 | 248 | $criteria = [ |
| 249 | - 'essential' => $jobPoster->criteria->filter(function ($value, $key) { |
|
| 249 | + 'essential' => $jobPoster->criteria->filter(function($value, $key) { |
|
| 250 | 250 | return $value->criteria_type->name == 'essential'; |
| 251 | 251 | }), |
| 252 | - 'asset' => $jobPoster->criteria->filter(function ($value, $key) { |
|
| 252 | + 'asset' => $jobPoster->criteria->filter(function($value, $key) { |
|
| 253 | 253 | return $value->criteria_type->name == 'asset'; |
| 254 | 254 | }), |
| 255 | 255 | ]; |
@@ -31,7 +31,7 @@ |
||
| 31 | 31 | */ |
| 32 | 32 | public function passes($attribute, $value) |
| 33 | 33 | { |
| 34 | - return $value->contains(function ($object) { |
|
| 34 | + return $value->contains(function($object) { |
|
| 35 | 35 | $object->getRelationValue($this->relationName)->is($this->relationValue); |
| 36 | 36 | }); |
| 37 | 37 | } |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | // debugbar()->debug($value); |
| 47 | 47 | // debugbar()->debug($this->attributeName); |
| 48 | 48 | // debugbar()->debug($this->attributeValue); |
| 49 | - return $this->array_any($value, function ($object) { |
|
| 49 | + return $this->array_any($value, function($object) { |
|
| 50 | 50 | return $object[$this->attributeName] == $this->attributeValue; |
| 51 | 51 | }); |
| 52 | 52 | } |
@@ -17,7 +17,7 @@ discard block |
||
| 17 | 17 | |
| 18 | 18 | $faker_fr = Faker\Factory::create('fr'); |
| 19 | 19 | |
| 20 | -$factory->define(JobPoster::class, function (Faker\Generator $faker) use ($faker_fr) { |
|
| 20 | +$factory->define(JobPoster::class, function(Faker\Generator $faker) use ($faker_fr) { |
|
| 21 | 21 | $closeDate = $faker->dateTimeBetween('now', '1 months')->format('Y-m-d'); |
| 22 | 22 | $openDate = $faker->dateTimeBetween('-1 months', 'now')->format('Y-m-d'); |
| 23 | 23 | $startDate = $faker->dateTimeBetween('1 months', '2 months')->format('Y-m-d'); |
@@ -60,7 +60,7 @@ discard block |
||
| 60 | 60 | 'security_clearance_id' => SecurityClearance::inRandomOrder()->first()->id, |
| 61 | 61 | 'language_requirement_id' => LanguageRequirement::inRandomOrder()->first()->id, |
| 62 | 62 | 'remote_work_allowed' => $faker->boolean(50), |
| 63 | - 'manager_id' => function () { |
|
| 63 | + 'manager_id' => function() { |
|
| 64 | 64 | return factory(Manager::class)->create()->id; |
| 65 | 65 | }, |
| 66 | 66 | 'team_size' => $faker->numberBetween(5, 30), |
@@ -98,7 +98,7 @@ discard block |
||
| 98 | 98 | ]; |
| 99 | 99 | }); |
| 100 | 100 | |
| 101 | -$factory->afterCreating(JobPoster::class, function ($jp) : void { |
|
| 101 | +$factory->afterCreating(JobPoster::class, function($jp) : void { |
|
| 102 | 102 | $jp->criteria()->saveMany(factory(Criteria::class, 5)->make([ |
| 103 | 103 | 'job_poster_id' => $jp->id |
| 104 | 104 | ])); |
@@ -113,7 +113,7 @@ discard block |
||
| 113 | 113 | $factory->state( |
| 114 | 114 | JobPoster::class, |
| 115 | 115 | 'byUpgradedManager', |
| 116 | - ['manager_id' => function () { |
|
| 116 | + ['manager_id' => function() { |
|
| 117 | 117 | return factory(Manager::class)->state('upgraded')->create()->id; |
| 118 | 118 | }] |
| 119 | 119 | ); |
@@ -121,7 +121,7 @@ discard block |
||
| 121 | 121 | $factory->state( |
| 122 | 122 | JobPoster::class, |
| 123 | 123 | 'published', |
| 124 | - function (Faker\Generator $faker) { |
|
| 124 | + function(Faker\Generator $faker) { |
|
| 125 | 125 | return [ |
| 126 | 126 | 'published' => true, |
| 127 | 127 | 'published_at' => $faker->dateTimeBetween('-1 months', '-3 weeks') |
@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | $factory->state( |
| 133 | 133 | JobPoster::class, |
| 134 | 134 | 'closed', |
| 135 | - function (Faker\Generator $faker) { |
|
| 135 | + function(Faker\Generator $faker) { |
|
| 136 | 136 | return [ |
| 137 | 137 | 'published' => true, |
| 138 | 138 | 'published_at' => $faker->dateTimeBetween('-1 months', '-3 weeks'), |
@@ -144,7 +144,7 @@ discard block |
||
| 144 | 144 | $factory->state( |
| 145 | 145 | JobPoster::class, |
| 146 | 146 | 'draft', |
| 147 | - function (Faker\Generator $faker) { |
|
| 147 | + function(Faker\Generator $faker) { |
|
| 148 | 148 | return [ |
| 149 | 149 | 'published' => false, |
| 150 | 150 | 'open_date_time' => ptDayStartToUtcTime($faker->dateTimeBetween('5 days', '10 days')->format('Y-m-d')), |
@@ -158,7 +158,7 @@ discard block |
||
| 158 | 158 | $factory->state( |
| 159 | 159 | JobPoster::class, |
| 160 | 160 | 'review_requested', |
| 161 | - function (Faker\Generator $faker) { |
|
| 161 | + function(Faker\Generator $faker) { |
|
| 162 | 162 | return [ |
| 163 | 163 | 'published' => false, |
| 164 | 164 | 'open_date_time' => ptDayStartToUtcTime($faker->dateTimeBetween('5 days', '10 days')->format('Y-m-d')), |
@@ -5,9 +5,9 @@ |
||
| 5 | 5 | use App\Models\RatingGuideQuestion; |
| 6 | 6 | use App\Models\JobPoster; |
| 7 | 7 | |
| 8 | -$factory->define(RatingGuideQuestion::class, function (Faker\Generator $faker) { |
|
| 8 | +$factory->define(RatingGuideQuestion::class, function(Faker\Generator $faker) { |
|
| 9 | 9 | return [ |
| 10 | - 'job_poster_id' => function () { |
|
| 10 | + 'job_poster_id' => function() { |
|
| 11 | 11 | return factory(JobPoster::class)->create()->id; |
| 12 | 12 | }, |
| 13 | 13 | 'assessment_type_id' => AssessmentType::inRandomOrder()->first()->id, |
@@ -8,10 +8,10 @@ |
||
| 8 | 8 | |
| 9 | 9 | $faker_fr = Faker\Factory::create('fr'); |
| 10 | 10 | |
| 11 | -$factory->define(Criteria::class, function (Faker\Generator $faker) use ($faker_fr) { |
|
| 11 | +$factory->define(Criteria::class, function(Faker\Generator $faker) use ($faker_fr) { |
|
| 12 | 12 | return [ |
| 13 | 13 | 'criteria_type_id' => CriteriaType::inRandomOrder()->first()->id, |
| 14 | - 'job_poster_id' => function () { |
|
| 14 | + 'job_poster_id' => function() { |
|
| 15 | 15 | return factory(JobPoster::class)->create()->id; |
| 16 | 16 | }, |
| 17 | 17 | 'skill_id' => Skill::inRandomOrder()->first()->id, |
@@ -6,12 +6,12 @@ |
||
| 6 | 6 | use App\Models\Lookup\SkillLevel; |
| 7 | 7 | use App\Models\Applicant; |
| 8 | 8 | |
| 9 | -$factory->define(SkillDeclaration::class, function (Faker\Generator $faker) { |
|
| 9 | +$factory->define(SkillDeclaration::class, function(Faker\Generator $faker) { |
|
| 10 | 10 | return [ |
| 11 | 11 | 'skill_id' => Skill::inRandomOrder()->first()->id, |
| 12 | 12 | 'skill_status_id' => SkillStatus::inRandomOrder()->first()->id, |
| 13 | 13 | 'skill_level_id' => SkillLevel::inRandomOrder()->first()->id, |
| 14 | - 'applicant_id' => function () { |
|
| 14 | + 'applicant_id' => function() { |
|
| 15 | 15 | return factory(Applicant::class)->create()->id; |
| 16 | 16 | }, |
| 17 | 17 | 'description' => $faker->paragraphs(3, true), |