Example #1
0
 /**
  * Show the Profile - Job Form.
  *
  * @Get("profile/job/edit")
  * @Get("pim/employee-list/{id}/job/edit")
  *
  * @param JobRequest $request
  * @param null $employee_id
  * @return \Illuminate\View\View
  * @author Bertrand Kintanar
  */
 public function show(JobRequest $request, $employee_id = null)
 {
     if (Input::get('success')) {
         return redirect()->to($request->path())->with('success', SUCCESS_UPDATE_MESSAGE);
     }
     $employee = $this->employee->getEmployeeById($employee_id, $this->logged_user->id);
     $this->data['employee'] = $employee;
     $job_histories = $employee->orderedJobHistories();
     $this->data['disabled'] = '';
     $this->data['pim'] = $request->is('*pim/*') ?: false;
     $this->data['table'] = $this->setupDataTable($job_histories);
     $this->data['pageTitle'] = $this->data['pim'] ? 'Edit Employee Job Details' : 'Edit My Job Details';
     return $this->template('pages.profile.job.edit');
 }