@@ -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 |
@@ -16,89 +16,89 @@ discard block |
||
16 | 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 | ); |
@@ -111,10 +111,10 @@ discard block |
||
111 | 111 | */ |
112 | 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 | } |
@@ -55,8 +55,8 @@ discard block |
||
55 | 55 | protected function mapWebRoutes() |
56 | 56 | { |
57 | 57 | Route::middleware('web') |
58 | - ->namespace($this->namespace) |
|
59 | - ->group(base_path('routes/web.php')); |
|
58 | + ->namespace($this->namespace) |
|
59 | + ->group(base_path('routes/web.php')); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -69,8 +69,8 @@ discard block |
||
69 | 69 | protected function mapApiRoutes() |
70 | 70 | { |
71 | 71 | Route::prefix('api') |
72 | - ->middleware('api') |
|
73 | - ->namespace($this->namespace) |
|
74 | - ->group(base_path('routes/api.php')); |
|
72 | + ->middleware('api') |
|
73 | + ->namespace($this->namespace) |
|
74 | + ->group(base_path('routes/api.php')); |
|
75 | 75 | } |
76 | 76 | } |
@@ -28,7 +28,7 @@ discard block |
||
28 | 28 | { |
29 | 29 | // |
30 | 30 | |
31 | - parent::boot(); |
|
31 | + parent::boot (); |
|
32 | 32 | } |
33 | 33 | |
34 | 34 | /** |
@@ -38,9 +38,9 @@ discard block |
||
38 | 38 | */ |
39 | 39 | public function map() |
40 | 40 | { |
41 | - $this->mapApiRoutes(); |
|
41 | + $this->mapApiRoutes (); |
|
42 | 42 | |
43 | - $this->mapWebRoutes(); |
|
43 | + $this->mapWebRoutes (); |
|
44 | 44 | |
45 | 45 | // |
46 | 46 | } |
@@ -54,9 +54,9 @@ discard block |
||
54 | 54 | */ |
55 | 55 | protected function mapWebRoutes() |
56 | 56 | { |
57 | - Route::middleware('web') |
|
58 | - ->namespace($this->namespace) |
|
59 | - ->group(base_path('routes/web.php')); |
|
57 | + Route::middleware ('web') |
|
58 | + ->namespace ($this->namespace) |
|
59 | + ->group (base_path ('routes/web.php')); |
|
60 | 60 | } |
61 | 61 | |
62 | 62 | /** |
@@ -68,9 +68,9 @@ discard block |
||
68 | 68 | */ |
69 | 69 | protected function mapApiRoutes() |
70 | 70 | { |
71 | - Route::prefix('api') |
|
72 | - ->middleware('api') |
|
73 | - ->namespace($this->namespace) |
|
74 | - ->group(base_path('routes/api.php')); |
|
71 | + Route::prefix ('api') |
|
72 | + ->middleware ('api') |
|
73 | + ->namespace ($this->namespace) |
|
74 | + ->group (base_path ('routes/api.php')); |
|
75 | 75 | } |
76 | 76 | } |
@@ -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'), |
@@ -18,11 +18,11 @@ discard block |
||
18 | 18 | */ |
19 | 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 | } |
@@ -6,11 +6,11 @@ |
||
6 | 6 | class Authenticate extends Middleware |
7 | 7 | { |
8 | 8 | /** |
9 | - * Get the path the user should be redirected to when they are not authenticated. |
|
10 | - * |
|
11 | - * @param \Illuminate\Http\Request $request |
|
12 | - * @return string |
|
13 | - */ |
|
9 | + * Get the path the user should be redirected to when they are not authenticated. |
|
10 | + * |
|
11 | + * @param \Illuminate\Http\Request $request |
|
12 | + * @return string |
|
13 | + */ |
|
14 | 14 | protected function redirectTo($request) |
15 | 15 | { |
16 | 16 | if (WhichPortal::isManagerPortal()) { |
@@ -13,10 +13,10 @@ |
||
13 | 13 | */ |
14 | 14 | protected function redirectTo($request) |
15 | 15 | { |
16 | - if (WhichPortal::isManagerPortal()) { |
|
17 | - return route('manager.login'); |
|
16 | + if (WhichPortal::isManagerPortal ()) { |
|
17 | + return route ('manager.login'); |
|
18 | 18 | } else { |
19 | - return route('login'); |
|
19 | + return route ('login'); |
|
20 | 20 | } |
21 | 21 | } |
22 | 22 | } |
@@ -50,6 +50,6 @@ |
||
50 | 50 | ) |
51 | 51 | ); |
52 | 52 | } |
53 | - return $response; |
|
53 | + return $response; |
|
54 | 54 | } |
55 | 55 | } |
@@ -35,12 +35,12 @@ |
||
35 | 35 | protected function addCookieToResponse($request, $response) |
36 | 36 | { |
37 | 37 | if ($this->addHttpCookie) { |
38 | - $config = config('session'); |
|
39 | - $response->headers->setCookie( |
|
40 | - new Cookie( |
|
38 | + $config = config ('session'); |
|
39 | + $response->headers->setCookie ( |
|
40 | + new Cookie ( |
|
41 | 41 | 'XSRF-TOKEN', |
42 | - $request->session()->token(), |
|
43 | - $this->availableAt(60 * $config['lifetime']), |
|
42 | + $request->session ()->token (), |
|
43 | + $this->availableAt (60 * $config['lifetime']), |
|
44 | 44 | $config['path'], |
45 | 45 | $config['domain'], |
46 | 46 | $config['secure'], |
@@ -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 | */ |
@@ -22,7 +22,7 @@ discard block |
||
22 | 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 | /** |
@@ -35,14 +35,14 @@ discard block |
||
35 | 35 | */ |
36 | 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 | - $toApiArray = function ($model) { |
|
41 | - return array_merge($model->toArray(), $model->getTranslationsArray()); |
|
40 | + $toApiArray = function ($model){ |
|
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 | /** |
@@ -63,14 +63,14 @@ discard block |
||
63 | 63 | */ |
64 | 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 | /** |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | */ |
82 | 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 | /** |
@@ -93,14 +93,14 @@ discard block |
||
93 | 93 | */ |
94 | 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 | /** |
@@ -125,18 +125,18 @@ discard block |
||
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', [ |
@@ -21,8 +21,8 @@ discard block |
||
21 | 21 | */ |
22 | 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 | /** |
@@ -34,11 +34,11 @@ discard block |
||
34 | 34 | */ |
35 | 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 | |
@@ -51,11 +51,11 @@ discard block |
||
51 | 51 | */ |
52 | 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() && |
@@ -19,60 +19,60 @@ discard block |
||
19 | 19 | */ |
20 | 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 | 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 | - 'function' => function ($entry) { |
|
67 | - return '<a href="' . route('manager.profile.edit', $entry->manager->user->id) . '" target="_blank">' . $entry->manager->user->full_name . '</a>'; |
|
66 | + 'function' => function ($entry){ |
|
67 | + return '<a href="'.route ('manager.profile.edit', $entry->manager->user->id).'" target="_blank">'.$entry->manager->user->full_name.'</a>'; |
|
68 | 68 | } |
69 | 69 | ]); |
70 | - $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,19 +80,19 @@ 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 | - ], function () { |
|
88 | - return Department::all()->pluck('name', 'id')->toArray(); |
|
89 | - }, function ($values) { |
|
90 | - $this->crud->addClause('WhereHas', 'department', function ($query) use ($values) { |
|
91 | - foreach (json_decode($values) as $key => $value) { |
|
87 | + ], function (){ |
|
88 | + return Department::all ()->pluck ('name', 'id')->toArray (); |
|
89 | + }, function ($values){ |
|
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 | }); |
@@ -101,7 +101,7 @@ discard block |
||
101 | 101 | |
102 | 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' |
@@ -183,20 +183,20 @@ discard block |
||
183 | 183 | |
184 | 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 | } |
@@ -25,11 +25,11 @@ |
||
25 | 25 | Validator::make($workSamplesValidator->getAttributes(), [ |
26 | 26 | 'applicant_id' => [ |
27 | 27 | 'required', |
28 | - Rule::in($applicant_ids->toArray()), |
|
28 | + Rule::in($applicant_ids->toArray()), |
|
29 | 29 | ], |
30 | 30 | 'file_type_id' => [ |
31 | 31 | 'required', |
32 | - Rule::in($this->file_type_id->toArray()), |
|
32 | + Rule::in($this->file_type_id->toArray()), |
|
33 | 33 | ] |
34 | 34 | |
35 | 35 | ])->validate(); |
@@ -13,26 +13,26 @@ |
||
13 | 13 | public function __construct(Applicant $applicant) |
14 | 14 | { |
15 | 15 | $this->applicant = $applicant; |
16 | - $this->file_type_id = FileType::all()->pluck('id'); |
|
16 | + $this->file_type_id = FileType::all ()->pluck ('id'); |
|
17 | 17 | |
18 | 18 | } |
19 | 19 | public function validate(WorkSamplesValidatorValidator $workSamplesValidator) |
20 | 20 | { |
21 | - $uniqueSkillRule = new UniqueApplicantSkillRule($this->applicant, $workSamplesValidator->id); |
|
21 | + $uniqueSkillRule = new UniqueApplicantSkillRule ($this->applicant, $workSamplesValidator->id); |
|
22 | 22 | //This array is reset every time because applicants table can change frequently |
23 | - $applicant_ids = Applicant::all()->pluck('id'); |
|
23 | + $applicant_ids = Applicant::all ()->pluck ('id'); |
|
24 | 24 | //Validate basic data is filled in |
25 | - Validator::make($workSamplesValidator->getAttributes(), [ |
|
25 | + Validator::make ($workSamplesValidator->getAttributes (), [ |
|
26 | 26 | 'applicant_id' => [ |
27 | 27 | 'required', |
28 | - Rule::in($applicant_ids->toArray()), |
|
28 | + Rule::in ($applicant_ids->toArray ()), |
|
29 | 29 | ], |
30 | 30 | 'file_type_id' => [ |
31 | 31 | 'required', |
32 | - Rule::in($this->file_type_id->toArray()), |
|
32 | + Rule::in ($this->file_type_id->toArray ()), |
|
33 | 33 | ] |
34 | 34 | |
35 | - ])->validate(); |
|
35 | + ])->validate (); |
|
36 | 36 | } |
37 | 37 | |
38 | 38 | } |
39 | 39 | \ No newline at end of file |