diff --git a/Models/EmployeeHistory.php b/Models/EmployeeHistory.php index 203c90a..9879f11 100755 --- a/Models/EmployeeHistory.php +++ b/Models/EmployeeHistory.php @@ -47,7 +47,7 @@ class EmployeeHistory implements \JsonSerializable, ArrayableInterface * @var int|Employee * @since 1.0.0 */ - private $employee = 0; + public $employee = 0; /** * Unit @@ -55,7 +55,7 @@ class EmployeeHistory implements \JsonSerializable, ArrayableInterface * @var null|int|Unit * @since 1.0.0 */ - private $unit = null; + public $unit = null; /** * Department @@ -63,7 +63,7 @@ class EmployeeHistory implements \JsonSerializable, ArrayableInterface * @var null|int|Department * @since 1.0.0 */ - private $department = null; + public $department = null; /** * Position @@ -71,7 +71,7 @@ class EmployeeHistory implements \JsonSerializable, ArrayableInterface * @var null|int|Position * @since 1.0.0 */ - private $position = null; + public $position = null; /** * Files. diff --git a/Theme/Backend/staff-list.tpl.php b/Theme/Backend/staff-list.tpl.php index 0fdd42d..223c866 100755 --- a/Theme/Backend/staff-list.tpl.php +++ b/Theme/Backend/staff-list.tpl.php @@ -15,6 +15,7 @@ declare(strict_types=1); use Modules\HumanResourceManagement\Models\NullEmployeeHistory; use phpOMS\Uri\UriFactory; +use Modules\Media\Models\NullMedia; /** * @var \phpOMS\Views\View $this @@ -42,7 +43,7 @@ echo $this->getData('nav')->render(); ?> $value) : ++$c; $url = UriFactory::build('{/prefix}humanresource/staff/profile?{?}&id=' . $value->getId()); ?> - getHtml('Name'); ?>">printHtml( \sprintf('%3$s %2$s %1$s', $value->profile->account->name1, $value->profile->account->name2, $value->profile->account->name3) ); ?> - printHtml($value->getNewestHistory()->getUnit()->name); ?> - printHtml($value->getNewestHistory()->getPosition()->name); ?> - printHtml($value->getNewestHistory()->getDepartment()->name); ?> + printHtml($value->getNewestHistory()->unit->name); ?> + printHtml($value->getNewestHistory()->position->name); ?> + printHtml($value->getNewestHistory()->department->name); ?> getNewestHistory() instanceof NullEmployeeHistory) ? $this->getHtml('Active') : $this->getHtml('Inactive'); ?> diff --git a/Theme/Backend/staff-single.tpl.php b/Theme/Backend/staff-single.tpl.php index ee55596..5b77f50 100755 --- a/Theme/Backend/staff-single.tpl.php +++ b/Theme/Backend/staff-single.tpl.php @@ -61,13 +61,13 @@ echo $this->getData('nav')->render(); ?>
getHtml('Position'); ?> - printHtml($recentHistory->getPosition()->name); ?> + printHtml($recentHistory->position->name); ?>
getHtml('Department'); ?> - printHtml($recentHistory->getDepartment()->name); ?> + printHtml($recentHistory->department->name); ?>
getHtml('Unit'); ?> - printHtml($recentHistory->getUnit()->name); ?> + printHtml($recentHistory->unit->name); ?>
getHtml('Birthday'); ?> 06.09.1934 @@ -121,9 +121,9 @@ echo $this->getData('nav')->render(); ?>
getStart()->format('Y-m-d'); ?> getEnd() === null ? '' : $hist->getEnd()->format('Y-m-d'); ?> - printHtml($hist->getUnit()->name); ?> - printHtml($hist->getDepartment()->name); ?> - printHtml($hist->getPosition()->name); ?> + printHtml($hist->unit->name); ?> + printHtml($hist->department->name); ?> + printHtml($hist->position->name); ?>