setForm(); } /** * Return form elements. * * @return array. */ public function form($element = 'fields', $grouped = true) { $item = collect($this->form->get($element)); if ($element == 'fields' && $grouped == true) { return $item->groupBy(['group', 'section']); } return $item; } /** * Sets the form and form elements. * @return null. */ public function setForm() { $this->form = collect([ 'form' => [ 'store' => [], 'update' => [], ], 'groups' => [ 'main' => 'Main', ], 'fields' => [ 'company_id' => [ "type" => 'numeric', "label" => trans('organisation::employee.label.company_id'), "placeholder" => trans('organisation::employee.placeholder.company_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'file_id' => [ "type" => 'numeric', "label" => trans('organisation::employee.label.file_id'), "placeholder" => trans('organisation::employee.placeholder.file_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_id' => [ "type" => 'numeric', "label" => trans('organisation::employee.label.manager_id'), "placeholder" => trans('organisation::employee.placeholder.manager_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'name' => [ "type" => 'text', "label" => trans('organisation::employee.label.name'), "placeholder" => trans('organisation::employee.placeholder.name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'last_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.last_name'), "placeholder" => trans('organisation::employee.placeholder.last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'email' => [ "type" => 'text', "label" => trans('organisation::employee.label.email'), "placeholder" => trans('organisation::employee.placeholder.email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'gender' => [ "type" => 'text', "label" => trans('organisation::employee.label.gender'), "placeholder" => trans('organisation::employee.placeholder.gender'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'job_type' => [ "type" => 'text', "label" => trans('organisation::employee.label.job_type'), "placeholder" => trans('organisation::employee.placeholder.job_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contract_type' => [ "type" => 'text', "label" => trans('organisation::employee.label.contract_type'), "placeholder" => trans('organisation::employee.placeholder.contract_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'employee_id' => [ "type" => 'text', "label" => trans('organisation::employee.label.employee_id'), "placeholder" => trans('organisation::employee.placeholder.employee_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'grade' => [ "type" => 'text', "label" => trans('organisation::employee.label.grade'), "placeholder" => trans('organisation::employee.placeholder.grade'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'first_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.first_name'), "placeholder" => trans('organisation::employee.placeholder.first_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'middle_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.middle_name'), "placeholder" => trans('organisation::employee.placeholder.middle_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'designation' => [ "type" => 'text', "label" => trans('organisation::employee.label.designation'), "placeholder" => trans('organisation::employee.placeholder.designation'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'dob' => [ "type" => 'date_picker', "label" => trans('organisation::employee.label.dob'), "placeholder" => trans('organisation::employee.placeholder.dob'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'doj' => [ "type" => 'date_picker', "label" => trans('organisation::employee.label.doj'), "placeholder" => trans('organisation::employee.placeholder.doj'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'business_unit' => [ "type" => 'text', "label" => trans('organisation::employee.label.business_unit'), "placeholder" => trans('organisation::employee.placeholder.business_unit'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'division' => [ "type" => 'text', "label" => trans('organisation::employee.label.division'), "placeholder" => trans('organisation::employee.placeholder.division'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'department' => [ "type" => 'text', "label" => trans('organisation::employee.label.department'), "placeholder" => trans('organisation::employee.placeholder.department'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'location' => [ "type" => 'text', "label" => trans('organisation::employee.label.location'), "placeholder" => trans('organisation::employee.placeholder.location'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'city' => [ "type" => 'text', "label" => trans('organisation::employee.label.city'), "placeholder" => trans('organisation::employee.placeholder.city'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'state' => [ "type" => 'text', "label" => trans('organisation::employee.label.state'), "placeholder" => trans('organisation::employee.placeholder.state'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_corp_id' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_corp_id'), "placeholder" => trans('organisation::employee.placeholder.manager_corp_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_grade' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_grade'), "placeholder" => trans('organisation::employee.placeholder.manager_grade'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_full_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_full_name'), "placeholder" => trans('organisation::employee.placeholder.manager_full_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_name'), "placeholder" => trans('organisation::employee.placeholder.manager_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_last_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_last_name'), "placeholder" => trans('organisation::employee.placeholder.manager_last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_first_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_first_name'), "placeholder" => trans('organisation::employee.placeholder.manager_first_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_middle_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_middle_name'), "placeholder" => trans('organisation::employee.placeholder.manager_middle_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_email' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_email'), "placeholder" => trans('organisation::employee.placeholder.manager_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_manager_corp_id' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_manager_corp_id'), "placeholder" => trans('organisation::employee.placeholder.manager_manager_corp_id'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_manager_last_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_manager_last_name'), "placeholder" => trans('organisation::employee.placeholder.manager_manager_last_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_manager_first_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_manager_first_name'), "placeholder" => trans('organisation::employee.placeholder.manager_manager_first_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_manager_middle_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_manager_middle_name'), "placeholder" => trans('organisation::employee.placeholder.manager_manager_middle_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'manager_manager_email' => [ "type" => 'text', "label" => trans('organisation::employee.label.manager_manager_email'), "placeholder" => trans('organisation::employee.placeholder.manager_manager_email'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'direct_manager' => [ "type" => 'text', "label" => trans('organisation::employee.label.direct_manager'), "placeholder" => trans('organisation::employee.placeholder.direct_manager'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rollup1_manager' => [ "type" => 'text', "label" => trans('organisation::employee.label.rollup1_manager'), "placeholder" => trans('organisation::employee.placeholder.rollup1_manager'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rollup2_manager' => [ "type" => 'text', "label" => trans('organisation::employee.label.rollup2_manager'), "placeholder" => trans('organisation::employee.placeholder.rollup2_manager'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rollup3_manager' => [ "type" => 'text', "label" => trans('organisation::employee.label.rollup3_manager'), "placeholder" => trans('organisation::employee.placeholder.rollup3_manager'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rollup4_manager' => [ "type" => 'text', "label" => trans('organisation::employee.label.rollup4_manager'), "placeholder" => trans('organisation::employee.placeholder.rollup4_manager'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'rollup5_manager' => [ "type" => 'text', "label" => trans('organisation::employee.label.rollup5_manager'), "placeholder" => trans('organisation::employee.placeholder.rollup5_manager'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'hrbp_name' => [ "type" => 'text', "label" => trans('organisation::employee.label.hrbp_name'), "placeholder" => trans('organisation::employee.placeholder.hrbp_name'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], 'contributor_type' => [ "type" => 'text', "label" => trans('organisation::employee.label.contributor_type'), "placeholder" => trans('organisation::employee.placeholder.contributor_type'), "rules" => '', "group" => "main", "section" => "first", "attributes" => [ 'wrapper' => [], "label" => [], "input" => [], ], ], ] ); } }