예제 #1
0
 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']);
 }
예제 #2
0
파일: salarytemplate.php 프로젝트: xepan/hr
 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);
 }
예제 #3
0
파일: leavetemplate.php 프로젝트: xepan/hr
 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);
 }
예제 #4
0
파일: workingweekday.php 프로젝트: xepan/hr
 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();
     }
 }