mirror of
https://github.com/Karaka-Management/oms-HumanResourceManagement.git
synced 2026-01-21 16:38:40 +00:00
autofixes
This commit is contained in:
parent
a1f4dfe580
commit
ee2babb831
|
|
@ -28,7 +28,7 @@ use phpOMS\Contract\ArrayableInterface;
|
|||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Employee implements ArrayableInterface, \JsonSerializable
|
||||
class Employee implements \JsonSerializable, ArrayableInterface
|
||||
{
|
||||
/**
|
||||
* Employee ID.
|
||||
|
|
|
|||
|
|
@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class EmployeeActivityStatus extends Enum
|
||||
{
|
||||
public const ACTIVE = 1;
|
||||
|
||||
public const INACTIVE = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use phpOMS\Contract\ArrayableInterface;
|
|||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class EmployeeEducationHistory implements ArrayableInterface, \JsonSerializable
|
||||
class EmployeeEducationHistory implements \JsonSerializable, ArrayableInterface
|
||||
{
|
||||
/**
|
||||
* ID.
|
||||
|
|
|
|||
|
|
@ -31,7 +31,7 @@ use phpOMS\Contract\ArrayableInterface;
|
|||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class EmployeeHistory implements ArrayableInterface, \JsonSerializable
|
||||
class EmployeeHistory implements \JsonSerializable, ArrayableInterface
|
||||
{
|
||||
/**
|
||||
* ID.
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ use phpOMS\Contract\ArrayableInterface;
|
|||
* @link https://orange-management.org
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class EmployeeWorkHistory implements ArrayableInterface, \JsonSerializable
|
||||
class EmployeeWorkHistory implements \JsonSerializable, ArrayableInterface
|
||||
{
|
||||
/**
|
||||
* ID.
|
||||
|
|
|
|||
|
|
@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum;
|
|||
abstract class PermissionState extends Enum
|
||||
{
|
||||
public const HR = 1;
|
||||
|
||||
public const DEPARTMENT = 2;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -30,22 +30,22 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Departments') ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Departments'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<table class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('ID', '0', '0'); ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Name') ?>
|
||||
<td><?= $this->getHtml('Employees') ?>
|
||||
<td><?= $this->getHtml('Parent') ?>
|
||||
<td class="wf-100"><?= $this->getHtml('Name'); ?>
|
||||
<td><?= $this->getHtml('Employees'); ?>
|
||||
<td><?= $this->getHtml('Parent'); ?>
|
||||
<tbody>
|
||||
<?php $c = 0; foreach ($departments as $key => $value) : ++$c;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}hr/department/single?{?}&id=' . $value->getId()); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('ID', '0', '0') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Employees') ?>">
|
||||
<td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Employees'); ?>">
|
||||
<td data-label="<?= $this->getHtml('Parent'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>
|
||||
<?php endforeach; ?>
|
||||
<?php if ($c === 0) : ?>
|
||||
<tr><td colspan="4" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>
|
||||
|
|
|
|||
|
|
@ -41,13 +41,13 @@ echo $this->getData('nav')->render();
|
|||
<tr><td><input id="iName2" name="name2" type="text" placeholder=" Fauntleroy">
|
||||
<tr><td><label for="iName3"><?= $this->getHtml('Name3', 'Admin'); ?></label>
|
||||
<tr><td><input id="iName3" name="name3" type="text" placeholder=" Duck">
|
||||
<tr><td><label for="iAddress"><?= $this->getHtml('Address', 'Profile') ?></label>
|
||||
<tr><td><label for="iAddress"><?= $this->getHtml('Address', 'Profile'); ?></label>
|
||||
<tr><td><input type="text" id="iAddress" name="address">
|
||||
<tr><td><label for="iZip"><?= $this->getHtml('Zip', 'Profile') ?></label>
|
||||
<tr><td><label for="iZip"><?= $this->getHtml('Zip', 'Profile'); ?></label>
|
||||
<tr><td><input type="text" id="iZip" name="zip">
|
||||
<tr><td><label for="iCity"><?= $this->getHtml('City', 'Profile') ?></label>
|
||||
<tr><td><label for="iCity"><?= $this->getHtml('City', 'Profile'); ?></label>
|
||||
<tr><td><input type="text" id="iCity" name="city">
|
||||
<tr><td><label for="iCountry"><?= $this->getHtml('Country', 'Profile') ?></label>
|
||||
<tr><td><label for="iCountry"><?= $this->getHtml('Country', 'Profile'); ?></label>
|
||||
<tr><td><input type="text" id="iCountry" name="country">
|
||||
<tr><td><label for="iBirthday"><?= $this->getHtml('Birthday', 'Profile'); ?></label>
|
||||
<tr><td><input id="iBirthday" name="pirthday" type="text">
|
||||
|
|
|
|||
|
|
@ -24,22 +24,22 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="portlet">
|
||||
<div class="portlet-head"><?= $this->getHtml('Staff') ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<div class="portlet-head"><?= $this->getHtml('Staff'); ?><i class="fa fa-download floatRight download btn"></i></div>
|
||||
<table id="employeeList" class="default">
|
||||
<thead>
|
||||
<tr>
|
||||
<td><?= $this->getHtml('ID', '0', '0'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td class="wf-100"><?= $this->getHtml('Name') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Unit') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Position') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Department') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Status') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td class="wf-100"><?= $this->getHtml('Name'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Unit'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Position'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Department'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Status'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<tbody>
|
||||
<?php $c = 0; foreach ($employees as $key => $value) : ++$c;
|
||||
$url = \phpOMS\Uri\UriFactory::build('{/prefix}humanresource/staff/profile?{?}&id=' . $value->getId()); ?>
|
||||
<tr tabindex="0" data-href="<?= $url; ?>">
|
||||
<td data-label="<?= $this->getHtml('ID', '0', '0') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml(
|
||||
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getId()); ?></a>
|
||||
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml(
|
||||
\sprintf('%3$s %2$s %1$s', $value->getProfile()->getAccount()->getName1(), $value->getProfile()->getAccount()->getName2(), $value->getProfile()->getAccount()->getName3())
|
||||
); ?></a>
|
||||
<td><?= $this->printHtml($value->getNewestHistory()->getUnit()->getName()); ?>
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
</ul>
|
||||
</div>
|
||||
<div class="tab-content">
|
||||
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-1" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12 col-md-6">
|
||||
|
|
@ -58,19 +58,19 @@ echo $this->getData('nav')->render(); ?>
|
|||
</span>
|
||||
<table class="list">
|
||||
<tr>
|
||||
<th><?= $this->getHtml('Position') ?>
|
||||
<th><?= $this->getHtml('Position'); ?>
|
||||
<td itemprop="jobTitle"><?= $this->printHtml($recentHistory->getPosition()->getName()); ?>
|
||||
<tr>
|
||||
<th><?= $this->getHtml('Department') ?>
|
||||
<th><?= $this->getHtml('Department'); ?>
|
||||
<td itemprop="jobTitle"><?= $this->printHtml($recentHistory->getDepartment()->getName()); ?>
|
||||
<tr>
|
||||
<th><?= $this->getHtml('Unit') ?>
|
||||
<th><?= $this->getHtml('Unit'); ?>
|
||||
<td itemprop="jobTitle"><?= $this->printHtml($recentHistory->getUnit()->getName()); ?>
|
||||
<tr>
|
||||
<th><?= $this->getHtml('Birthday') ?>
|
||||
<th><?= $this->getHtml('Birthday'); ?>
|
||||
<td itemprop="birthDate">06.09.1934
|
||||
<tr>
|
||||
<th><?= $this->getHtml('Email') ?>
|
||||
<th><?= $this->getHtml('Email'); ?>
|
||||
<td itemprop="email"><a href="mailto:<?= $this->printHtml($employee->getProfile()->getAccount()->getEmail()); ?>"><?= $this->printHtml($employee->getProfile()->getAccount()->getEmail()); ?></a>
|
||||
<tr>
|
||||
<th>Address
|
||||
|
|
@ -82,7 +82,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<th class="vT">Work
|
||||
<td itemprop="address">SMALLSYS INC<br>795 E DRAGRAM<br>TUCSON AZ 85705<br>USA
|
||||
<tr>
|
||||
<th><?= $this->getHtml('Phone') ?>
|
||||
<th><?= $this->getHtml('Phone'); ?>
|
||||
<td>
|
||||
<tr>
|
||||
<th>Private
|
||||
|
|
@ -94,7 +94,7 @@ echo $this->getData('nav')->render(); ?>
|
|||
<th>Work
|
||||
<td itemprop="telephone">+01 12345-4567
|
||||
<tr>
|
||||
<th><?= $this->getHtml('Status') ?>
|
||||
<th><?= $this->getHtml('Status'); ?>
|
||||
<td><span class="tag green"><?= !($recentHistory instanceof NullEmployeeHistory) ? $this->getHtml('Active') : $this->getHtml('Inactive'); ?></span>
|
||||
</table>
|
||||
<!-- @formatter:on -->
|
||||
|
|
@ -107,13 +107,13 @@ echo $this->getData('nav')->render(); ?>
|
|||
<div class="col-xs-12">
|
||||
<div class="box wf-100 x-overflow">
|
||||
<table id="historyList" class="default">
|
||||
<caption><?= $this->getHtml('History') ?><i class="fa fa-download floatRight download btn"></i></caption>
|
||||
<caption><?= $this->getHtml('History'); ?><i class="fa fa-download floatRight download btn"></i></caption>
|
||||
<thead>
|
||||
<td><?= $this->getHtml('Start') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('End') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Unit') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Department') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Position') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Start'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('End'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Unit'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Department'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<td><?= $this->getHtml('Position'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
|
||||
<tfoot>
|
||||
<tbody>
|
||||
<?php foreach ($history as $hist) : ?>
|
||||
|
|
@ -128,84 +128,84 @@ echo $this->getData('nav')->render(); ?>
|
|||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-2" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Clocking') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
|
||||
<div class="inner">
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-3" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Clocking') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
|
||||
<div class="inner">
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-4" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Clocking') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
|
||||
<div class="inner">
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-5" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Clocking') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
|
||||
<div class="inner">
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-6" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-6' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-6" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-6' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Clocking') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
|
||||
<div class="inner">
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-7" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-7' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-7" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-7' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Clocking') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
|
||||
<div class="inner">
|
||||
</div>
|
||||
</section>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="radio" id="c-tab-8" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-8' ? ' checked' : '' ?>>
|
||||
<input type="radio" id="c-tab-8" name="tabular-2"<?= $this->request->getUri()->getFragment() === 'c-tab-8' ? ' checked' : ''; ?>>
|
||||
<div class="tab">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<section class="box wf-100">
|
||||
<header><h1><?= $this->getHtml('Clocking') ?></h1></header>
|
||||
<header><h1><?= $this->getHtml('Clocking'); ?></h1></header>
|
||||
<div class="inner">
|
||||
</div>
|
||||
</section>
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ namespace Modules\HumanResourceManagement\tests\Admin;
|
|||
class AdminTest extends \PHPUnit\Framework\TestCase
|
||||
{
|
||||
protected const MODULE_NAME = 'HumanResourceManagement';
|
||||
|
||||
protected const URI_LOAD = '';
|
||||
|
||||
use \Modules\tests\ModuleTestTrait;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user