Fix non existing class errors
This commit is contained in:
@@ -13,7 +13,6 @@ use Classes\BaseService;
|
||||
use Classes\IceResponse;
|
||||
use Classes\SubActionManager;
|
||||
use Dependents\Common\Model\EmployeeDependent;
|
||||
use Documents\Common\Model\EmployeeDocument;
|
||||
use EmergencyContacts\Common\Model\EmergencyContact;
|
||||
use Employees\Common\Model\ArchivedEmployee;
|
||||
use Employees\Common\Model\Employee;
|
||||
@@ -115,7 +114,9 @@ class EmployeesActionManager extends SubActionManager
|
||||
$data->timesheets = $this->getEmployeeData($employee->id, new EmployeeTimeSheet());
|
||||
$data->timesheetEntries = $this->getEmployeeData($employee->id, new EmployeeTimeEntry());
|
||||
$data->attendance = $this->getEmployeeData($employee->id, new Attendance());
|
||||
$data->documents = $this->getEmployeeData($employee->id, new EmployeeDocument());
|
||||
if (class_exists('\Documents\Common\Model\EmployeeDocument')) {
|
||||
$data->documents = $this->getEmployeeData($employee->id, new \Documents\Common\Model\EmployeeDocument());
|
||||
}
|
||||
$data->travelRecords = $this->getEmployeeData($employee->id, new EmployeeTravelRecord());
|
||||
$data->qualificationSkills = $this->getEmployeeData($employee->id, new EmployeeSkill());
|
||||
$data->qualificationEducation = $this->getEmployeeData($employee->id, new EmployeeEducation());
|
||||
|
||||
@@ -215,11 +215,13 @@ class TimeSheetsActionManager extends SubActionManager
|
||||
$data[] = $this->workScheduleToEvent($leave);
|
||||
}
|
||||
|
||||
$holiday = new HoliDay();
|
||||
$holidays = $holiday->Find("1=1", array());
|
||||
if (class_exists('\Leaves\Common\Model\HoliDay')) {
|
||||
$holiday = new HoliDay();
|
||||
$holidays = $holiday->Find("1=1", array());
|
||||
|
||||
foreach ($holidays as $holiday) {
|
||||
$data[] = $this->holidayToEvent($holiday);
|
||||
foreach ($holidays as $holiday) {
|
||||
$data[] = $this->holidayToEvent($holiday);
|
||||
}
|
||||
}
|
||||
|
||||
echo json_encode($data);
|
||||
|
||||
Reference in New Issue
Block a user