| @@ 28-53 (lines=26) @@ | ||
| 25 | * @param \App\Models\Applicant $applicant Incoming Applicant object. |
|
| 26 | * @return \Illuminate\Http\Response |
|
| 27 | */ |
|
| 28 | public function show(Request $request, Applicant $applicant) |
|
| 29 | { |
|
| 30 | /* |
|
| 31 | * TODO: |
|
| 32 | * Josh, to loop through answers&question data, leverage this data structure: |
|
| 33 | * applicant |
|
| 34 | * [applicant_profile_answers] |
|
| 35 | * answer |
|
| 36 | * applicant_profile_question |
|
| 37 | * id |
|
| 38 | * value // The question text |
|
| 39 | * description // Question description text |
|
| 40 | */ |
|
| 41 | ||
| 42 | return view( |
|
| 43 | 'manager/applicant_profile', |
|
| 44 | [ |
|
| 45 | // Localization Strings. |
|
| 46 | 'profile' => Lang::get('manager/applicant_profile'), // Change text |
|
| 47 | // User Data. |
|
| 48 | 'user' => $applicant->user, |
|
| 49 | 'applicant' => $applicant, |
|
| 50 | 'profile_photo_url' => '/images/user.png', // TODO: get real photos. |
|
| 51 | ] |
|
| 52 | ); |
|
| 53 | } |
|
| 54 | ||
| 55 | /** |
|
| 56 | * Show the form for editing the logged-in applicant's profile |
|
| @@ 35-43 (lines=9) @@ | ||
| 32 | * @param \App\Models\Applicant $applicant Incoming applicant object. |
|
| 33 | * @return \Illuminate\Http\Response |
|
| 34 | */ |
|
| 35 | public function edit(Request $request, Applicant $applicant) |
|
| 36 | { |
|
| 37 | return view('applicant/profile_02_experience', [ |
|
| 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) |
|
| 42 | ]); |
|
| 43 | } |
|
| 44 | ||
| 45 | /** |
|
| 46 | * Update the applicant's profile in storage. |
|
| @@ 35-47 (lines=13) @@ | ||
| 32 | * @param \App\Models\Applicant $applicant Applicant object. |
|
| 33 | * @return \Illuminate\Http\Response |
|
| 34 | */ |
|
| 35 | public function edit(Request $request, Applicant $applicant) |
|
| 36 | { |
|
| 37 | $applicant->load([ |
|
| 38 | 'skill_declarations.skill.skill_type', |
|
| 39 | 'skill_declarations.skill_status', |
|
| 40 | 'skill_declarations.skill_level', |
|
| 41 | ]); |
|
| 42 | ||
| 43 | return view('applicant/profile_03_skills', [ |
|
| 44 | 'applicant' => $applicant, |
|
| 45 | 'profile' => Lang::get('applicant/profile_skills'), |
|
| 46 | ]); |
|
| 47 | } |
|
| 48 | ||
| 49 | /** |
|
| 50 | * Create the particular skill declaration in storage. |
|