public function employees_list() { $num = 0; if ($this->input->post('btnFilter')) { $data['report'] = $this->reports_model->filterEmployee(); $num = count($data['report']); } if ($this->input->post('btnPrint')) { $emp = $this->reports_model->filterEmployee(); $this->print_employees_list($emp); } $data['departments'] = Departments_model::all(); $data['employment_type'] = Employment_type_model::all(); $data['job_titles'] = Job_titles_model::all(); $data['employees'] = View_employees_list::all(); $data['pageTitle'] = 'Employees Reports - MSInc.'; $data['content'] = 'reports/employees_list'; $this->load->view($this->master_layout, $data); if ($num != 0) { $this->display_notif('Successful! ' . $num . ' record found'); } }
public function view_details() { $id = $this->input->get('emp_id'); $data['departments'] = Departments_model::all(); $data['job_titles'] = Job_titles_model::all(); $data['employment_type'] = Employment_type_model::all(); $data['countryy'] = Countries::all(); $data['user_level'] = View_user_level::all(); $data['record'] = Dependent_model::find('all', array('conditions' => "employee_id='{$id}'")); //get dependents by id $data['info'] = Emp_info_model::find($id); //Tab 1a - Personal Tab $data['gov_id'] = Gov_id_model::find($id); //Tab 1b - Gov ID Tab $data['address'] = View_emp_address::find($id); //Tab 2a - Contact Tab $data['contact'] = Emp_contact_model::find($id); //Tab 2b - Contact Tab $data['contactP'] = Emp_contact_person::find($id); //Tab 2c - Contact Tab $data['school'] = Emp_school_model::find($id); //Tab 3 - School Tab $data['job_hist'] = Job_history_model::find('all', array('conditions' => "employee_id ='{$id}'")); //Tab 4 - Job History Tab $data['emp'] = View_job_history::find($id); //Tab 5 - Employment Tab $data['leaves'] = View_leaves_left::find('all', array('conditions' => "employee_id ='{$id}'")); //Tab 6 - Leaves Tab $data['asset'] = View_assigned_assets_model::find('all', array('conditions' => "emp_id ='{$id}'")); //Tab 7 - Asset Tab $data['project'] = View_project_workers::find('all', array('conditions' => "emp_id ='{$id}'")); //Tab 8 - Project Tab $data['account'] = View_users_model::find_by_employee_id($id); //Tab 9 - Users Tab $data['pageTitle'] = 'Employee Details - MSInc.'; $data['content'] = 'employee/employee_details'; $this->load->view($this->master_layout, $data); $this->display_notif(); }