function init() { parent::init(); $holiday_model = $this->add('xepan\\hr\\Model_OfficialHoliday'); $crud = $this->add('xepan\\hr\\CRUD'); $crud->setModel($holiday_model, ['name', 'from_date', 'to_date', 'type']); }
function init() { parent::init(); $salary_template_m = $this->add('xepan\\hr\\Model_SalaryTemplate'); $temp_crud = $this->add('xepan\\base\\CRUD', null, 'salary_template_view'); $temp_crud->setModel($salary_template_m); $temp_crud->addRef('xepan\\hr\\SalaryTemplateDetails', ['label' => 'Detail']); $salary = $this->add('xepan\\hr\\Model_Salary'); $crud = $this->add('xepan\\base\\CRUD', null, 'salary_view'); $crud->setModel($salary); }
function init() { parent::init(); $leave_template_m = $this->add('xepan\\hr\\Model_LeaveTemplate'); $temp_crud = $this->add('xepan\\base\\CRUD', null, 'leave_template_view'); $temp_crud->setModel($leave_template_m); $temp_crud->addRef('xepan\\hr\\LeaveTemplateDetail', ['label' => 'Detail']); $leave = $this->add('xepan\\hr\\Model_Leave'); $crud = $this->add('xepan\\base\\CRUD', null, 'leave_view'); $crud->setModel($leave); }
function init() { parent::init(); $week_day_model = $this->add('xepan\\base\\Model_ConfigJsonModel', ['fields' => ['monday' => "checkbox", 'tuesday' => "checkbox", 'wednesday' => "checkbox", 'thursday' => "checkbox", 'friday' => "checkbox", 'saturday' => "checkbox", 'sunday' => "checkbox"], 'config_key' => 'HR_WORKING_WEEK_DAY', 'application' => 'hr']); $week_day_model->tryLoadAny(); $form = $this->add('Form'); $form->setModel($week_day_model); $form->addSubmit("Save"); if ($form->isSubmitted()) { $week_day_model['monday'] = $form['monday']; $week_day_model['tuesday'] = $form['tuesday']; $week_day_model['wednesday'] = $form['wednesday']; $week_day_model['thursday'] = $form['thursday']; $week_day_model['friday'] = $form['friday']; $week_day_model['saturday'] = $form['saturday']; $week_day_model['sunday'] = $form['sunday']; $week_day_model->save(); $form->js(null, $form->js()->univ()->successMessage('Saved'))->reload()->execute(); } }