/** * Show the Profile - Contact Details Form. * * @Get("profile/contact-details/edit") * @Get("pim/employee-list/{id}/contact-details/edit") * * @param ContactDetailsRequest $request * @param null $employee_id * @return \Illuminate\View\View * @author Bertrand Kintanar */ public function show(ContactDetailsRequest $request, $employee_id = null) { $employee = $this->employee->getEmployeeById($employee_id, $this->logged_user->id); if (!$employee) { return response()->make(view()->make('errors.404'), 404); } $this->data['employee'] = $employee; $this->data['disabled'] = ''; $this->data['pim'] = $request->is('*pim/*') ?: false; $this->data['pageTitle'] = $this->data['pim'] ? 'Edit Employee Contact Details' : 'Edit My Contact Details'; return $this->template('pages.profile.contact-details.edit'); }
/** * Show the form for editing the specified resource. * * @Get("profile/work-shifts/edit") * @Get("pim/employee-list/{id}/work-shifts/edit") * * @param WorkShiftRequest $request * @param null $employee_id * @return Response * @author Bertrand Kintanar */ public function show(WorkShiftRequest $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; $this->data['workshift_history'] = $employee->employeeWorkShift; $this->data['disabled'] = ''; $this->data['pim'] = $request->is('*pim/*') ?: false; $this->data['pageTitle'] = $this->data['pim'] ? 'Edit Employee Job Details' : 'Edit My Job Details'; return $this->template('pages.profile.workshift.edit'); }
/** * Show the Profile - Dependents. * * @Get("profile/dependents") * @Get("pim/employee-list/{id}/dependents") * * @param DependentsRequest $request * @param null $employee_id * @return \Illuminate\View\View * @author Bertrand Kintanar */ public function index(DependentsRequest $request, $employee_id = null) { $employee = $this->employee->getEmployeeById($employee_id, $this->logged_user->id); if (!$employee) { return response()->make(view()->make('errors.404'), 404); } $this->data['employee'] = $employee; $dependents = $this->dependent->whereEmployeeId($employee->id)->get(); $this->data['pim'] = $request->is('*pim/*') ?: false; $this->data['table'] = $this->setupDataTable($dependents); $this->data['pageTitle'] = $this->data['pim'] ? 'Employee Dependents' : 'My Dependents'; return $this->template('pages.profile.dependents.view'); }
/** * Show the Profile - Qualifications. * * @Get("profile/qualifications") * @Get("pim/employee-list/{id}/qualifications") * * @param QualificationsRequest $request * @param null $employee_id * @return \Illuminate\View\View * @author Bertrand Kintanar */ public function index(QualificationsRequest $request, $employee_id = null) { $employee = $this->employee->getEmployeeById($employee_id, $this->logged_user->id); if (!$employee) { return response()->make(view()->make('errors.404'), 404); } $this->data['employee'] = $employee; $this->data['workExperiences'] = $employee->workExperiences; $this->data['educations'] = $employee->educations; $this->data['skills'] = $employee->skills; $this->data['pim'] = $request->is('*pim/*') ?: false; $this->data['pageTitle'] = $this->data['pim'] ? 'Employee Qualifications' : 'My Qualifications'; return $this->template('pages.profile.qualifications.view'); }
/** * 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'); }