1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
namespace App\Http\Controllers; |
4
|
|
|
|
5
|
|
|
use App\Http\Controllers\Controller; |
6
|
|
|
use App\Models\JobApplication; |
7
|
|
|
use App\Models\JobPoster; |
8
|
|
|
use Illuminate\Support\Facades\Auth; |
9
|
|
|
use Illuminate\Support\Facades\Lang; |
10
|
|
|
|
11
|
|
|
class ApplicationTimelineController extends Controller |
12
|
|
|
{ |
13
|
|
|
public function show(JobApplication $jobApplication) |
14
|
|
|
{ |
15
|
|
|
return view('applicant/application-timeline-root') |
|
|
|
|
16
|
|
|
->with([ |
17
|
|
|
'title' => $jobApplication->job_poster->title, // TODO: Check with design what the title should be. |
18
|
|
|
'disable_clone_js' => true, |
19
|
|
|
]); |
20
|
|
|
} |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* Show the congrats page after application it's validated and submit. |
24
|
|
|
* |
25
|
|
|
* @param \App\Models\JobPoster $jobPoster Incoming Job Poster object. |
26
|
|
|
* @return \Illuminate\Http\Response |
27
|
|
|
*/ |
28
|
|
|
public function complete(/* JobPoster $jobPoster */) |
29
|
|
|
{ |
30
|
|
|
// Dummy Data. |
31
|
|
|
$applicant = Auth::user()->applicant; |
32
|
|
|
$jobPoster = JobPoster::where('job_poster_status_id', '10')->first(); |
33
|
|
|
$application = JobApplication::where('job_poster_id', $jobPoster->id)->first(); |
34
|
|
|
|
35
|
|
|
return view( |
|
|
|
|
36
|
|
|
'applicant/application/10-congrats', |
37
|
|
|
[ |
38
|
|
|
'applicant' => $applicant, |
39
|
|
|
'application' => $application, |
40
|
|
|
'application_template' => Lang::get( |
41
|
|
|
'applicant/application_template', |
42
|
|
|
['security_clearance' => $jobPoster->security_clearance->value ] |
43
|
|
|
), |
44
|
|
|
'jobPoster' => $jobPoster, |
45
|
|
|
] |
46
|
|
|
); |
47
|
|
|
} |
48
|
|
|
} |
49
|
|
|
|