@@ -64,7 +64,7 @@ |
||
| 64 | 64 | |
| 65 | 65 | View::composer( |
| 66 | 66 | ['common/relatives','common/reference','common/relatives-projects', |
| 67 | - 'common/sample', 'common/skill', 'common/modals/create_reference'], |
|
| 67 | + 'common/sample', 'common/skill', 'common/modals/create_reference'], |
|
| 68 | 68 | 'App\Http\ViewComposers\RelativeComposer' |
| 69 | 69 | ); |
| 70 | 70 | |
@@ -13,92 +13,92 @@ discard block |
||
| 13 | 13 | * |
| 14 | 14 | * @return void |
| 15 | 15 | */ |
| 16 | - public function boot() |
|
| 16 | + public function boot () |
|
| 17 | 17 | { |
| 18 | 18 | // Site Under Construction header bar. |
| 19 | - View::composer( |
|
| 19 | + View::composer ( |
|
| 20 | 20 | 'common/alert', |
| 21 | 21 | 'App\Http\ViewComposers\AlertComposer' |
| 22 | 22 | ); |
| 23 | 23 | |
| 24 | 24 | // Pass App locale to all views. |
| 25 | - View::share('appLocale', App::getLocale()); |
|
| 25 | + View::share ('appLocale', App::getLocale ()); |
|
| 26 | 26 | |
| 27 | 27 | // Governement of Canada header bar. |
| 28 | - View::composer( |
|
| 28 | + View::composer ( |
|
| 29 | 29 | 'common/goc', |
| 30 | 30 | 'App\Http\ViewComposers\GocComposer' |
| 31 | 31 | ); |
| 32 | 32 | |
| 33 | 33 | // Nav menu. |
| 34 | - View::composer( |
|
| 34 | + View::composer ( |
|
| 35 | 35 | '*', |
| 36 | 36 | 'App\Http\ViewComposers\MenuComposer' |
| 37 | 37 | ); |
| 38 | 38 | |
| 39 | 39 | // Sitewide Footer. |
| 40 | - View::composer( |
|
| 40 | + View::composer ( |
|
| 41 | 41 | 'common/footer', |
| 42 | 42 | 'App\Http\ViewComposers\FooterComposer' |
| 43 | 43 | ); |
| 44 | 44 | |
| 45 | - View::composer( |
|
| 45 | + View::composer ( |
|
| 46 | 46 | 'applicant/profile/menu', |
| 47 | 47 | 'App\Http\ViewComposers\ApplicantProfileMenuComposer' |
| 48 | 48 | ); |
| 49 | 49 | |
| 50 | - View::composer( |
|
| 50 | + View::composer ( |
|
| 51 | 51 | ['common/skill', 'common/relatives', 'applicant/job_post/criteria', 'common/modals/skills_need_help'], |
| 52 | 52 | 'App\Http\ViewComposers\SkillComposer' |
| 53 | 53 | ); |
| 54 | 54 | |
| 55 | - View::composer( |
|
| 55 | + View::composer ( |
|
| 56 | 56 | ['common/reference', 'common/modals/create_reference'], |
| 57 | 57 | 'App\Http\ViewComposers\ReferenceComposer' |
| 58 | 58 | ); |
| 59 | 59 | |
| 60 | - View::composer( |
|
| 60 | + View::composer ( |
|
| 61 | 61 | ['common/sample', 'common/modals/create_sample'], |
| 62 | 62 | 'App\Http\ViewComposers\WorkSampleComposer' |
| 63 | 63 | ); |
| 64 | 64 | |
| 65 | - View::composer( |
|
| 66 | - ['common/relatives','common/reference','common/relatives-projects', |
|
| 65 | + View::composer ( |
|
| 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 | ); |
| 70 | 70 | |
| 71 | - View::composer( |
|
| 71 | + View::composer ( |
|
| 72 | 72 | 'common/lang_menu', |
| 73 | 73 | 'App\Http\ViewComposers\LangMenuComposer' |
| 74 | 74 | ); |
| 75 | 75 | |
| 76 | - View::composer( |
|
| 76 | + View::composer ( |
|
| 77 | 77 | ['applicant/application_post/common/tracker', 'applicant/application_post/common/tracker-ajax'], |
| 78 | 78 | 'App\Http\ViewComposers\ApplicationTrackerComposer' |
| 79 | 79 | ); |
| 80 | 80 | |
| 81 | - View::composer( |
|
| 81 | + View::composer ( |
|
| 82 | 82 | 'common/degree', |
| 83 | 83 | 'App\Http\ViewComposers\DegreeComposer' |
| 84 | 84 | ); |
| 85 | 85 | |
| 86 | - View::composer( |
|
| 86 | + View::composer ( |
|
| 87 | 87 | 'common/course', |
| 88 | 88 | 'App\Http\ViewComposers\CourseComposer' |
| 89 | 89 | ); |
| 90 | 90 | |
| 91 | - View::composer( |
|
| 91 | + View::composer ( |
|
| 92 | 92 | 'common/work', |
| 93 | 93 | 'App\Http\ViewComposers\WorkExperienceComposer' |
| 94 | 94 | ); |
| 95 | 95 | |
| 96 | - View::composer( |
|
| 96 | + View::composer ( |
|
| 97 | 97 | 'manager/notification', |
| 98 | 98 | 'App\Http\ViewComposers\DemoNotificationComposer' |
| 99 | 99 | ); |
| 100 | 100 | |
| 101 | - View::composer( |
|
| 101 | + View::composer ( |
|
| 102 | 102 | 'manager/*', |
| 103 | 103 | 'App\Http\ViewComposers\ManagerPortalComposer' |
| 104 | 104 | ); |
@@ -109,12 +109,12 @@ discard block |
||
| 109 | 109 | * |
| 110 | 110 | * @return void |
| 111 | 111 | */ |
| 112 | - public function register() : void |
|
| 112 | + public function register () : void |
|
| 113 | 113 | { |
| 114 | - $this->app->singleton(\App\Http\ViewComposers\CourseComposer::class); |
|
| 115 | - $this->app->singleton(\App\Http\ViewComposers\DegreeComposer::class); |
|
| 116 | - $this->app->singleton(\App\Http\ViewComposers\ReferenceComposer::class); |
|
| 117 | - $this->app->singleton(\App\Http\ViewComposers\SkillComposer::class); |
|
| 118 | - $this->app->singleton(\App\Http\ViewComposers\WorkSampleComposer::class); |
|
| 114 | + $this->app->singleton (\App\Http\ViewComposers\CourseComposer::class); |
|
| 115 | + $this->app->singleton (\App\Http\ViewComposers\DegreeComposer::class); |
|
| 116 | + $this->app->singleton (\App\Http\ViewComposers\ReferenceComposer::class); |
|
| 117 | + $this->app->singleton (\App\Http\ViewComposers\SkillComposer::class); |
|
| 118 | + $this->app->singleton (\App\Http\ViewComposers\WorkSampleComposer::class); |
|
| 119 | 119 | } |
| 120 | 120 | } |
@@ -198,12 +198,12 @@ |
||
| 198 | 198 | 'logout_link' => route('manager.logout'), |
| 199 | 199 | ]; |
| 200 | 200 | } elseif (WhichPortal::isAdminPortal()) { |
| 201 | - $loginModals = [ |
|
| 201 | + $loginModals = [ |
|
| 202 | 202 | 'modals' => Lang::get('common/login_modals'), |
| 203 | 203 | 'register_link' => route('register'), |
| 204 | 204 | 'login_link' => backpack_url('login'), |
| 205 | 205 | 'logout_link' => backpack_url('logout'), |
| 206 | - ]; |
|
| 206 | + ]; |
|
| 207 | 207 | } else { |
| 208 | 208 | $loginModals = [ |
| 209 | 209 | 'modals' => Lang::get('common/login_modals'), |
@@ -16,13 +16,13 @@ discard block |
||
| 16 | 16 | * @param View $view |
| 17 | 17 | * @return void |
| 18 | 18 | */ |
| 19 | - public function compose(View $view) |
|
| 19 | + public function compose (View $view) |
|
| 20 | 20 | { |
| 21 | - if (WhichPortal::isApplicantPortal()) { |
|
| 22 | - $menu = Lang::get('applicant/menu'); |
|
| 21 | + if (WhichPortal::isApplicantPortal ()) { |
|
| 22 | + $menu = Lang::get ('applicant/menu'); |
|
| 23 | 23 | |
| 24 | 24 | // Set active on the proper item |
| 25 | - switch (Route::currentRouteName()) { |
|
| 25 | + switch (Route::currentRouteName ()) { |
|
| 26 | 26 | case 'home': |
| 27 | 27 | $menu['items']['home']['active'] = true; |
| 28 | 28 | break; |
@@ -82,15 +82,15 @@ discard block |
||
| 82 | 82 | } |
| 83 | 83 | |
| 84 | 84 | // Set route links |
| 85 | - $menu['items']['home']['link'] = route('home'); |
|
| 86 | - $menu['items']['jobs']['link'] = route('jobs.index'); |
|
| 87 | - $menu['items']['applications']['link'] = route('applications.index'); |
|
| 88 | - $menu['items']['profile']['link'] = route('profile'); |
|
| 89 | - $menu['items']['faq']['link'] = route('faq'); |
|
| 90 | - $menu['items']['itp']['link'] = route('itp'); |
|
| 85 | + $menu['items']['home']['link'] = route ('home'); |
|
| 86 | + $menu['items']['jobs']['link'] = route ('jobs.index'); |
|
| 87 | + $menu['items']['applications']['link'] = route ('applications.index'); |
|
| 88 | + $menu['items']['profile']['link'] = route ('profile'); |
|
| 89 | + $menu['items']['faq']['link'] = route ('faq'); |
|
| 90 | + $menu['items']['itp']['link'] = route ('itp'); |
|
| 91 | 91 | |
| 92 | 92 | // Check if use is logged in, and remove invalid menu items |
| 93 | - if (Auth::check()) { |
|
| 93 | + if (Auth::check ()) { |
|
| 94 | 94 | unset($menu['items']['login']); |
| 95 | 95 | unset($menu['items']['register']); |
| 96 | 96 | // TODO set profile like using user slug |
@@ -99,11 +99,11 @@ discard block |
||
| 99 | 99 | unset($menu['items']['applications']); |
| 100 | 100 | unset($menu['items']['profile']); |
| 101 | 101 | } |
| 102 | - } elseif (WhichPortal::isManagerPortal()) { |
|
| 103 | - $menu = Lang::get('manager/menu'); |
|
| 102 | + } elseif (WhichPortal::isManagerPortal ()) { |
|
| 103 | + $menu = Lang::get ('manager/menu'); |
|
| 104 | 104 | |
| 105 | 105 | // Set active on the proper item |
| 106 | - switch (Route::currentRouteName()) { |
|
| 106 | + switch (Route::currentRouteName ()) { |
|
| 107 | 107 | case 'manager.home': |
| 108 | 108 | $menu['items']['home']['active'] = true; |
| 109 | 109 | break; |
@@ -144,15 +144,15 @@ discard block |
||
| 144 | 144 | } |
| 145 | 145 | |
| 146 | 146 | // Set route links |
| 147 | - $menu['items']['home']['link'] = route('manager.home'); |
|
| 148 | - $menu['items']['jobs']['link'] = route('manager.jobs.index'); |
|
| 147 | + $menu['items']['home']['link'] = route ('manager.home'); |
|
| 148 | + $menu['items']['jobs']['link'] = route ('manager.jobs.index'); |
|
| 149 | 149 | // TODO: restore when job poster builder complete |
| 150 | 150 | // $menu['items']['create_job']['link'] = route('manager.jobs.create'); |
| 151 | - $menu['items']['profile']['link'] = route('manager.profile'); |
|
| 152 | - $menu['items']['faq']['link'] = route('manager.faq.section'); |
|
| 151 | + $menu['items']['profile']['link'] = route ('manager.profile'); |
|
| 152 | + $menu['items']['faq']['link'] = route ('manager.faq.section'); |
|
| 153 | 153 | |
| 154 | 154 | // Check if use is logged in, and remove invalid menu items |
| 155 | - if (Auth::check()) { |
|
| 155 | + if (Auth::check ()) { |
|
| 156 | 156 | unset($menu['items']['login']); |
| 157 | 157 | unset($menu['items']['register']); |
| 158 | 158 | // TODO set profile like using user slug |
@@ -162,13 +162,13 @@ discard block |
||
| 162 | 162 | unset($menu['items']['create_job']); |
| 163 | 163 | unset($menu['items']['profile']); |
| 164 | 164 | } |
| 165 | - } elseif (WhichPortal::isAdminPortal()) { |
|
| 165 | + } elseif (WhichPortal::isAdminPortal ()) { |
|
| 166 | 166 | // Use the manager menu, keeping only |
| 167 | - $menu = Lang::get('admin/menu'); |
|
| 167 | + $menu = Lang::get ('admin/menu'); |
|
| 168 | 168 | |
| 169 | 169 | |
| 170 | 170 | // Set active on the proper item |
| 171 | - switch (Route::currentRouteName()) { |
|
| 171 | + switch (Route::currentRouteName ()) { |
|
| 172 | 172 | case 'admin.home': |
| 173 | 173 | $menu['items']['home']['active'] = true; |
| 174 | 174 | break; |
@@ -178,10 +178,10 @@ discard block |
||
| 178 | 178 | } |
| 179 | 179 | |
| 180 | 180 | // Set route links |
| 181 | - $menu['items']['home']['link'] = backpack_url(); |
|
| 181 | + $menu['items']['home']['link'] = backpack_url (); |
|
| 182 | 182 | |
| 183 | 183 | // Check if use is logged in, and remove invalid menu items |
| 184 | - if (Auth::check()) { |
|
| 184 | + if (Auth::check ()) { |
|
| 185 | 185 | unset($menu['items']['login']); |
| 186 | 186 | unset($menu['items']['register']); |
| 187 | 187 | // TODO set profile like using user slug |
@@ -190,30 +190,30 @@ discard block |
||
| 190 | 190 | } |
| 191 | 191 | } |
| 192 | 192 | // Set login modals data |
| 193 | - if (WhichPortal::isManagerPortal()) { |
|
| 193 | + if (WhichPortal::isManagerPortal ()) { |
|
| 194 | 194 | $loginModals = [ |
| 195 | - 'modals' => Lang::get('common/login_modals'), |
|
| 196 | - 'register_link' => route('manager.register'), |
|
| 197 | - 'login_link' => route('manager.login'), |
|
| 198 | - 'logout_link' => route('manager.logout'), |
|
| 195 | + 'modals' => Lang::get ('common/login_modals'), |
|
| 196 | + 'register_link' => route ('manager.register'), |
|
| 197 | + 'login_link' => route ('manager.login'), |
|
| 198 | + 'logout_link' => route ('manager.logout'), |
|
| 199 | 199 | ]; |
| 200 | - } elseif (WhichPortal::isAdminPortal()) { |
|
| 200 | + } elseif (WhichPortal::isAdminPortal ()) { |
|
| 201 | 201 | $loginModals = [ |
| 202 | - 'modals' => Lang::get('common/login_modals'), |
|
| 203 | - 'register_link' => route('register'), |
|
| 204 | - 'login_link' => backpack_url('login'), |
|
| 205 | - 'logout_link' => backpack_url('logout'), |
|
| 202 | + 'modals' => Lang::get ('common/login_modals'), |
|
| 203 | + 'register_link' => route ('register'), |
|
| 204 | + 'login_link' => backpack_url ('login'), |
|
| 205 | + 'logout_link' => backpack_url ('logout'), |
|
| 206 | 206 | ]; |
| 207 | 207 | } else { |
| 208 | 208 | $loginModals = [ |
| 209 | - 'modals' => Lang::get('common/login_modals'), |
|
| 210 | - 'register_link' => route('register'), |
|
| 211 | - 'login_link' => route('login'), |
|
| 212 | - 'logout_link' => route('logout'), |
|
| 209 | + 'modals' => Lang::get ('common/login_modals'), |
|
| 210 | + 'register_link' => route ('register'), |
|
| 211 | + 'login_link' => route ('login'), |
|
| 212 | + 'logout_link' => route ('logout'), |
|
| 213 | 213 | ]; |
| 214 | 214 | } |
| 215 | 215 | |
| 216 | - $view->with('menu', $menu) |
|
| 217 | - ->with('login_modals', $loginModals); |
|
| 216 | + $view->with ('menu', $menu) |
|
| 217 | + ->with ('login_modals', $loginModals); |
|
| 218 | 218 | } |
| 219 | 219 | } |
@@ -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 | */ |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | /** |
| 20 | 20 | * Class constructor |
| 21 | 21 | */ |
| 22 | - public function __construct() |
|
| 22 | + public function __construct () |
|
| 23 | 23 | { |
| 24 | 24 | // This applies the appropriate policy to each resource route. |
| 25 | - $this->authorizeResource(JobPoster::class, 'job'); |
|
| 25 | + $this->authorizeResource (JobPoster::class, 'job'); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -33,16 +33,16 @@ discard block |
||
| 33 | 33 | * @param \App\Models\JobPoster $job Incoming Job Poster object. |
| 34 | 34 | * @return mixed[] |
| 35 | 35 | */ |
| 36 | - private function jobToArray(JobPoster $job) |
|
| 36 | + private function jobToArray (JobPoster $job) |
|
| 37 | 37 | { |
| 38 | - $criteria = Criteria::where('job_poster_id', $job->id)->get(); |
|
| 38 | + $criteria = Criteria::where ('job_poster_id', $job->id)->get (); |
|
| 39 | 39 | |
| 40 | 40 | $toApiArray = function ($model) { |
| 41 | - return array_merge($model->toArray(), $model->getTranslationsArray()); |
|
| 41 | + return array_merge ($model->toArray (), $model->getTranslationsArray ()); |
|
| 42 | 42 | }; |
| 43 | - $criteriaTranslated = $criteria->map($toApiArray); |
|
| 43 | + $criteriaTranslated = $criteria->map ($toApiArray); |
|
| 44 | 44 | |
| 45 | - $jobArray = array_merge($job->toApiArray(), ['criteria' => $criteriaTranslated]); |
|
| 45 | + $jobArray = array_merge ($job->toApiArray (), ['criteria' => $criteriaTranslated]); |
|
| 46 | 46 | return $jobArray; |
| 47 | 47 | } |
| 48 | 48 | /** |
@@ -50,7 +50,7 @@ discard block |
||
| 50 | 50 | * |
| 51 | 51 | * @return \Illuminate\Http\Response |
| 52 | 52 | */ |
| 53 | - public function index() |
|
| 53 | + public function index () |
|
| 54 | 54 | { |
| 55 | 55 | // TODO: complete. |
| 56 | 56 | } |
@@ -61,16 +61,16 @@ discard block |
||
| 61 | 61 | * @param \App\Http\Requests\StoreJobPoster $request Incoming request. |
| 62 | 62 | * @return \Illuminate\Http\Response |
| 63 | 63 | */ |
| 64 | - public function store(StoreJobPoster $request) |
|
| 64 | + public function store (StoreJobPoster $request) |
|
| 65 | 65 | { |
| 66 | - $data = $request->validated(); |
|
| 67 | - $job = new JobPoster(); |
|
| 68 | - $job->manager_id = $request->user()->manager->id; |
|
| 66 | + $data = $request->validated (); |
|
| 67 | + $job = new JobPoster (); |
|
| 68 | + $job->manager_id = $request->user ()->manager->id; |
|
| 69 | 69 | // Defaulting JPB created Jobs to monthly terms for now. |
| 70 | - $job->job_term_id = JobTerm::where('name', 'month')->value('id'); |
|
| 71 | - $job->fill($data); |
|
| 72 | - $job->save(); |
|
| 73 | - return response()->json($this->jobToArray($job)); |
|
| 70 | + $job->job_term_id = JobTerm::where ('name', 'month')->value ('id'); |
|
| 71 | + $job->fill ($data); |
|
| 72 | + $job->save (); |
|
| 73 | + return response ()->json ($this->jobToArray ($job)); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | 76 | /** |
@@ -79,9 +79,9 @@ discard block |
||
| 79 | 79 | * @param \App\Models\JobPoster $job Incoming Job Poster. |
| 80 | 80 | * @return \Illuminate\Http\Response |
| 81 | 81 | */ |
| 82 | - public function show(JobPoster $job) |
|
| 82 | + public function show (JobPoster $job) |
|
| 83 | 83 | { |
| 84 | - return response()->json($this->jobToArray($job)); |
|
| 84 | + return response ()->json ($this->jobToArray ($job)); |
|
| 85 | 85 | } |
| 86 | 86 | |
| 87 | 87 | /** |
@@ -91,16 +91,16 @@ discard block |
||
| 91 | 91 | * @param \App\Models\JobPoster $job Incoming Job Poster. |
| 92 | 92 | * @return \Illuminate\Http\Response |
| 93 | 93 | */ |
| 94 | - public function update(UpdateJobPoster $request, JobPoster $job) |
|
| 94 | + public function update (UpdateJobPoster $request, JobPoster $job) |
|
| 95 | 95 | { |
| 96 | - $data = $request->validated(); |
|
| 96 | + $data = $request->validated (); |
|
| 97 | 97 | // Only values both in the JobPoster->fillable array, |
| 98 | 98 | // and returned by UpdateJobPoster->validatedData(), will be set. |
| 99 | - $job->fill($data); |
|
| 99 | + $job->fill ($data); |
|
| 100 | 100 | // Defaulting JPB updated jobs to monthly for now. |
| 101 | - $job->job_term_id = JobTerm::where('name', 'month')->value('id'); |
|
| 102 | - $job->save(); |
|
| 103 | - return response()->json($this->jobToArray($job->fresh())); |
|
| 101 | + $job->job_term_id = JobTerm::where ('name', 'month')->value ('id'); |
|
| 102 | + $job->save (); |
|
| 103 | + return response ()->json ($this->jobToArray ($job->fresh ())); |
|
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | /** |
@@ -109,7 +109,7 @@ discard block |
||
| 109 | 109 | * @param integer $id Job Poster ID. |
| 110 | 110 | * @return \Illuminate\Http\Response |
| 111 | 111 | */ |
| 112 | - public function destroy($id) |
|
| 112 | + public function destroy ($id) |
|
| 113 | 113 | { |
| 114 | 114 | // TODO: complete. |
| 115 | 115 | } |
@@ -120,23 +120,23 @@ discard block |
||
| 120 | 120 | * @param \App\Models\JobPoster $job Job Poster object. |
| 121 | 121 | * @return \Illuminate\Http\Response |
| 122 | 122 | */ |
| 123 | - public function submitForReview(JobPoster $job) |
|
| 123 | + public function submitForReview (JobPoster $job) |
|
| 124 | 124 | { |
| 125 | 125 | // Check to avoid submitting for review multiple times. |
| 126 | 126 | if ($job->review_requested_at === null) { |
| 127 | 127 | // Update review request timestamp. |
| 128 | - $job->review_requested_at = new Date(); |
|
| 129 | - $job->save(); |
|
| 128 | + $job->review_requested_at = new Date (); |
|
| 129 | + $job->save (); |
|
| 130 | 130 | |
| 131 | 131 | // Send email. |
| 132 | - $reviewer_email = config('mail.reviewer_email'); |
|
| 132 | + $reviewer_email = config ('mail.reviewer_email'); |
|
| 133 | 133 | if (isset($reviewer_email)) { |
| 134 | - Mail::to($reviewer_email)->send(new JobPosterReviewRequested($job, Auth::user())); |
|
| 134 | + Mail::to ($reviewer_email)->send (new JobPosterReviewRequested ($job, Auth::user ())); |
|
| 135 | 135 | } else { |
| 136 | - Log::error('The reviewer email environment variable is not set.'); |
|
| 136 | + Log::error ('The reviewer email environment variable is not set.'); |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | - return response()->json($this->jobToArray($job)); |
|
| 140 | + return response ()->json ($this->jobToArray ($job)); |
|
| 141 | 141 | } |
| 142 | 142 | } |
@@ -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', [ |
@@ -19,10 +19,10 @@ discard block |
||
| 19 | 19 | * @param \Illuminate\Http\Request $request Incoming Request. |
| 20 | 20 | * @return \Illuminate\Http\Response |
| 21 | 21 | */ |
| 22 | - public function editAuthenticated(Request $request) |
|
| 22 | + public function editAuthenticated (Request $request) |
|
| 23 | 23 | { |
| 24 | - $applicant = $request->user()->applicant; |
|
| 25 | - return redirect(route('profile.experience.edit', $applicant)); |
|
| 24 | + $applicant = $request->user ()->applicant; |
|
| 25 | + return redirect (route ('profile.experience.edit', $applicant)); |
|
| 26 | 26 | } |
| 27 | 27 | |
| 28 | 28 | /** |
@@ -32,13 +32,13 @@ discard block |
||
| 32 | 32 | * @param \App\Models\Applicant $applicant Incoming applicant object. |
| 33 | 33 | * @return \Illuminate\Http\Response |
| 34 | 34 | */ |
| 35 | - public function edit(Request $request, Applicant $applicant) |
|
| 35 | + public function edit (Request $request, Applicant $applicant) |
|
| 36 | 36 | { |
| 37 | - return view('applicant/profile_02_experience', [ |
|
| 37 | + return view ('applicant/profile_02_experience', [ |
|
| 38 | 38 | 'applicant' => $applicant, |
| 39 | - 'profile' => Lang::get('applicant/profile_experience'), |
|
| 40 | - 'work_template' => Lang::get('common/work_experience'), |
|
| 41 | - 'form_submit_action' => route('profile.experience.update', $applicant) |
|
| 39 | + 'profile' => Lang::get ('applicant/profile_experience'), |
|
| 40 | + 'work_template' => Lang::get ('common/work_experience'), |
|
| 41 | + 'form_submit_action' => route ('profile.experience.update', $applicant) |
|
| 42 | 42 | ]); |
| 43 | 43 | } |
| 44 | 44 | |
@@ -49,13 +49,13 @@ discard block |
||
| 49 | 49 | * @param \App\Models\Applicant $applicant Incoming Applicant. |
| 50 | 50 | * @return \Illuminate\Http\Response |
| 51 | 51 | */ |
| 52 | - public function update(Request $request, Applicant $applicant) |
|
| 52 | + public function update (Request $request, Applicant $applicant) |
|
| 53 | 53 | { |
| 54 | - $input = $request->input(); |
|
| 54 | + $input = $request->input (); |
|
| 55 | 55 | |
| 56 | 56 | $degrees = $input['degrees']; |
| 57 | 57 | |
| 58 | - $request->validate([ |
|
| 58 | + $request->validate ([ |
|
| 59 | 59 | 'degrees.new.*.degree_type_id' => 'required', |
| 60 | 60 | 'degrees.new.*.area_of_study' => 'required', |
| 61 | 61 | 'degrees.new.*.institution' => 'required', |
@@ -72,16 +72,16 @@ discard block |
||
| 72 | 72 | // Check if no degrees were resubmitted, or if this specific one wasn't. |
| 73 | 73 | if (!isset($degrees['old']) || |
| 74 | 74 | !isset($degrees['old'][$oldDegree->id])) { |
| 75 | - $oldDegree->delete(); |
|
| 75 | + $oldDegree->delete (); |
|
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | 79 | // Save new degrees. |
| 80 | 80 | if (isset($degrees['new'])) { |
| 81 | 81 | foreach ($degrees['new'] as $degreeInput) { |
| 82 | - $degree = new Degree(); |
|
| 82 | + $degree = new Degree (); |
|
| 83 | 83 | $degree->applicant_id = $applicant->id; |
| 84 | - $degree->fill([ |
|
| 84 | + $degree->fill ([ |
|
| 85 | 85 | 'degree_type_id' => $degreeInput['degree_type_id'], |
| 86 | 86 | 'area_of_study' => $degreeInput['area_of_study'], |
| 87 | 87 | 'institution' => $degreeInput['institution'], |
@@ -90,7 +90,7 @@ discard block |
||
| 90 | 90 | 'end_date' => $degreeInput['end_date'], |
| 91 | 91 | 'blockcert_url' => $degreeInput['blockcert_url'], |
| 92 | 92 | ]); |
| 93 | - $degree->save(); |
|
| 93 | + $degree->save (); |
|
| 94 | 94 | } |
| 95 | 95 | } |
| 96 | 96 | |
@@ -98,9 +98,9 @@ discard block |
||
| 98 | 98 | if (isset($degrees['old'])) { |
| 99 | 99 | foreach ($degrees['old'] as $id => $degreeInput) { |
| 100 | 100 | // Ensure this degree belongs to this applicant. |
| 101 | - $degree = $applicant->degrees->firstWhere('id', $id); |
|
| 101 | + $degree = $applicant->degrees->firstWhere ('id', $id); |
|
| 102 | 102 | if ($degree != null) { |
| 103 | - $degree->fill([ |
|
| 103 | + $degree->fill ([ |
|
| 104 | 104 | 'degree_type_id' => $degreeInput['degree_type_id'], |
| 105 | 105 | 'area_of_study' => $degreeInput['area_of_study'], |
| 106 | 106 | 'institution' => $degreeInput['institution'], |
@@ -109,16 +109,16 @@ discard block |
||
| 109 | 109 | 'end_date' => $degreeInput['end_date'], |
| 110 | 110 | 'blockcert_url' => $degreeInput['blockcert_url'], |
| 111 | 111 | ]); |
| 112 | - $degree->save(); |
|
| 112 | + $degree->save (); |
|
| 113 | 113 | } else { |
| 114 | - Log::warning("Applicant $applicant->id attempted to update degree with invalid id: $id"); |
|
| 114 | + Log::warning ("Applicant $applicant->id attempted to update degree with invalid id: $id"); |
|
| 115 | 115 | } |
| 116 | 116 | } |
| 117 | 117 | } |
| 118 | 118 | |
| 119 | 119 | $courses = $input['courses']; |
| 120 | 120 | |
| 121 | - $request->validate([ |
|
| 121 | + $request->validate ([ |
|
| 122 | 122 | 'courses.new.*.name' => 'required', |
| 123 | 123 | 'courses.new.*.institution' => 'required', |
| 124 | 124 | 'courses.new.*.course_status_id' => 'required', |
@@ -133,23 +133,23 @@ discard block |
||
| 133 | 133 | // Check if no courses were resubmitted, or if this specific one wasn't. |
| 134 | 134 | if (!isset($courses['old']) || |
| 135 | 135 | !isset($courses['old'][$oldCourse->id])) { |
| 136 | - $oldCourse->delete(); |
|
| 136 | + $oldCourse->delete (); |
|
| 137 | 137 | } |
| 138 | 138 | } |
| 139 | 139 | |
| 140 | 140 | // Save new courses. |
| 141 | 141 | if (isset($courses['new'])) { |
| 142 | 142 | foreach ($courses['new'] as $courseInput) { |
| 143 | - $course = new Course(); |
|
| 143 | + $course = new Course (); |
|
| 144 | 144 | $course->applicant_id = $applicant->id; |
| 145 | - $course->fill([ |
|
| 145 | + $course->fill ([ |
|
| 146 | 146 | 'name' => $courseInput['name'], |
| 147 | 147 | 'institution' => $courseInput['institution'], |
| 148 | 148 | 'course_status_id' => $courseInput['course_status_id'], |
| 149 | 149 | 'start_date' => $courseInput['start_date'], |
| 150 | 150 | 'end_date' => $courseInput['end_date'] |
| 151 | 151 | ]); |
| 152 | - $course->save(); |
|
| 152 | + $course->save (); |
|
| 153 | 153 | } |
| 154 | 154 | } |
| 155 | 155 | |
@@ -157,25 +157,25 @@ discard block |
||
| 157 | 157 | if (isset($courses['old'])) { |
| 158 | 158 | foreach ($courses['old'] as $id => $courseInput) { |
| 159 | 159 | // Ensure this course belongs to this applicant. |
| 160 | - $course = $applicant->courses->firstWhere('id', $id); |
|
| 160 | + $course = $applicant->courses->firstWhere ('id', $id); |
|
| 161 | 161 | if ($course != null) { |
| 162 | - $course->fill([ |
|
| 162 | + $course->fill ([ |
|
| 163 | 163 | 'name' => $courseInput['name'], |
| 164 | 164 | 'institution' => $courseInput['institution'], |
| 165 | 165 | 'course_status_id' => $courseInput['course_status_id'], |
| 166 | 166 | 'start_date' => $courseInput['start_date'], |
| 167 | 167 | 'end_date' => $courseInput['end_date'] |
| 168 | 168 | ]); |
| 169 | - $course->save(); |
|
| 169 | + $course->save (); |
|
| 170 | 170 | } else { |
| 171 | - Log::warning("Applicant $applicant->id attempted to update course with invalid id: $id"); |
|
| 171 | + Log::warning ("Applicant $applicant->id attempted to update course with invalid id: $id"); |
|
| 172 | 172 | } |
| 173 | 173 | } |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | $work_experiences = $input['work_experiences']; |
| 177 | 177 | |
| 178 | - $request->validate([ |
|
| 178 | + $request->validate ([ |
|
| 179 | 179 | 'work_experiences.new.*.role' => 'required', |
| 180 | 180 | 'work_experiences.new.*.company' => 'required', |
| 181 | 181 | 'work_experiences.new.*.description' => 'required', |
@@ -190,23 +190,23 @@ discard block |
||
| 190 | 190 | // Check if no work_experiences were resubmitted, or if this specific one wasn't. |
| 191 | 191 | if (!isset($work_experiences['old']) || |
| 192 | 192 | !isset($work_experiences['old'][$oldWorkExperience->id])) { |
| 193 | - $oldWorkExperience->delete(); |
|
| 193 | + $oldWorkExperience->delete (); |
|
| 194 | 194 | } |
| 195 | 195 | } |
| 196 | 196 | |
| 197 | 197 | // Save new work_experiences. |
| 198 | 198 | if (isset($work_experiences['new'])) { |
| 199 | 199 | foreach ($work_experiences['new'] as $workExperienceInput) { |
| 200 | - $workExperience = new WorkExperience(); |
|
| 200 | + $workExperience = new WorkExperience (); |
|
| 201 | 201 | $workExperience->applicant_id = $applicant->id; |
| 202 | - $workExperience->fill([ |
|
| 202 | + $workExperience->fill ([ |
|
| 203 | 203 | 'role' => $workExperienceInput['role'], |
| 204 | 204 | 'company' => $workExperienceInput['company'], |
| 205 | 205 | 'description' => $workExperienceInput['description'], |
| 206 | 206 | 'start_date' => $workExperienceInput['start_date'], |
| 207 | 207 | 'end_date' => $workExperienceInput['end_date'] |
| 208 | 208 | ]); |
| 209 | - $workExperience->save(); |
|
| 209 | + $workExperience->save (); |
|
| 210 | 210 | } |
| 211 | 211 | } |
| 212 | 212 | |
@@ -214,22 +214,22 @@ discard block |
||
| 214 | 214 | if (isset($work_experiences['old'])) { |
| 215 | 215 | foreach ($work_experiences['old'] as $id => $workExperienceInput) { |
| 216 | 216 | // Ensure this work_experience belongs to this applicant. |
| 217 | - $workExperience = $applicant->work_experiences->firstWhere('id', $id); |
|
| 217 | + $workExperience = $applicant->work_experiences->firstWhere ('id', $id); |
|
| 218 | 218 | if ($workExperience != null) { |
| 219 | - $workExperience->fill([ |
|
| 219 | + $workExperience->fill ([ |
|
| 220 | 220 | 'role' => $workExperienceInput['role'], |
| 221 | 221 | 'company' => $workExperienceInput['company'], |
| 222 | 222 | 'description' => $workExperienceInput['description'], |
| 223 | 223 | 'start_date' => $workExperienceInput['start_date'], |
| 224 | 224 | 'end_date' => $workExperienceInput['end_date'] |
| 225 | 225 | ]); |
| 226 | - $workExperience->save(); |
|
| 226 | + $workExperience->save (); |
|
| 227 | 227 | } else { |
| 228 | - Log::warning("Applicant $applicant->id attempted to update work_experience with invalid id: $id"); |
|
| 228 | + Log::warning ("Applicant $applicant->id attempted to update work_experience with invalid id: $id"); |
|
| 229 | 229 | } |
| 230 | 230 | } |
| 231 | 231 | } |
| 232 | 232 | |
| 233 | - return redirect(route('profile.experience.edit', $applicant)); |
|
| 233 | + return redirect (route ('profile.experience.edit', $applicant)); |
|
| 234 | 234 | } |
| 235 | 235 | } |
@@ -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() && |
@@ -17,62 +17,62 @@ discard block |
||
| 17 | 17 | * |
| 18 | 18 | * @return void |
| 19 | 19 | */ |
| 20 | - public function setup() : void |
|
| 20 | + public function setup () : void |
|
| 21 | 21 | { |
| 22 | - $this->crud->setModel('App\Models\JobPoster'); |
|
| 23 | - $this->crud->setRoute('admin/job-poster'); |
|
| 24 | - $this->crud->setEntityNameStrings('Job Poster', 'Job Posters'); |
|
| 22 | + $this->crud->setModel ('App\Models\JobPoster'); |
|
| 23 | + $this->crud->setRoute ('admin/job-poster'); |
|
| 24 | + $this->crud->setEntityNameStrings ('Job Poster', 'Job Posters'); |
|
| 25 | 25 | |
| 26 | - if (!$this->request->has('order')) { |
|
| 27 | - $this->crud->orderBy('close_date_time', 'desc'); |
|
| 26 | + if (!$this->request->has ('order')) { |
|
| 27 | + $this->crud->orderBy ('close_date_time', 'desc'); |
|
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | |
| 31 | - public function setupListOperation() |
|
| 31 | + public function setupListOperation () |
|
| 32 | 32 | { |
| 33 | 33 | // Add the custom blade buttons found in resources/views/vendor/backpack/crud/buttons/. |
| 34 | - $this->crud->addButtonFromView('line', 'job_admin_edit', 'job_admin_edit', 'end'); |
|
| 35 | - $this->crud->addButtonFromView('line', 'spb_link', 'spb_link', 'end'); |
|
| 36 | - $this->crud->addButtonFromView('line', 'jpb_link', 'jpb_link', 'end'); |
|
| 37 | - $this->crud->addButtonFromView('line', 'job_poster_link', 'job_poster_link', 'end'); |
|
| 34 | + $this->crud->addButtonFromView ('line', 'job_admin_edit', 'job_admin_edit', 'end'); |
|
| 35 | + $this->crud->addButtonFromView ('line', 'spb_link', 'spb_link', 'end'); |
|
| 36 | + $this->crud->addButtonFromView ('line', 'jpb_link', 'jpb_link', 'end'); |
|
| 37 | + $this->crud->addButtonFromView ('line', 'job_poster_link', 'job_poster_link', 'end'); |
|
| 38 | 38 | |
| 39 | 39 | |
| 40 | - $this->crud->addColumn([ |
|
| 40 | + $this->crud->addColumn ([ |
|
| 41 | 41 | 'name' => 'id', |
| 42 | 42 | 'type' => 'number', |
| 43 | 43 | 'label' => 'ID' |
| 44 | 44 | ]); |
| 45 | - $this->crud->addColumn([ |
|
| 45 | + $this->crud->addColumn ([ |
|
| 46 | 46 | 'name' => 'title', |
| 47 | 47 | 'type' => 'text', |
| 48 | 48 | 'label' => 'Title' |
| 49 | 49 | ]); |
| 50 | - $this->crud->addColumn([ |
|
| 50 | + $this->crud->addColumn ([ |
|
| 51 | 51 | 'name' => 'status', |
| 52 | 52 | 'label' => 'Status', |
| 53 | 53 | 'type' => 'model_function', |
| 54 | 54 | 'function_name' => 'status' |
| 55 | 55 | ]); |
| 56 | - $this->crud->addColumn([ |
|
| 56 | + $this->crud->addColumn ([ |
|
| 57 | 57 | 'name' => 'published', |
| 58 | 58 | 'label' => 'Published', |
| 59 | 59 | 'type' => 'check', |
| 60 | 60 | ]); |
| 61 | - $this->crud->addColumn([ |
|
| 61 | + $this->crud->addColumn ([ |
|
| 62 | 62 | 'name' => 'manager_user_name', |
| 63 | 63 | 'type' => 'closure', |
| 64 | 64 | 'label' => 'Manager', |
| 65 | 65 | 'orderable' => false, |
| 66 | 66 | 'function' => function ($entry) { |
| 67 | - return '<a href="' . route('manager.profile.edit', $entry->manager->user->id) . '" target="_blank">' . $entry->manager->user->full_name . '</a>'; |
|
| 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 | - $this->crud->addColumn([ |
|
| 70 | + $this->crud->addColumn ([ |
|
| 71 | 71 | 'name' => 'department.name', |
| 72 | 72 | 'label' => 'Department', |
| 73 | 73 | 'type' => 'text' |
| 74 | 74 | ]); |
| 75 | - $this->crud->addColumn([ |
|
| 75 | + $this->crud->addColumn ([ |
|
| 76 | 76 | 'name' => 'submitted_applications_count', |
| 77 | 77 | 'label' => 'Total Applications', |
| 78 | 78 | 'type' => 'model_function', |
@@ -80,28 +80,28 @@ discard block |
||
| 80 | 80 | ]); |
| 81 | 81 | |
| 82 | 82 | // Filters. |
| 83 | - $this->crud->addFilter([ |
|
| 83 | + $this->crud->addFilter ([ |
|
| 84 | 84 | 'name' => 'departments', |
| 85 | 85 | 'type' => 'select2_multiple', |
| 86 | 86 | 'label' => 'Departments' |
| 87 | 87 | ], function () { |
| 88 | - return Department::all()->pluck('name', 'id')->toArray(); |
|
| 88 | + return Department::all ()->pluck ('name', 'id')->toArray (); |
|
| 89 | 89 | }, function ($values) { |
| 90 | - $this->crud->addClause('WhereHas', 'department', function ($query) use ($values) { |
|
| 91 | - foreach (json_decode($values) as $key => $value) { |
|
| 90 | + $this->crud->addClause ('WhereHas', 'department', function ($query) use ($values) { |
|
| 91 | + foreach (json_decode ($values) as $key => $value) { |
|
| 92 | 92 | if ($key === 0) { |
| 93 | - $query->where('id', $value); |
|
| 93 | + $query->where ('id', $value); |
|
| 94 | 94 | } else { |
| 95 | - $query->orWhere('id', $value); |
|
| 95 | + $query->orWhere ('id', $value); |
|
| 96 | 96 | } |
| 97 | 97 | } |
| 98 | 98 | }); |
| 99 | 99 | }); |
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - public function setupUpdateOperation() |
|
| 102 | + public function setupUpdateOperation () |
|
| 103 | 103 | { |
| 104 | - $this->crud->addField([ |
|
| 104 | + $this->crud->addField ([ |
|
| 105 | 105 | 'name' => 'title', |
| 106 | 106 | 'label' => 'Title', |
| 107 | 107 | 'type' => 'text', |
@@ -109,22 +109,22 @@ discard block |
||
| 109 | 109 | 'readonly' => 'readonly' |
| 110 | 110 | ] |
| 111 | 111 | ]); |
| 112 | - $this->crud->addField([ |
|
| 112 | + $this->crud->addField ([ |
|
| 113 | 113 | 'name' => 'salary_min', |
| 114 | 114 | 'type' => 'number', |
| 115 | 115 | 'label' => 'Minimum Salary', |
| 116 | 116 | ]); |
| 117 | - $this->crud->addField([ |
|
| 117 | + $this->crud->addField ([ |
|
| 118 | 118 | 'name' => 'salary_max', |
| 119 | 119 | 'type' => 'number', |
| 120 | 120 | 'label' => 'Maximum Salary', |
| 121 | 121 | ]); |
| 122 | - $this->crud->addField([ |
|
| 122 | + $this->crud->addField ([ |
|
| 123 | 123 | 'name' => 'noc', |
| 124 | 124 | 'type' => 'number', |
| 125 | 125 | 'label' => 'NOC Code', |
| 126 | 126 | ]); |
| 127 | - $this->crud->addField([ |
|
| 127 | + $this->crud->addField ([ |
|
| 128 | 128 | 'name' => 'open_date_time', |
| 129 | 129 | 'label' => 'Open Date', |
| 130 | 130 | 'type' => 'date_picker', |
@@ -133,7 +133,7 @@ discard block |
||
| 133 | 133 | 'format' => 'yyyy-mm-dd', |
| 134 | 134 | ], |
| 135 | 135 | ]); |
| 136 | - $this->crud->addField([ |
|
| 136 | + $this->crud->addField ([ |
|
| 137 | 137 | 'name' => 'close_date_time', |
| 138 | 138 | 'label' => 'Close Date', |
| 139 | 139 | 'type' => 'date_picker', |
@@ -142,7 +142,7 @@ discard block |
||
| 142 | 142 | 'format' => 'yyyy-mm-dd', |
| 143 | 143 | ], |
| 144 | 144 | ]); |
| 145 | - $this->crud->addField([ |
|
| 145 | + $this->crud->addField ([ |
|
| 146 | 146 | 'name' => 'start_date_time', |
| 147 | 147 | 'label' => 'Start Date', |
| 148 | 148 | 'type' => 'date_picker', |
@@ -151,17 +151,17 @@ discard block |
||
| 151 | 151 | 'format' => 'yyyy-mm-dd', |
| 152 | 152 | ], |
| 153 | 153 | ]); |
| 154 | - $this->crud->addField([ |
|
| 154 | + $this->crud->addField ([ |
|
| 155 | 155 | 'name' => 'process_number', |
| 156 | 156 | 'type' => 'number', |
| 157 | 157 | 'label' => 'Process #', |
| 158 | 158 | ]); |
| 159 | - $this->crud->addField([ |
|
| 159 | + $this->crud->addField ([ |
|
| 160 | 160 | 'name' => 'priority_clearance_number', |
| 161 | 161 | 'type' => 'number', |
| 162 | 162 | 'label' => 'Priority Clearance #', |
| 163 | 163 | ]); |
| 164 | - $this->crud->addField([ |
|
| 164 | + $this->crud->addField ([ |
|
| 165 | 165 | 'name' => 'loo_issuance_date', |
| 166 | 166 | 'type' => 'date_picker', |
| 167 | 167 | 'label' => 'Letter of Offer Issuance Date', |
@@ -170,10 +170,10 @@ discard block |
||
| 170 | 170 | 'format' => 'yyyy-mm-dd', |
| 171 | 171 | ], |
| 172 | 172 | ]); |
| 173 | - if ($this->crud->getCurrentEntry() && |
|
| 174 | - !$this->crud->getCurrentEntry()->published |
|
| 173 | + if ($this->crud->getCurrentEntry () && |
|
| 174 | + !$this->crud->getCurrentEntry ()->published |
|
| 175 | 175 | ) { |
| 176 | - $this->crud->addField([ |
|
| 176 | + $this->crud->addField ([ |
|
| 177 | 177 | 'name' => 'published', |
| 178 | 178 | 'label' => 'Publish', |
| 179 | 179 | 'type' => 'checkbox' |
@@ -181,22 +181,22 @@ discard block |
||
| 181 | 181 | } |
| 182 | 182 | } |
| 183 | 183 | |
| 184 | - public function update() |
|
| 184 | + public function update () |
|
| 185 | 185 | { |
| 186 | - $open_date = $this->crud->request->request->get('open_date_time'); |
|
| 187 | - $close_date = $this->crud->request->request->get('close_date_time'); |
|
| 188 | - $start_date = $this->crud->request->request->get('start_date_time'); |
|
| 189 | - $this->crud->request->request->remove('open_date_time'); |
|
| 190 | - $this->crud->request->request->remove('close_date_time'); |
|
| 191 | - $this->crud->request->request->remove('start_date_time'); |
|
| 186 | + $open_date = $this->crud->request->request->get ('open_date_time'); |
|
| 187 | + $close_date = $this->crud->request->request->get ('close_date_time'); |
|
| 188 | + $start_date = $this->crud->request->request->get ('start_date_time'); |
|
| 189 | + $this->crud->request->request->remove ('open_date_time'); |
|
| 190 | + $this->crud->request->request->remove ('close_date_time'); |
|
| 191 | + $this->crud->request->request->remove ('start_date_time'); |
|
| 192 | 192 | // Manipulates the input fields to save the "end of day" timestamp for |
| 193 | 193 | // open/close/start dates. |
| 194 | - $this->crud->request->request->add([ |
|
| 195 | - 'open_date_time' => ptDayStartToUtcTime($open_date), |
|
| 196 | - 'close_date_time' => ptDayEndToUtcTime($close_date), |
|
| 197 | - 'start_date_time' => ptDayStartToUtcTime($start_date), |
|
| 194 | + $this->crud->request->request->add ([ |
|
| 195 | + 'open_date_time' => ptDayStartToUtcTime ($open_date), |
|
| 196 | + 'close_date_time' => ptDayEndToUtcTime ($close_date), |
|
| 197 | + 'start_date_time' => ptDayStartToUtcTime ($start_date), |
|
| 198 | 198 | ]); |
| 199 | - $response = $this->traitUpdate(); |
|
| 199 | + $response = $this->traitUpdate (); |
|
| 200 | 200 | |
| 201 | 201 | return $response; |
| 202 | 202 | } |
@@ -13,7 +13,7 @@ |
||
| 13 | 13 | public function getFunctions(): array |
| 14 | 14 | { |
| 15 | 15 | return [ |
| 16 | - new Twig_SimpleFunction('handleNullState', [$this, 'handleNullState']), |
|
| 16 | + new Twig_SimpleFunction('handleNullState', [$this, 'handleNullState']), |
|
| 17 | 17 | ]; |
| 18 | 18 | } |
| 19 | 19 | |
@@ -10,10 +10,10 @@ discard block |
||
| 10 | 10 | * Functions |
| 11 | 11 | * @return array |
| 12 | 12 | */ |
| 13 | - public function getFunctions(): array |
|
| 13 | + public function getFunctions (): array |
|
| 14 | 14 | { |
| 15 | 15 | return [ |
| 16 | - new Twig_SimpleFunction('handleNullState', [$this, 'handleNullState']), |
|
| 16 | + new Twig_SimpleFunction ('handleNullState', [$this, 'handleNullState']), |
|
| 17 | 17 | ]; |
| 18 | 18 | } |
| 19 | 19 | |
@@ -27,7 +27,7 @@ discard block |
||
| 27 | 27 | * |
| 28 | 28 | * @return void |
| 29 | 29 | */ |
| 30 | - public function handleNullState($output, $outputHtml, string $nullStateHtml): void |
|
| 30 | + public function handleNullState ($output, $outputHtml, string $nullStateHtml): void |
|
| 31 | 31 | { |
| 32 | 32 | if (!empty($output) && !empty($outputHtml)) { |
| 33 | 33 | echo $outputHtml; |
@@ -28,8 +28,8 @@ |
||
| 28 | 28 | * @property string $level_description The localized description of the skill level (accounts for skill type). |
| 29 | 29 | * |
| 30 | 30 | * Localized Properties: |
| 31 | - * @property string $description |
|
| 32 | - * @property string $specificity |
|
| 31 | + * @property string $description |
|
| 32 | + * @property string $specificity |
|
| 33 | 33 | */ |
| 34 | 34 | class Criteria extends BaseModel |
| 35 | 35 | { |
@@ -63,29 +63,29 @@ discard block |
||
| 63 | 63 | 'skill_level' |
| 64 | 64 | ]; |
| 65 | 65 | |
| 66 | - public function criteria_type() //phpcs:ignore |
|
| 66 | + public function criteria_type () //phpcs:ignore |
|
| 67 | 67 | { |
| 68 | - return $this->belongsTo(\App\Models\Lookup\CriteriaType::class); |
|
| 68 | + return $this->belongsTo (\App\Models\Lookup\CriteriaType::class); |
|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | - public function job_poster() //phpcs:ignore |
|
| 71 | + public function job_poster () //phpcs:ignore |
|
| 72 | 72 | { |
| 73 | - return $this->belongsTo(\App\Models\JobPoster::class); |
|
| 73 | + return $this->belongsTo (\App\Models\JobPoster::class); |
|
| 74 | 74 | } |
| 75 | 75 | |
| 76 | - public function skill() |
|
| 76 | + public function skill () |
|
| 77 | 77 | { |
| 78 | - return $this->belongsTo(\App\Models\Skill::class); |
|
| 78 | + return $this->belongsTo (\App\Models\Skill::class); |
|
| 79 | 79 | } |
| 80 | 80 | |
| 81 | - public function skill_level() //phpcs:ignore |
|
| 81 | + public function skill_level () //phpcs:ignore |
|
| 82 | 82 | { |
| 83 | - return $this->belongsTo(\App\Models\Lookup\SkillLevel::class); |
|
| 83 | + return $this->belongsTo (\App\Models\Lookup\SkillLevel::class); |
|
| 84 | 84 | } |
| 85 | 85 | |
| 86 | - public function criteria_translations() //phpcs:ignore |
|
| 86 | + public function criteria_translations () //phpcs:ignore |
|
| 87 | 87 | { |
| 88 | - return $this->hasMany(\App\Models\Lookup\CriteriaTypeTranslation::class); |
|
| 88 | + return $this->hasMany (\App\Models\Lookup\CriteriaTypeTranslation::class); |
|
| 89 | 89 | } |
| 90 | 90 | |
| 91 | 91 | /** |
@@ -93,9 +93,9 @@ discard block |
||
| 93 | 93 | * |
| 94 | 94 | * @return \Illuminate\Database\Eloquent\Collection |
| 95 | 95 | */ |
| 96 | - public function assessments() // phpcs:ignore |
|
| 96 | + public function assessments () // phpcs:ignore |
|
| 97 | 97 | { |
| 98 | - return $this->hasMany(\App\Models\Assessment::class, 'criterion_id'); |
|
| 98 | + return $this->hasMany (\App\Models\Assessment::class, 'criterion_id'); |
|
| 99 | 99 | } |
| 100 | 100 | |
| 101 | 101 | /** |
@@ -103,11 +103,11 @@ discard block |
||
| 103 | 103 | * |
| 104 | 104 | * @return string |
| 105 | 105 | */ |
| 106 | - public function getLevelNameAttribute(): string |
|
| 106 | + public function getLevelNameAttribute (): string |
|
| 107 | 107 | { |
| 108 | 108 | $level = $this->skill_level->name; |
| 109 | 109 | $type = $this->skill->skill_type->name; |
| 110 | - return Lang::get("common/lookup/skill_level.$level.$type.name"); |
|
| 110 | + return Lang::get ("common/lookup/skill_level.$level.$type.name"); |
|
| 111 | 111 | } |
| 112 | 112 | |
| 113 | 113 | /** |
@@ -115,10 +115,10 @@ discard block |
||
| 115 | 115 | * |
| 116 | 116 | * @return string |
| 117 | 117 | */ |
| 118 | - public function getLevelDescriptionAttribute() : string |
|
| 118 | + public function getLevelDescriptionAttribute () : string |
|
| 119 | 119 | { |
| 120 | 120 | $level = $this->skill_level->name; |
| 121 | 121 | $type = $this->skill->skill_type->name; |
| 122 | - return Lang::get("common/lookup/skill_level.$level.$type.description"); |
|
| 122 | + return Lang::get ("common/lookup/skill_level.$level.$type.description"); |
|
| 123 | 123 | } |
| 124 | 124 | } |
@@ -173,10 +173,10 @@ discard block |
||
| 173 | 173 | } |
| 174 | 174 | |
| 175 | 175 | /** |
| 176 | - * Check if the user has the specified role. |
|
| 177 | - * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
|
| 178 | - * @return boolean |
|
| 179 | - */ |
|
| 176 | + * Check if the user has the specified role. |
|
| 177 | + * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
|
| 178 | + * @return boolean |
|
| 179 | + */ |
|
| 180 | 180 | public function hasRole($role) |
| 181 | 181 | { |
| 182 | 182 | switch ($role) { |
@@ -195,8 +195,8 @@ discard block |
||
| 195 | 195 | * Set this user to the specified role. |
| 196 | 196 | * |
| 197 | 197 | * @param string $role Must be either 'applicant', 'manager' or 'admin. |
| 198 | - * @return void |
|
| 199 | - */ |
|
| 198 | + * @return void |
|
| 199 | + */ |
|
| 200 | 200 | public function setRole(string $role): void |
| 201 | 201 | { |
| 202 | 202 | $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail()); |
@@ -231,7 +231,7 @@ discard block |
||
| 231 | 231 | * Returns a user's full name. |
| 232 | 232 | * |
| 233 | 233 | * @return string |
| 234 | - */ |
|
| 234 | + */ |
|
| 235 | 235 | public function getFullNameAttribute(): string |
| 236 | 236 | { |
| 237 | 237 | return $this->first_name . ' ' . $this->last_name; |
@@ -89,27 +89,27 @@ discard block |
||
| 89 | 89 | 'updated' => UserUpdated::class, |
| 90 | 90 | ]; |
| 91 | 91 | |
| 92 | - public function applicant() //phpcs:ignore |
|
| 92 | + public function applicant () //phpcs:ignore |
|
| 93 | 93 | { |
| 94 | - return $this->hasOne(\App\Models\Applicant::class); |
|
| 94 | + return $this->hasOne (\App\Models\Applicant::class); |
|
| 95 | 95 | } |
| 96 | 96 | |
| 97 | - public function manager() //phpcs:ignore |
|
| 97 | + public function manager () //phpcs:ignore |
|
| 98 | 98 | { |
| 99 | - return $this->hasOne(\App\Models\Manager::class); |
|
| 99 | + return $this->hasOne (\App\Models\Manager::class); |
|
| 100 | 100 | } |
| 101 | 101 | |
| 102 | - public function profile_pic() //phpcs:ignore |
|
| 102 | + public function profile_pic () //phpcs:ignore |
|
| 103 | 103 | { |
| 104 | - return $this->hasOne(\App\Models\ProfilePic::class); |
|
| 104 | + return $this->hasOne (\App\Models\ProfilePic::class); |
|
| 105 | 105 | } |
| 106 | 106 | |
| 107 | - public function user_role() //phpcs:ignore |
|
| 107 | + public function user_role () //phpcs:ignore |
|
| 108 | 108 | { |
| 109 | - return $this->belongsTo(\App\Models\UserRole::class); |
|
| 109 | + return $this->belongsTo (\App\Models\UserRole::class); |
|
| 110 | 110 | } |
| 111 | 111 | |
| 112 | - public function setIsPriorityAttribute($value) |
|
| 112 | + public function setIsPriorityAttribute ($value) |
|
| 113 | 113 | { |
| 114 | 114 | if ($value === null) { |
| 115 | 115 | $value = false; |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | * |
| 125 | 125 | * @return boolean |
| 126 | 126 | */ |
| 127 | - public function isApplicant(): bool |
|
| 127 | + public function isApplicant (): bool |
|
| 128 | 128 | { |
| 129 | 129 | // Currently, every user can create an Applicant profile and apply to jobs. |
| 130 | 130 | return true; |
@@ -135,9 +135,9 @@ discard block |
||
| 135 | 135 | * |
| 136 | 136 | * @return boolean |
| 137 | 137 | */ |
| 138 | - public function isUpgradedManager(): bool |
|
| 138 | + public function isUpgradedManager (): bool |
|
| 139 | 139 | { |
| 140 | - return $this->isAdmin() || $this->user_role->name === 'upgradedManager'; |
|
| 140 | + return $this->isAdmin () || $this->user_role->name === 'upgradedManager'; |
|
| 141 | 141 | } |
| 142 | 142 | |
| 143 | 143 | /** |
@@ -145,10 +145,10 @@ discard block |
||
| 145 | 145 | * |
| 146 | 146 | * @return boolean |
| 147 | 147 | */ |
| 148 | - public function isDemoManager(): bool |
|
| 148 | + public function isDemoManager (): bool |
|
| 149 | 149 | { |
| 150 | 150 | // Currently, every non-upgradedManager user can be considered a demoManager. |
| 151 | - return !$this->isUpgradedManager(); |
|
| 151 | + return !$this->isUpgradedManager (); |
|
| 152 | 152 | } |
| 153 | 153 | |
| 154 | 154 | /** |
@@ -156,10 +156,10 @@ discard block |
||
| 156 | 156 | * |
| 157 | 157 | * @return boolean |
| 158 | 158 | */ |
| 159 | - public function isManager(): bool |
|
| 159 | + public function isManager (): bool |
|
| 160 | 160 | { |
| 161 | 161 | // Currently, every user can use the Manager portal as a demoManager. |
| 162 | - return $this->isDemoManager() || $this->isUpgradedManager(); |
|
| 162 | + return $this->isDemoManager () || $this->isUpgradedManager (); |
|
| 163 | 163 | } |
| 164 | 164 | |
| 165 | 165 | /** |
@@ -167,7 +167,7 @@ discard block |
||
| 167 | 167 | * |
| 168 | 168 | * @return boolean |
| 169 | 169 | */ |
| 170 | - public function isAdmin(): bool |
|
| 170 | + public function isAdmin (): bool |
|
| 171 | 171 | { |
| 172 | 172 | return $this->user_role->name === 'admin'; |
| 173 | 173 | } |
@@ -177,15 +177,15 @@ discard block |
||
| 177 | 177 | * @param string $role This may be either 'applicant', 'manager' or 'admin'. |
| 178 | 178 | * @return boolean |
| 179 | 179 | */ |
| 180 | - public function hasRole($role) |
|
| 180 | + public function hasRole ($role) |
|
| 181 | 181 | { |
| 182 | 182 | switch ($role) { |
| 183 | 183 | case 'applicant': |
| 184 | - return $this->isApplicant(); |
|
| 184 | + return $this->isApplicant (); |
|
| 185 | 185 | case 'manager': |
| 186 | - return $this->isManager(); |
|
| 186 | + return $this->isManager (); |
|
| 187 | 187 | case 'admin': |
| 188 | - return $this->isAdmin(); |
|
| 188 | + return $this->isAdmin (); |
|
| 189 | 189 | default: |
| 190 | 190 | return false; |
| 191 | 191 | } |
@@ -197,9 +197,9 @@ discard block |
||
| 197 | 197 | * @param string $role Must be either 'applicant', 'manager' or 'admin. |
| 198 | 198 | * @return void |
| 199 | 199 | */ |
| 200 | - public function setRole(string $role): void |
|
| 200 | + public function setRole (string $role): void |
|
| 201 | 201 | { |
| 202 | - $this->user_role()->associate(UserRole::where('name', $role)->firstOrFail()); |
|
| 202 | + $this->user_role ()->associate (UserRole::where ('name', $role)->firstOrFail ()); |
|
| 203 | 203 | } |
| 204 | 204 | |
| 205 | 205 | /** |
@@ -210,9 +210,9 @@ discard block |
||
| 210 | 210 | * |
| 211 | 211 | * @return void |
| 212 | 212 | */ |
| 213 | - public function sendPasswordResetNotification($token): void |
|
| 213 | + public function sendPasswordResetNotification ($token): void |
|
| 214 | 214 | { |
| 215 | - $this->notify(new ResetPasswordNotification($token)); |
|
| 215 | + $this->notify (new ResetPasswordNotification ($token)); |
|
| 216 | 216 | } |
| 217 | 217 | |
| 218 | 218 | /** |
@@ -222,7 +222,7 @@ discard block |
||
| 222 | 222 | * |
| 223 | 223 | * @return boolean |
| 224 | 224 | */ |
| 225 | - public function isGovIdentityConfirmed(): bool |
|
| 225 | + public function isGovIdentityConfirmed (): bool |
|
| 226 | 226 | { |
| 227 | 227 | return $this->not_in_gov || !empty($this->gov_email); |
| 228 | 228 | } |
@@ -232,8 +232,8 @@ discard block |
||
| 232 | 232 | * |
| 233 | 233 | * @return string |
| 234 | 234 | */ |
| 235 | - public function getFullNameAttribute(): string |
|
| 235 | + public function getFullNameAttribute (): string |
|
| 236 | 236 | { |
| 237 | - return $this->first_name . ' ' . $this->last_name; |
|
| 237 | + return $this->first_name.' '.$this->last_name; |
|
| 238 | 238 | } |
| 239 | 239 | } |
@@ -480,7 +480,7 @@ |
||
| 480 | 480 | ->middleware('can:update,jobPoster'); |
| 481 | 481 | |
| 482 | 482 | |
| 483 | - Route::get('jobs/{jobPoster}/criteria', 'Api\CriteriaController@indexByJob') |
|
| 483 | + Route::get('jobs/{jobPoster}/criteria', 'Api\CriteriaController@indexByJob') |
|
| 484 | 484 | ->where('jobPoster', '[0-9]+') |
| 485 | 485 | ->middleware('can:view,jobPoster'); |
| 486 | 486 | Route::put('jobs/{jobPoster}/criteria', 'Api\CriteriaController@batchUpdate') |
@@ -13,433 +13,433 @@ discard block |
||
| 13 | 13 | | |
| 14 | 14 | */ |
| 15 | 15 | |
| 16 | -Route::group( |
|
| 16 | +Route::group ( |
|
| 17 | 17 | [ |
| 18 | - 'prefix' => LaravelLocalization::setLocale(), |
|
| 18 | + 'prefix' => LaravelLocalization::setLocale (), |
|
| 19 | 19 | 'middleware' => ['localeSessionRedirect', 'localizationRedirect', 'localeViewPath'] |
| 20 | 20 | ], |
| 21 | 21 | function () : void { |
| 22 | 22 | /** ADD ALL LOCALIZED ROUTES INSIDE THIS GROUP **/ |
| 23 | 23 | |
| 24 | - Route::group(['prefix' => 'demo'], function () : void { |
|
| 24 | + Route::group (['prefix' => 'demo'], function () : void { |
|
| 25 | 25 | |
| 26 | 26 | /* Temporary Blog Index */ |
| 27 | - Route::view('blog', 'common/blog-index')->middleware('localOnly')->name('blog'); |
|
| 27 | + Route::view ('blog', 'common/blog-index')->middleware ('localOnly')->name ('blog'); |
|
| 28 | 28 | |
| 29 | 29 | /* Temporary Blog Post */ |
| 30 | - Route::view('post', 'common/blog-post')->middleware('localOnly')->name('post'); |
|
| 30 | + Route::view ('post', 'common/blog-post')->middleware ('localOnly')->name ('post'); |
|
| 31 | 31 | |
| 32 | 32 | /* Static - Reliability Form Demo */ |
| 33 | - Route::view('reliability', 'demos/reliability/index', ['reliability' => Lang::get('common/reliability')])->name('reliability'); |
|
| 33 | + Route::view ('reliability', 'demos/reliability/index', ['reliability' => Lang::get ('common/reliability')])->name ('reliability'); |
|
| 34 | 34 | |
| 35 | 35 | // /* Temp Builder 01 (Intro) */ |
| 36 | - Route::view('builder-01', 'manager/builder-01')->middleware('localOnly')->name('jpb1'); |
|
| 36 | + Route::view ('builder-01', 'manager/builder-01')->middleware ('localOnly')->name ('jpb1'); |
|
| 37 | 37 | // /* Temp Builder 02 (Job info) */ |
| 38 | - Route::view('builder-02', 'manager/builder-02')->middleware('localOnly')->name('jpb2'); |
|
| 38 | + Route::view ('builder-02', 'manager/builder-02')->middleware ('localOnly')->name ('jpb2'); |
|
| 39 | 39 | // /* Temp Builder 03 (Work Environment) */ |
| 40 | - Route::view('builder-03', 'manager/builder-03')->middleware('localOnly')->name('jpb3'); |
|
| 40 | + Route::view ('builder-03', 'manager/builder-03')->middleware ('localOnly')->name ('jpb3'); |
|
| 41 | 41 | // /* Temp Builder 04 (Impact) */ |
| 42 | - Route::view('builder-04', 'manager/builder-04')->middleware('localOnly')->name('jpb4'); |
|
| 42 | + Route::view ('builder-04', 'manager/builder-04')->middleware ('localOnly')->name ('jpb4'); |
|
| 43 | 43 | // /* Temp Builder 05 (Tasks) */ |
| 44 | - Route::view('builder-05', 'manager/builder-05')->middleware('localOnly')->name('jpb5'); |
|
| 44 | + Route::view ('builder-05', 'manager/builder-05')->middleware ('localOnly')->name ('jpb5'); |
|
| 45 | 45 | // /* Temp Builder 06 (Skills) */ |
| 46 | - Route::view('builder-06', 'manager/builder-06')->middleware('localOnly')->name('jpb6'); |
|
| 46 | + Route::view ('builder-06', 'manager/builder-06')->middleware ('localOnly')->name ('jpb6'); |
|
| 47 | 47 | // /* Temp Builder 07 (Education) */ |
| 48 | - Route::view('builder-07', 'manager/builder-07')->middleware('localOnly')->name('jpb7'); |
|
| 48 | + Route::view ('builder-07', 'manager/builder-07')->middleware ('localOnly')->name ('jpb7'); |
|
| 49 | 49 | // /* Temp Builder 08 (Review) */ |
| 50 | - Route::view('builder-08', 'manager/builder-08')->middleware('localOnly')->name('jpb8'); |
|
| 50 | + Route::view ('builder-08', 'manager/builder-08')->middleware ('localOnly')->name ('jpb8'); |
|
| 51 | 51 | }); |
| 52 | 52 | |
| 53 | 53 | |
| 54 | - Route::group(['prefix' => config('app.applicant_prefix')], function () : void { |
|
| 54 | + Route::group (['prefix' => config ('app.applicant_prefix')], function () : void { |
|
| 55 | 55 | |
| 56 | 56 | /* Home */ |
| 57 | - Route::get('/', 'HomepageController@applicant')->name('home'); |
|
| 57 | + Route::get ('/', 'HomepageController@applicant')->name ('home'); |
|
| 58 | 58 | |
| 59 | 59 | /* Jobs */ |
| 60 | - Route::get('jobs', 'JobController@index')->name('jobs.index'); |
|
| 60 | + Route::get ('jobs', 'JobController@index')->name ('jobs.index'); |
|
| 61 | 61 | |
| 62 | - Route::get('jobs/{jobPoster}', 'JobController@show') |
|
| 63 | - ->middleware('can:view,jobPoster') |
|
| 64 | - ->name('jobs.show'); |
|
| 62 | + Route::get ('jobs/{jobPoster}', 'JobController@show') |
|
| 63 | + ->middleware ('can:view,jobPoster') |
|
| 64 | + ->name ('jobs.show'); |
|
| 65 | 65 | |
| 66 | 66 | /* Require being logged in */ |
| 67 | - Route::middleware(['auth'])->group(function () : void { |
|
| 67 | + Route::middleware (['auth'])->group (function () : void { |
|
| 68 | 68 | /* Managers */ |
| 69 | - Route::get('managers/{manager}', 'ManagerProfileController@show') |
|
| 70 | - ->middleware('can:view,manager') |
|
| 71 | - ->name('managers.show'); |
|
| 69 | + Route::get ('managers/{manager}', 'ManagerProfileController@show') |
|
| 70 | + ->middleware ('can:view,manager') |
|
| 71 | + ->name ('managers.show'); |
|
| 72 | 72 | }); |
| 73 | 73 | |
| 74 | 74 | /* Require being logged in as applicant */ |
| 75 | - Route::middleware(['auth', 'role:applicant'])->group(function () : void { |
|
| 75 | + Route::middleware (['auth', 'role:applicant'])->group (function () : void { |
|
| 76 | 76 | |
| 77 | 77 | // Application permissions are handled within the controller instead of with middleware |
| 78 | 78 | /* Applications */ |
| 79 | - Route::get('applications', 'ApplicationController@index')->name('applications.index'); |
|
| 79 | + Route::get ('applications', 'ApplicationController@index')->name ('applications.index'); |
|
| 80 | 80 | |
| 81 | 81 | /* View Application */ |
| 82 | - Route::get('applications/{application}', 'ApplicationController@show') |
|
| 83 | - ->middleware('can:view,application') |
|
| 84 | - ->name('applications.show'); |
|
| 82 | + Route::get ('applications/{application}', 'ApplicationController@show') |
|
| 83 | + ->middleware ('can:view,application') |
|
| 84 | + ->name ('applications.show'); |
|
| 85 | 85 | |
| 86 | 86 | /* Step 01 */ |
| 87 | - Route::get('jobs/{jobPoster}/application/step-01', 'ApplicationByJobController@editBasics')->name('job.application.edit.1'); |
|
| 87 | + Route::get ('jobs/{jobPoster}/application/step-01', 'ApplicationByJobController@editBasics')->name ('job.application.edit.1'); |
|
| 88 | 88 | |
| 89 | 89 | /* Step 02 */ |
| 90 | - Route::get('jobs/{jobPoster}/application/step-02', 'ApplicationByJobController@editExperience')->name('job.application.edit.2'); |
|
| 90 | + Route::get ('jobs/{jobPoster}/application/step-02', 'ApplicationByJobController@editExperience')->name ('job.application.edit.2'); |
|
| 91 | 91 | |
| 92 | 92 | /* Step 03 */ |
| 93 | - Route::get('jobs/{jobPoster}/application/step-03', 'ApplicationByJobController@editEssentialSkills')->name('job.application.edit.3'); |
|
| 93 | + Route::get ('jobs/{jobPoster}/application/step-03', 'ApplicationByJobController@editEssentialSkills')->name ('job.application.edit.3'); |
|
| 94 | 94 | |
| 95 | 95 | /* Step 04 */ |
| 96 | - Route::get('jobs/{jobPoster}/application/step-04', 'ApplicationByJobController@editAssetSkills')->name('job.application.edit.4'); |
|
| 96 | + Route::get ('jobs/{jobPoster}/application/step-04', 'ApplicationByJobController@editAssetSkills')->name ('job.application.edit.4'); |
|
| 97 | 97 | |
| 98 | 98 | /* Step 05 */ |
| 99 | - Route::get('jobs/{jobPoster}/application/step-05', 'ApplicationByJobController@preview')->name('job.application.edit.5'); |
|
| 99 | + Route::get ('jobs/{jobPoster}/application/step-05', 'ApplicationByJobController@preview')->name ('job.application.edit.5'); |
|
| 100 | 100 | |
| 101 | 101 | /* Step 06 */ |
| 102 | - Route::get('jobs/{jobPoster}/application/step-06', 'ApplicationByJobController@confirm')->name('job.application.edit.6'); |
|
| 102 | + Route::get ('jobs/{jobPoster}/application/step-06', 'ApplicationByJobController@confirm')->name ('job.application.edit.6'); |
|
| 103 | 103 | |
| 104 | 104 | /* Step 06: Complete */ |
| 105 | - Route::get('jobs/{jobPoster}/application/complete', 'ApplicationByJobController@complete')->name('job.application.complete'); |
|
| 105 | + Route::get ('jobs/{jobPoster}/application/complete', 'ApplicationByJobController@complete')->name ('job.application.complete'); |
|
| 106 | 106 | |
| 107 | 107 | /* Application Update routes */ |
| 108 | 108 | |
| 109 | 109 | /* Step 01 */ |
| 110 | - Route::post('jobs/{jobPoster}/application/step-01/update', 'ApplicationByJobController@updateBasics')->name('job.application.update.1'); |
|
| 110 | + Route::post ('jobs/{jobPoster}/application/step-01/update', 'ApplicationByJobController@updateBasics')->name ('job.application.update.1'); |
|
| 111 | 111 | |
| 112 | 112 | /* Step 02 */ |
| 113 | - Route::post('jobs/{jobPoster}/application/step-02/update', 'ApplicationByJobController@updateExperience')->name('job.application.update.2'); |
|
| 113 | + Route::post ('jobs/{jobPoster}/application/step-02/update', 'ApplicationByJobController@updateExperience')->name ('job.application.update.2'); |
|
| 114 | 114 | |
| 115 | 115 | /* Step 03 */ |
| 116 | - Route::post('jobs/{jobPoster}/application/step-03/update', 'ApplicationByJobController@updateEssentialSkills')->name('job.application.update.3'); |
|
| 116 | + Route::post ('jobs/{jobPoster}/application/step-03/update', 'ApplicationByJobController@updateEssentialSkills')->name ('job.application.update.3'); |
|
| 117 | 117 | |
| 118 | 118 | /* Step 04 */ |
| 119 | - Route::post('jobs/{jobPoster}/application/step-04/update', 'ApplicationByJobController@updateAssetSkills')->name('job.application.update.4'); |
|
| 119 | + Route::post ('jobs/{jobPoster}/application/step-04/update', 'ApplicationByJobController@updateAssetSkills')->name ('job.application.update.4'); |
|
| 120 | 120 | |
| 121 | 121 | /* Step 05 */ |
| 122 | - Route::post('jobs/{jobPoster}/application/submit', 'ApplicationByJobController@submit')->name('job.application.submit'); |
|
| 122 | + Route::post ('jobs/{jobPoster}/application/submit', 'ApplicationByJobController@submit')->name ('job.application.submit'); |
|
| 123 | 123 | |
| 124 | - Route::get('profile', 'ApplicantProfileController@editAuthenticated')->name('profile'); |
|
| 125 | - Route::get('profile/about', 'ApplicantProfileController@editAuthenticated'); |
|
| 124 | + Route::get ('profile', 'ApplicantProfileController@editAuthenticated')->name ('profile'); |
|
| 125 | + Route::get ('profile/about', 'ApplicantProfileController@editAuthenticated'); |
|
| 126 | 126 | |
| 127 | 127 | /* Profile - About Me */ |
| 128 | - Route::get('profile/{applicant}/about', 'ApplicantProfileController@edit') |
|
| 129 | - ->middleware('can:view,applicant') |
|
| 130 | - ->middleware('can:update,applicant') |
|
| 131 | - ->name('profile.about.edit'); |
|
| 128 | + Route::get ('profile/{applicant}/about', 'ApplicantProfileController@edit') |
|
| 129 | + ->middleware ('can:view,applicant') |
|
| 130 | + ->middleware ('can:update,applicant') |
|
| 131 | + ->name ('profile.about.edit'); |
|
| 132 | 132 | |
| 133 | - Route::post('profile/{applicant}/about/update', 'ApplicantProfileController@update') |
|
| 134 | - ->middleware('can:update,applicant') |
|
| 135 | - ->name('profile.about.update'); |
|
| 133 | + Route::post ('profile/{applicant}/about/update', 'ApplicantProfileController@update') |
|
| 134 | + ->middleware ('can:update,applicant') |
|
| 135 | + ->name ('profile.about.update'); |
|
| 136 | 136 | |
| 137 | 137 | /* Profile - My Experience */ |
| 138 | - Route::get('profile/experience', 'ExperienceController@editAuthenticated'); |
|
| 138 | + Route::get ('profile/experience', 'ExperienceController@editAuthenticated'); |
|
| 139 | 139 | |
| 140 | - Route::get('profile/{applicant}/experience', 'ExperienceController@edit') |
|
| 141 | - ->middleware('can:view,applicant') |
|
| 142 | - ->middleware('can:update,applicant') |
|
| 143 | - ->name('profile.experience.edit'); |
|
| 140 | + Route::get ('profile/{applicant}/experience', 'ExperienceController@edit') |
|
| 141 | + ->middleware ('can:view,applicant') |
|
| 142 | + ->middleware ('can:update,applicant') |
|
| 143 | + ->name ('profile.experience.edit'); |
|
| 144 | 144 | |
| 145 | - Route::post('profile/{applicant}/experience/update', 'ExperienceController@update') |
|
| 146 | - ->middleware('can:update,applicant') |
|
| 147 | - ->name('profile.experience.update'); |
|
| 145 | + Route::post ('profile/{applicant}/experience/update', 'ExperienceController@update') |
|
| 146 | + ->middleware ('can:update,applicant') |
|
| 147 | + ->name ('profile.experience.update'); |
|
| 148 | 148 | |
| 149 | 149 | /* Profile - My Skills */ |
| 150 | - Route::get('profile/skills', 'SkillDeclarationController@editAuthenticated'); |
|
| 150 | + Route::get ('profile/skills', 'SkillDeclarationController@editAuthenticated'); |
|
| 151 | 151 | |
| 152 | - Route::get('profile/{applicant}/skills', 'SkillDeclarationController@edit') |
|
| 153 | - ->middleware('can:view,applicant') |
|
| 154 | - ->middleware('can:update,applicant') |
|
| 155 | - ->name('profile.skills.edit'); |
|
| 152 | + Route::get ('profile/{applicant}/skills', 'SkillDeclarationController@edit') |
|
| 153 | + ->middleware ('can:view,applicant') |
|
| 154 | + ->middleware ('can:update,applicant') |
|
| 155 | + ->name ('profile.skills.edit'); |
|
| 156 | 156 | |
| 157 | 157 | /* Profile - My References */ |
| 158 | - Route::get('profile/references', 'ReferencesController@editAuthenticated'); |
|
| 158 | + Route::get ('profile/references', 'ReferencesController@editAuthenticated'); |
|
| 159 | 159 | |
| 160 | - Route::get('profile/{applicant}/references', 'ReferencesController@edit') |
|
| 161 | - ->middleware('can:view,applicant') |
|
| 162 | - ->middleware('can:update,applicant') |
|
| 163 | - ->name('profile.references.edit'); |
|
| 160 | + Route::get ('profile/{applicant}/references', 'ReferencesController@edit') |
|
| 161 | + ->middleware ('can:view,applicant') |
|
| 162 | + ->middleware ('can:update,applicant') |
|
| 163 | + ->name ('profile.references.edit'); |
|
| 164 | 164 | |
| 165 | 165 | /* Profile - My Portfolio */ |
| 166 | - Route::get('profile/portfolio', 'WorkSamplesController@editAuthenticated'); |
|
| 166 | + Route::get ('profile/portfolio', 'WorkSamplesController@editAuthenticated'); |
|
| 167 | 167 | |
| 168 | - Route::get('profile/{applicant}/portfolio', 'WorkSamplesController@edit') |
|
| 169 | - ->middleware('can:view,applicant') |
|
| 170 | - ->middleware('can:update,applicant') |
|
| 171 | - ->name('profile.work_samples.edit'); |
|
| 168 | + Route::get ('profile/{applicant}/portfolio', 'WorkSamplesController@edit') |
|
| 169 | + ->middleware ('can:view,applicant') |
|
| 170 | + ->middleware ('can:update,applicant') |
|
| 171 | + ->name ('profile.work_samples.edit'); |
|
| 172 | 172 | }); |
| 173 | 173 | |
| 174 | 174 | /* Static - FAQ */ |
| 175 | - Route::get('faq', 'FaqController')->name('faq'); |
|
| 175 | + Route::get ('faq', 'FaqController')->name ('faq'); |
|
| 176 | 176 | |
| 177 | 177 | /* Static - Privacy Policy */ |
| 178 | - Route::view('privacy', 'common/static_privacy', ['privacy' => Lang::get('common/privacy')]) |
|
| 179 | - ->name('privacy'); |
|
| 178 | + Route::view ('privacy', 'common/static_privacy', ['privacy' => Lang::get ('common/privacy')]) |
|
| 179 | + ->name ('privacy'); |
|
| 180 | 180 | |
| 181 | 181 | /* Static - Terms of Service */ |
| 182 | - Route::view('tos', 'common/static_tos', ['tos' => Lang::get('common/tos')])->name('tos'); |
|
| 182 | + Route::view ('tos', 'common/static_tos', ['tos' => Lang::get ('common/tos')])->name ('tos'); |
|
| 183 | 183 | |
| 184 | 184 | /* Static - ITP */ |
| 185 | - Route::view('indigenous', 'common/static-itp', ['itp' => Lang::get('common/itp')])->name('itp'); |
|
| 185 | + Route::view ('indigenous', 'common/static-itp', ['itp' => Lang::get ('common/itp')])->name ('itp'); |
|
| 186 | 186 | |
| 187 | 187 | /* Authentication =========================================================== */ |
| 188 | 188 | |
| 189 | 189 | // Laravel default login, logout, register, and reset routes |
| 190 | - Route::get('login', 'Auth\LoginController@showLoginForm')->name('login'); |
|
| 191 | - Route::post('login', 'Auth\LoginController@login')->name('login.post'); |
|
| 192 | - Route::post('logout', 'Auth\LoginController@logout')->name('logout'); |
|
| 190 | + Route::get ('login', 'Auth\LoginController@showLoginForm')->name ('login'); |
|
| 191 | + Route::post ('login', 'Auth\LoginController@login')->name ('login.post'); |
|
| 192 | + Route::post ('logout', 'Auth\LoginController@logout')->name ('logout'); |
|
| 193 | 193 | |
| 194 | 194 | // Registration Routes... |
| 195 | - Route::get('register', 'Auth\RegisterController@showRegistrationForm')->name('register'); |
|
| 196 | - Route::post('register', 'Auth\RegisterController@register')->name('register.post'); |
|
| 195 | + Route::get ('register', 'Auth\RegisterController@showRegistrationForm')->name ('register'); |
|
| 196 | + Route::post ('register', 'Auth\RegisterController@register')->name ('register.post'); |
|
| 197 | 197 | |
| 198 | 198 | // Password Reset Routes... |
| 199 | - Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('password.request'); |
|
| 200 | - Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('password.email'); |
|
| 201 | - Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('password.reset'); |
|
| 202 | - Route::post('password/reset', 'Auth\ResetPasswordController@reset')->name('password.reset.post'); |
|
| 199 | + Route::get ('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name ('password.request'); |
|
| 200 | + Route::post ('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name ('password.email'); |
|
| 201 | + Route::get ('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name ('password.reset'); |
|
| 202 | + Route::post ('password/reset', 'Auth\ResetPasswordController@reset')->name ('password.reset.post'); |
|
| 203 | 203 | }); |
| 204 | 204 | |
| 205 | 205 | |
| 206 | 206 | /* Manager Portal =========================================================== */ |
| 207 | 207 | |
| 208 | - Route::group([ |
|
| 209 | - 'prefix' => config('app.manager_prefix'), |
|
| 208 | + Route::group ([ |
|
| 209 | + 'prefix' => config ('app.manager_prefix'), |
|
| 210 | 210 | ], function (): void { |
| 211 | 211 | |
| 212 | - Route::middleware(['finishManagerRegistration'])->group(function (): void { |
|
| 212 | + Route::middleware (['finishManagerRegistration'])->group (function (): void { |
|
| 213 | 213 | |
| 214 | 214 | /* Home */ |
| 215 | - Route::get('/', 'HomepageController@manager')->name('manager.home'); |
|
| 215 | + Route::get ('/', 'HomepageController@manager')->name ('manager.home'); |
|
| 216 | 216 | |
| 217 | 217 | /* Static - FAQ */ |
| 218 | - Route::get( |
|
| 218 | + Route::get ( |
|
| 219 | 219 | 'faq', |
| 220 | 220 | 'ManagerProfileController@faq' |
| 221 | - )->name('manager.faq'); |
|
| 221 | + )->name ('manager.faq'); |
|
| 222 | 222 | |
| 223 | - Route::get( |
|
| 223 | + Route::get ( |
|
| 224 | 224 | 'faq#manager-who', |
| 225 | 225 | 'ManagerProfileController@faq' |
| 226 | - )->name('manager.faq.section'); |
|
| 226 | + )->name ('manager.faq.section'); |
|
| 227 | 227 | |
| 228 | - Route::middleware(['auth', 'role:manager'])->group(function (): void { |
|
| 228 | + Route::middleware (['auth', 'role:manager'])->group (function (): void { |
|
| 229 | 229 | |
| 230 | - Route::get('profile', 'ManagerProfileController@editAuthenticated')->name('manager.profile'); |
|
| 230 | + Route::get ('profile', 'ManagerProfileController@editAuthenticated')->name ('manager.profile'); |
|
| 231 | 231 | |
| 232 | 232 | /* Profile */ |
| 233 | - Route::get('profile/{manager}/edit', 'ManagerProfileController@edit') |
|
| 234 | - ->middleware('can:view,manager') |
|
| 235 | - ->middleware('can:update,manager') |
|
| 236 | - ->name('manager.profile.edit'); |
|
| 233 | + Route::get ('profile/{manager}/edit', 'ManagerProfileController@edit') |
|
| 234 | + ->middleware ('can:view,manager') |
|
| 235 | + ->middleware ('can:update,manager') |
|
| 236 | + ->name ('manager.profile.edit'); |
|
| 237 | 237 | |
| 238 | - Route::post('profile/{manager}/update', 'ManagerProfileController@update') |
|
| 239 | - ->middleware('can:update,manager') |
|
| 240 | - ->name('manager.profile.update'); |
|
| 238 | + Route::post ('profile/{manager}/update', 'ManagerProfileController@update') |
|
| 239 | + ->middleware ('can:update,manager') |
|
| 240 | + ->name ('manager.profile.update'); |
|
| 241 | 241 | |
| 242 | 242 | /* View Application */ |
| 243 | - Route::get('applications/{application}', 'ApplicationController@show') |
|
| 244 | - ->middleware('can:view,application') |
|
| 245 | - ->name('manager.applications.show'); |
|
| 243 | + Route::get ('applications/{application}', 'ApplicationController@show') |
|
| 244 | + ->middleware ('can:view,application') |
|
| 245 | + ->name ('manager.applications.show'); |
|
| 246 | 246 | |
| 247 | 247 | /* View Applicant Profile */ |
| 248 | - Route::get('applicants/{applicant}', 'ApplicantProfileController@show') |
|
| 249 | - ->middleware('can:view,applicant') |
|
| 250 | - ->name('manager.applicants.show'); |
|
| 248 | + Route::get ('applicants/{applicant}', 'ApplicantProfileController@show') |
|
| 249 | + ->middleware ('can:view,applicant') |
|
| 250 | + ->name ('manager.applicants.show'); |
|
| 251 | 251 | |
| 252 | 252 | /* Job Index */ |
| 253 | - Route::get('jobs', 'JobController@managerIndex')->name('manager.jobs.index'); |
|
| 253 | + Route::get ('jobs', 'JobController@managerIndex')->name ('manager.jobs.index'); |
|
| 254 | 254 | |
| 255 | 255 | /* View Job Poster */ |
| 256 | - Route::get('jobs/{jobPoster}', 'JobController@show') |
|
| 257 | - ->where('jobPoster', '[0-9]+') |
|
| 258 | - ->middleware('can:view,jobPoster') |
|
| 259 | - ->name('manager.jobs.show'); |
|
| 256 | + Route::get ('jobs/{jobPoster}', 'JobController@show') |
|
| 257 | + ->where ('jobPoster', '[0-9]+') |
|
| 258 | + ->middleware ('can:view,jobPoster') |
|
| 259 | + ->name ('manager.jobs.show'); |
|
| 260 | 260 | |
| 261 | - Route::get('jobs/{jobPoster}/applications', 'ApplicationByJobController@index') |
|
| 262 | - ->where('jobPoster', '[0-9]+') |
|
| 263 | - ->middleware('can:reviewApplicationsFor,jobPoster') |
|
| 264 | - ->name('manager.jobs.applications'); |
|
| 261 | + Route::get ('jobs/{jobPoster}/applications', 'ApplicationByJobController@index') |
|
| 262 | + ->where ('jobPoster', '[0-9]+') |
|
| 263 | + ->middleware ('can:reviewApplicationsFor,jobPoster') |
|
| 264 | + ->name ('manager.jobs.applications'); |
|
| 265 | 265 | |
| 266 | 266 | /* Job Builder */ |
| 267 | - Route::get( |
|
| 267 | + Route::get ( |
|
| 268 | 268 | 'jobs/builder', |
| 269 | 269 | 'JobBuilderController@show' |
| 270 | - )->name('manager.jobs.create'); |
|
| 270 | + )->name ('manager.jobs.create'); |
|
| 271 | 271 | |
| 272 | - Route::get( |
|
| 272 | + Route::get ( |
|
| 273 | 273 | 'jobs/{jobId}/builder', |
| 274 | 274 | 'JobBuilderController@show' |
| 275 | 275 | ) |
| 276 | - ->where('jobPoster', '[0-9]+') |
|
| 277 | - ->name('manager.jobs.edit'); |
|
| 278 | - Route::get( |
|
| 276 | + ->where ('jobPoster', '[0-9]+') |
|
| 277 | + ->name ('manager.jobs.edit'); |
|
| 278 | + Route::get ( |
|
| 279 | 279 | 'jobs/{jobId}/builder/intro', |
| 280 | 280 | 'JobBuilderController@show' |
| 281 | - )->where('jobPoster', '[0-9]+'); |
|
| 282 | - Route::get( |
|
| 281 | + )->where ('jobPoster', '[0-9]+'); |
|
| 282 | + Route::get ( |
|
| 283 | 283 | 'jobs/{jobId}/builder/details', |
| 284 | 284 | 'JobBuilderController@show' |
| 285 | - )->where('jobPoster', '[0-9]+'); |
|
| 286 | - Route::get( |
|
| 285 | + )->where ('jobPoster', '[0-9]+'); |
|
| 286 | + Route::get ( |
|
| 287 | 287 | 'jobs/{jobId}/builder/environment', |
| 288 | 288 | 'JobBuilderController@show' |
| 289 | - )->where('jobPoster', '[0-9]+'); |
|
| 290 | - Route::get( |
|
| 289 | + )->where ('jobPoster', '[0-9]+'); |
|
| 290 | + Route::get ( |
|
| 291 | 291 | 'jobs/{jobId}/builder/impact', |
| 292 | 292 | 'JobBuilderController@show' |
| 293 | - )->where('jobPoster', '[0-9]+'); |
|
| 294 | - Route::get( |
|
| 293 | + )->where ('jobPoster', '[0-9]+'); |
|
| 294 | + Route::get ( |
|
| 295 | 295 | 'jobs/{jobId}/builder/tasks', |
| 296 | 296 | 'JobBuilderController@show' |
| 297 | - )->where('jobPoster', '[0-9]+'); |
|
| 298 | - Route::get( |
|
| 297 | + )->where ('jobPoster', '[0-9]+'); |
|
| 298 | + Route::get ( |
|
| 299 | 299 | 'jobs/{jobId}/builder/skills', |
| 300 | 300 | 'JobBuilderController@show' |
| 301 | - )->where('jobPoster', '[0-9]+'); |
|
| 302 | - Route::get( |
|
| 301 | + )->where ('jobPoster', '[0-9]+'); |
|
| 302 | + Route::get ( |
|
| 303 | 303 | 'jobs/{jobId}/builder/review', |
| 304 | 304 | 'JobBuilderController@show' |
| 305 | 305 | ) |
| 306 | - ->where('jobPoster', '[0-9]+') |
|
| 307 | - ->name('manager.jobs.review'); |
|
| 306 | + ->where ('jobPoster', '[0-9]+') |
|
| 307 | + ->name ('manager.jobs.review'); |
|
| 308 | 308 | |
| 309 | 309 | /* Delete Job */ |
| 310 | - Route::delete('jobs/{jobPoster}', 'JobController@destroy') |
|
| 311 | - ->where('jobPoster', '[0-9]+') |
|
| 312 | - ->middleware('can:delete,jobPoster') |
|
| 313 | - ->name('manager.jobs.destroy'); |
|
| 310 | + Route::delete ('jobs/{jobPoster}', 'JobController@destroy') |
|
| 311 | + ->where ('jobPoster', '[0-9]+') |
|
| 312 | + ->middleware ('can:delete,jobPoster') |
|
| 313 | + ->name ('manager.jobs.destroy'); |
|
| 314 | 314 | |
| 315 | - Route::view( |
|
| 315 | + Route::view ( |
|
| 316 | 316 | 'jobs/{jobPoster}/assessment-plan', |
| 317 | 317 | 'manager/assessment_plan' |
| 318 | 318 | ) |
| 319 | - ->where('jobPoster', '[0-9]+') |
|
| 320 | - ->name('manager.jobs.screening_plan'); |
|
| 319 | + ->where ('jobPoster', '[0-9]+') |
|
| 320 | + ->name ('manager.jobs.screening_plan'); |
|
| 321 | 321 | }); |
| 322 | 322 | }); |
| 323 | 323 | |
| 324 | 324 | // These routes must be excluded from the finishManagerRegistration middleware to avoid an infinite loop of redirects |
| 325 | - Route::middleware(['auth', 'role:manager'])->group(function (): void { |
|
| 326 | - Route::get('first-visit', 'Auth\FirstVisitController@showFirstVisitManagerForm') |
|
| 327 | - ->name('manager.first_visit'); |
|
| 328 | - Route::post('finish_registration', 'Auth\FirstVisitController@finishManagerRegistration') |
|
| 329 | - ->name('manager.finish_registration'); |
|
| 325 | + Route::middleware (['auth', 'role:manager'])->group (function (): void { |
|
| 326 | + Route::get ('first-visit', 'Auth\FirstVisitController@showFirstVisitManagerForm') |
|
| 327 | + ->name ('manager.first_visit'); |
|
| 328 | + Route::post ('finish_registration', 'Auth\FirstVisitController@finishManagerRegistration') |
|
| 329 | + ->name ('manager.finish_registration'); |
|
| 330 | 330 | }); |
| 331 | 331 | |
| 332 | 332 | // Laravel default login, logout, register, and reset routes |
| 333 | - Route::get('login', 'Auth\LoginController@showLoginForm')->name('manager.login'); |
|
| 334 | - Route::post('login', 'Auth\LoginController@login')->name('manager.login.post'); |
|
| 335 | - Route::post('logout', 'Auth\LoginController@logout')->name('manager.logout'); |
|
| 333 | + Route::get ('login', 'Auth\LoginController@showLoginForm')->name ('manager.login'); |
|
| 334 | + Route::post ('login', 'Auth\LoginController@login')->name ('manager.login.post'); |
|
| 335 | + Route::post ('logout', 'Auth\LoginController@logout')->name ('manager.logout'); |
|
| 336 | 336 | |
| 337 | 337 | // Registration Routes... |
| 338 | - Route::get('register', 'Auth\RegisterController@showManagerRegistrationForm')->name('manager.register'); |
|
| 339 | - Route::post('register', 'Auth\RegisterController@registerManager')->name('manager.register.post'); |
|
| 338 | + Route::get ('register', 'Auth\RegisterController@showManagerRegistrationForm')->name ('manager.register'); |
|
| 339 | + Route::post ('register', 'Auth\RegisterController@registerManager')->name ('manager.register.post'); |
|
| 340 | 340 | |
| 341 | 341 | // Password Reset Routes... |
| 342 | - Route::get('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name('manager.password.request'); |
|
| 343 | - Route::post('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name('manager.password.email'); |
|
| 344 | - Route::get('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name('manager.password.reset'); |
|
| 345 | - Route::post('password/reset', 'Auth\ResetPasswordController@reset')->name('manager.password.reset.post'); |
|
| 342 | + Route::get ('password/reset', 'Auth\ForgotPasswordController@showLinkRequestForm')->name ('manager.password.request'); |
|
| 343 | + Route::post ('password/email', 'Auth\ForgotPasswordController@sendResetLinkEmail')->name ('manager.password.email'); |
|
| 344 | + Route::get ('password/reset/{token}', 'Auth\ResetPasswordController@showResetForm')->name ('manager.password.reset'); |
|
| 345 | + Route::post ('password/reset', 'Auth\ResetPasswordController@reset')->name ('manager.password.reset.post'); |
|
| 346 | 346 | }); |
| 347 | 347 | |
| 348 | 348 | /* AJAX calls =============================================================== */ |
| 349 | 349 | |
| 350 | 350 | /* Require being logged in */ |
| 351 | - Route::middleware(['auth'])->group(function () : void { |
|
| 351 | + Route::middleware (['auth'])->group (function () : void { |
|
| 352 | 352 | |
| 353 | - Route::delete('courses/{course}', 'CourseController@destroy') |
|
| 354 | - ->middleware('can:delete,course') |
|
| 355 | - ->name('courses.destroy'); |
|
| 353 | + Route::delete ('courses/{course}', 'CourseController@destroy') |
|
| 354 | + ->middleware ('can:delete,course') |
|
| 355 | + ->name ('courses.destroy'); |
|
| 356 | 356 | |
| 357 | - Route::delete('degrees/{degree}', 'DegreeController@destroy') |
|
| 358 | - ->middleware('can:delete,degree') |
|
| 359 | - ->name('degrees.destroy'); |
|
| 357 | + Route::delete ('degrees/{degree}', 'DegreeController@destroy') |
|
| 358 | + ->middleware ('can:delete,degree') |
|
| 359 | + ->name ('degrees.destroy'); |
|
| 360 | 360 | |
| 361 | - Route::delete('work-experiences/{workExperience}', 'WorkExperienceController@destroy') |
|
| 362 | - ->middleware('can:delete,workExperience') |
|
| 363 | - ->name('work_experiences.destroy'); |
|
| 361 | + Route::delete ('work-experiences/{workExperience}', 'WorkExperienceController@destroy') |
|
| 362 | + ->middleware ('can:delete,workExperience') |
|
| 363 | + ->name ('work_experiences.destroy'); |
|
| 364 | 364 | |
| 365 | - Route::post('skill-declarations', 'SkillDeclarationController@create') |
|
| 366 | - ->middleware('can:create,App\Models\SkillDeclaration') |
|
| 367 | - ->name('skill_declarations.create'); |
|
| 365 | + Route::post ('skill-declarations', 'SkillDeclarationController@create') |
|
| 366 | + ->middleware ('can:create,App\Models\SkillDeclaration') |
|
| 367 | + ->name ('skill_declarations.create'); |
|
| 368 | 368 | |
| 369 | - Route::put('skill-declarations/{skillDeclaration}', 'SkillDeclarationController@update') |
|
| 370 | - ->middleware('can:update,skillDeclaration') |
|
| 371 | - ->name('skill_declarations.update'); |
|
| 369 | + Route::put ('skill-declarations/{skillDeclaration}', 'SkillDeclarationController@update') |
|
| 370 | + ->middleware ('can:update,skillDeclaration') |
|
| 371 | + ->name ('skill_declarations.update'); |
|
| 372 | 372 | |
| 373 | - Route::delete('skill-declarations/{skillDeclaration}', 'SkillDeclarationController@destroy') |
|
| 374 | - ->middleware('can:delete,skillDeclaration') |
|
| 375 | - ->name('skill_declarations.destroy'); |
|
| 373 | + Route::delete ('skill-declarations/{skillDeclaration}', 'SkillDeclarationController@destroy') |
|
| 374 | + ->middleware ('can:delete,skillDeclaration') |
|
| 375 | + ->name ('skill_declarations.destroy'); |
|
| 376 | 376 | |
| 377 | - Route::post('references', 'ReferencesController@update') |
|
| 378 | - ->middleware('can:create,App\Models\Reference') |
|
| 379 | - ->name('references.create'); |
|
| 377 | + Route::post ('references', 'ReferencesController@update') |
|
| 378 | + ->middleware ('can:create,App\Models\Reference') |
|
| 379 | + ->name ('references.create'); |
|
| 380 | 380 | |
| 381 | - Route::put('references/{reference}', 'ReferencesController@update') |
|
| 382 | - ->middleware('can:update,reference') |
|
| 383 | - ->name('references.update'); |
|
| 381 | + Route::put ('references/{reference}', 'ReferencesController@update') |
|
| 382 | + ->middleware ('can:update,reference') |
|
| 383 | + ->name ('references.update'); |
|
| 384 | 384 | |
| 385 | - Route::delete('references/{reference}', 'ReferencesController@destroy') |
|
| 386 | - ->middleware('can:delete,reference') |
|
| 387 | - ->name('references.destroy'); |
|
| 385 | + Route::delete ('references/{reference}', 'ReferencesController@destroy') |
|
| 386 | + ->middleware ('can:delete,reference') |
|
| 387 | + ->name ('references.destroy'); |
|
| 388 | 388 | |
| 389 | - Route::post('work-samples', 'WorkSamplesController@update') |
|
| 390 | - ->middleware('can:create,App\Models\WorkSample') |
|
| 391 | - ->name('work_samples.create'); |
|
| 389 | + Route::post ('work-samples', 'WorkSamplesController@update') |
|
| 390 | + ->middleware ('can:create,App\Models\WorkSample') |
|
| 391 | + ->name ('work_samples.create'); |
|
| 392 | 392 | |
| 393 | - Route::put('work-samples/{workSample}', 'WorkSamplesController@update') |
|
| 394 | - ->middleware('can:update,workSample') |
|
| 395 | - ->name('work_samples.update'); |
|
| 393 | + Route::put ('work-samples/{workSample}', 'WorkSamplesController@update') |
|
| 394 | + ->middleware ('can:update,workSample') |
|
| 395 | + ->name ('work_samples.update'); |
|
| 396 | 396 | |
| 397 | - Route::delete('work-samples/{workSample}', 'WorkSamplesController@destroy') |
|
| 398 | - ->middleware('can:delete,workSample') |
|
| 399 | - ->name('work_samples.destroy'); |
|
| 397 | + Route::delete ('work-samples/{workSample}', 'WorkSamplesController@destroy') |
|
| 398 | + ->middleware ('can:delete,workSample') |
|
| 399 | + ->name ('work_samples.destroy'); |
|
| 400 | 400 | |
| 401 | - Route::delete('applications/{application}', 'ApplicationController@destroy') |
|
| 402 | - ->middleware('can:delete,application') |
|
| 403 | - ->name('applications.destroy'); |
|
| 401 | + Route::delete ('applications/{application}', 'ApplicationController@destroy') |
|
| 402 | + ->middleware ('can:delete,application') |
|
| 403 | + ->name ('applications.destroy'); |
|
| 404 | 404 | |
| 405 | - Route::put('applications/{application}/review', 'ApplicationReviewController@updateForApplication') |
|
| 406 | - ->middleware('can:review,application') |
|
| 407 | - ->name('application_reviews.update'); |
|
| 405 | + Route::put ('applications/{application}/review', 'ApplicationReviewController@updateForApplication') |
|
| 406 | + ->middleware ('can:review,application') |
|
| 407 | + ->name ('application_reviews.update'); |
|
| 408 | 408 | }); |
| 409 | 409 | |
| 410 | 410 | |
| 411 | 411 | /* Non-Backpack Admin Portal (localized pages) =========================================================== */ |
| 412 | - Route::group( |
|
| 412 | + Route::group ( |
|
| 413 | 413 | [ |
| 414 | 414 | 'prefix' => 'admin', |
| 415 | 415 | 'middleware' => ['auth', 'role:admin'] |
| 416 | 416 | ], |
| 417 | 417 | function (): void { |
| 418 | 418 | /* Edit Job */ |
| 419 | - Route::get('jobs/{jobPoster}/edit', 'JobController@edit') |
|
| 420 | - ->where('jobPoster', '[0-9]+') |
|
| 421 | - ->middleware('can:update,jobPoster') |
|
| 422 | - ->name('admin.jobs.edit'); |
|
| 423 | - Route::post('jobs/{jobPoster}', 'JobController@store') |
|
| 424 | - ->where('jobPoster', '[0-9]+') |
|
| 425 | - ->middleware('can:update,jobPoster') |
|
| 426 | - ->name('admin.jobs.update'); |
|
| 419 | + Route::get ('jobs/{jobPoster}/edit', 'JobController@edit') |
|
| 420 | + ->where ('jobPoster', '[0-9]+') |
|
| 421 | + ->middleware ('can:update,jobPoster') |
|
| 422 | + ->name ('admin.jobs.edit'); |
|
| 423 | + Route::post ('jobs/{jobPoster}', 'JobController@store') |
|
| 424 | + ->where ('jobPoster', '[0-9]+') |
|
| 425 | + ->middleware ('can:update,jobPoster') |
|
| 426 | + ->name ('admin.jobs.update'); |
|
| 427 | 427 | } |
| 428 | 428 | ); |
| 429 | 429 | } |
| 430 | 430 | ); |
| 431 | 431 | |
| 432 | 432 | /* Non-Backpack Admin Portal (non-localized pages) =========================================================== */ |
| 433 | -Route::group( |
|
| 433 | +Route::group ( |
|
| 434 | 434 | [ |
| 435 | 435 | 'prefix' => 'admin', |
| 436 | 436 | 'middleware' => ['auth', 'role:admin'] |
| 437 | 437 | ], |
| 438 | 438 | function (): void { |
| 439 | 439 | // This page is non-localized, because the middleware that redirects to localized pages changes POSTs to GETs and messes up the request. |
| 440 | - Route::post('jobs/create/as-manager/{manager}', 'JobController@createAsManager') |
|
| 441 | - ->middleware('can:create,App\Models\JobPoster') |
|
| 442 | - ->name('admin.jobs.create_as_manager'); |
|
| 440 | + Route::post ('jobs/create/as-manager/{manager}', 'JobController@createAsManager') |
|
| 441 | + ->middleware ('can:create,App\Models\JobPoster') |
|
| 442 | + ->name ('admin.jobs.create_as_manager'); |
|
| 443 | 443 | } |
| 444 | 444 | ); |
| 445 | 445 | |
@@ -449,65 +449,65 @@ discard block |
||
| 449 | 449 | |
| 450 | 450 | |
| 451 | 451 | /** API routes - currently using same default http auth, but not localized */ |
| 452 | -Route::group(['prefix' => 'api'], function (): void { |
|
| 452 | +Route::group (['prefix' => 'api'], function (): void { |
|
| 453 | 453 | // Protected by a gate in the controller, instead of policy middleware |
| 454 | - Route::get('jobs/{jobPoster}/assessment-plan', 'AssessmentPlanController@getForJob'); |
|
| 454 | + Route::get ('jobs/{jobPoster}/assessment-plan', 'AssessmentPlanController@getForJob'); |
|
| 455 | 455 | // Public, not protected by policy or gate |
| 456 | - Route::get('skills', 'Api\SkillController@index'); |
|
| 457 | - Route::get('departments', 'Api\DepartmentController@index'); |
|
| 456 | + Route::get ('skills', 'Api\SkillController@index'); |
|
| 457 | + Route::get ('departments', 'Api\DepartmentController@index'); |
|
| 458 | 458 | |
| 459 | 459 | // Resource Routes are protected by policies in controllers instead of middleware. |
| 460 | - Route::resource('assessments', 'AssessmentController')->except([ |
|
| 460 | + Route::resource ('assessments', 'AssessmentController')->except ([ |
|
| 461 | 461 | 'create', 'edit', 'index' |
| 462 | 462 | ]); |
| 463 | - Route::apiResource('rating-guide-answers', 'RatingGuideAnswerController')->except([ |
|
| 463 | + Route::apiResource ('rating-guide-answers', 'RatingGuideAnswerController')->except ([ |
|
| 464 | 464 | 'index' |
| 465 | - ])->parameters([ |
|
| 465 | + ])->parameters ([ |
|
| 466 | 466 | 'rating-guide-answers' => 'ratingGuideAnswer' |
| 467 | 467 | ]); |
| 468 | - Route::resource('rating-guide-questions', 'RatingGuideQuestionController')->except([ |
|
| 468 | + Route::resource ('rating-guide-questions', 'RatingGuideQuestionController')->except ([ |
|
| 469 | 469 | 'create', 'edit', 'index' |
| 470 | 470 | ]); |
| 471 | - Route::resource('assessment-plan-notifications', 'AssessmentPlanNotificationController')->except([ |
|
| 471 | + Route::resource ('assessment-plan-notifications', 'AssessmentPlanNotificationController')->except ([ |
|
| 472 | 472 | 'store', 'create', 'edit' |
| 473 | 473 | ]); |
| 474 | 474 | // TODO: add policy middleware |
| 475 | - Route::get('jobs/{jobPoster}/tasks', 'Api\JobTaskController@indexByJob') |
|
| 476 | - ->where('jobPoster', '[0-9]+') |
|
| 477 | - ->middleware('can:view,jobPoster'); |
|
| 478 | - Route::put('jobs/{jobPoster}/tasks', 'Api\JobTaskController@batchUpdate') |
|
| 479 | - ->where('jobPoster', '[0-9]+') |
|
| 480 | - ->middleware('can:update,jobPoster'); |
|
| 481 | - |
|
| 482 | - |
|
| 483 | - Route::get('jobs/{jobPoster}/criteria', 'Api\CriteriaController@indexByJob') |
|
| 484 | - ->where('jobPoster', '[0-9]+') |
|
| 485 | - ->middleware('can:view,jobPoster'); |
|
| 486 | - Route::put('jobs/{jobPoster}/criteria', 'Api\CriteriaController@batchUpdate') |
|
| 487 | - ->where('jobPoster', '[0-9]+') |
|
| 488 | - ->middleware('can:update,jobPoster'); |
|
| 489 | - |
|
| 490 | - |
|
| 491 | - Route::post('jobs/{job}/submit', 'Api\JobApiController@submitForReview') |
|
| 492 | - ->where('job', '[0-9]+') |
|
| 493 | - ->middleware('can:submitForReview,job') |
|
| 494 | - ->name('api.jobs.submit'); |
|
| 495 | - Route::resource('jobs', 'Api\JobApiController')->only([ |
|
| 475 | + Route::get ('jobs/{jobPoster}/tasks', 'Api\JobTaskController@indexByJob') |
|
| 476 | + ->where ('jobPoster', '[0-9]+') |
|
| 477 | + ->middleware ('can:view,jobPoster'); |
|
| 478 | + Route::put ('jobs/{jobPoster}/tasks', 'Api\JobTaskController@batchUpdate') |
|
| 479 | + ->where ('jobPoster', '[0-9]+') |
|
| 480 | + ->middleware ('can:update,jobPoster'); |
|
| 481 | + |
|
| 482 | + |
|
| 483 | + Route::get ('jobs/{jobPoster}/criteria', 'Api\CriteriaController@indexByJob') |
|
| 484 | + ->where ('jobPoster', '[0-9]+') |
|
| 485 | + ->middleware ('can:view,jobPoster'); |
|
| 486 | + Route::put ('jobs/{jobPoster}/criteria', 'Api\CriteriaController@batchUpdate') |
|
| 487 | + ->where ('jobPoster', '[0-9]+') |
|
| 488 | + ->middleware ('can:update,jobPoster'); |
|
| 489 | + |
|
| 490 | + |
|
| 491 | + Route::post ('jobs/{job}/submit', 'Api\JobApiController@submitForReview') |
|
| 492 | + ->where ('job', '[0-9]+') |
|
| 493 | + ->middleware ('can:submitForReview,job') |
|
| 494 | + ->name ('api.jobs.submit'); |
|
| 495 | + Route::resource ('jobs', 'Api\JobApiController')->only ([ |
|
| 496 | 496 | 'show', 'store', 'update' |
| 497 | - ])->names([ // Specify custom names because default names collied with existing routes. |
|
| 497 | + ])->names ([// Specify custom names because default names collied with existing routes. |
|
| 498 | 498 | 'show' => 'api.jobs.show', |
| 499 | 499 | 'store' => 'api.jobs.store', |
| 500 | 500 | 'update' => 'api.jobs.update' |
| 501 | 501 | ]); |
| 502 | 502 | |
| 503 | - Route::resource('managers', 'Api\ManagerApiController')->only([ |
|
| 503 | + Route::resource ('managers', 'Api\ManagerApiController')->only ([ |
|
| 504 | 504 | 'show', 'update' |
| 505 | - ])->names([ // Specify custom names because default names collied with existing routes |
|
| 505 | + ])->names ([// Specify custom names because default names collied with existing routes |
|
| 506 | 506 | 'show' => 'api.managers.show', |
| 507 | 507 | 'update' => 'api.managers.update' |
| 508 | 508 | ]); |
| 509 | 509 | |
| 510 | 510 | // User must be logged in to user currentuser routes |
| 511 | - Route::get('currentuser/manager', 'Api\ManagerApiController@showAuthenticated') |
|
| 512 | - ->middleware('auth'); |
|
| 511 | + Route::get ('currentuser/manager', 'Api\ManagerApiController@showAuthenticated') |
|
| 512 | + ->middleware ('auth'); |
|
| 513 | 513 | }); |