From ee2babb831ae8e55e799e157274edc2e60b22bb9 Mon Sep 17 00:00:00 2001 From: Dennis Eichhorn Date: Sun, 30 Aug 2020 20:13:10 +0200 Subject: [PATCH] autofixes --- Models/Employee.php | 2 +- Models/EmployeeActivityStatus.php | 1 + Models/EmployeeEducationHistory.php | 2 +- Models/EmployeeHistory.php | 2 +- Models/EmployeeWorkHistory.php | 2 +- Models/PermissionState.php | 1 + Theme/Backend/department-list.tpl.php | 16 ++++---- Theme/Backend/staff-create.tpl.php | 8 ++-- Theme/Backend/staff-list.tpl.php | 16 ++++---- Theme/Backend/staff-single.tpl.php | 56 +++++++++++++-------------- tests/Admin/AdminTest.php | 1 + 11 files changed, 55 insertions(+), 52 deletions(-) diff --git a/Models/Employee.php b/Models/Employee.php index b4ca280..e869e0b 100755 --- a/Models/Employee.php +++ b/Models/Employee.php @@ -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. diff --git a/Models/EmployeeActivityStatus.php b/Models/EmployeeActivityStatus.php index ae01fab..d9dc39c 100755 --- a/Models/EmployeeActivityStatus.php +++ b/Models/EmployeeActivityStatus.php @@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum; abstract class EmployeeActivityStatus extends Enum { public const ACTIVE = 1; + public const INACTIVE = 2; } diff --git a/Models/EmployeeEducationHistory.php b/Models/EmployeeEducationHistory.php index 052ce37..c9af187 100755 --- a/Models/EmployeeEducationHistory.php +++ b/Models/EmployeeEducationHistory.php @@ -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. diff --git a/Models/EmployeeHistory.php b/Models/EmployeeHistory.php index ee94b2f..4190a7c 100755 --- a/Models/EmployeeHistory.php +++ b/Models/EmployeeHistory.php @@ -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. diff --git a/Models/EmployeeWorkHistory.php b/Models/EmployeeWorkHistory.php index b6be8cc..f5c1f26 100755 --- a/Models/EmployeeWorkHistory.php +++ b/Models/EmployeeWorkHistory.php @@ -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. diff --git a/Models/PermissionState.php b/Models/PermissionState.php index a814db3..d7579e8 100755 --- a/Models/PermissionState.php +++ b/Models/PermissionState.php @@ -27,5 +27,6 @@ use phpOMS\Stdlib\Base\Enum; abstract class PermissionState extends Enum { public const HR = 1; + public const DEPARTMENT = 2; } diff --git a/Theme/Backend/department-list.tpl.php b/Theme/Backend/department-list.tpl.php index ea2ade4..4a50f3d 100755 --- a/Theme/Backend/department-list.tpl.php +++ b/Theme/Backend/department-list.tpl.php @@ -30,22 +30,22 @@ echo $this->getData('nav')->render(); ?>
-
getHtml('Departments') ?>
+
getHtml('Departments'); ?>
$value) : ++$c; $url = \phpOMS\Uri\UriFactory::build('{/prefix}hr/department/single?{?}&id=' . $value->getId()); ?> -
getHtml('ID', '0', '0'); ?> - getHtml('Name') ?> - getHtml('Employees') ?> - getHtml('Parent') ?> + getHtml('Name'); ?> + getHtml('Employees'); ?> + getHtml('Parent'); ?>
printHtml($value->getId()); ?> - printHtml($value->getName()); ?> - - printHtml($value->getParent()->getName()); ?> + printHtml($value->getId()); ?> + printHtml($value->getName()); ?> + + printHtml($value->getParent()->getName()); ?>
getHtml('Empty', '0', '0'); ?> diff --git a/Theme/Backend/staff-create.tpl.php b/Theme/Backend/staff-create.tpl.php index af49ce3..c5462ba 100755 --- a/Theme/Backend/staff-create.tpl.php +++ b/Theme/Backend/staff-create.tpl.php @@ -41,13 +41,13 @@ echo $this->getData('nav')->render();
-
+
-
+
-
+
-
+
diff --git a/Theme/Backend/staff-list.tpl.php b/Theme/Backend/staff-list.tpl.php index 13c5d18..d16f1f2 100755 --- a/Theme/Backend/staff-list.tpl.php +++ b/Theme/Backend/staff-list.tpl.php @@ -24,22 +24,22 @@ echo $this->getData('nav')->render(); ?>
-
getHtml('Staff') ?>
+
getHtml('Staff'); ?>
$value) : ++$c; $url = \phpOMS\Uri\UriFactory::build('{/prefix}humanresource/staff/profile?{?}&id=' . $value->getId()); ?> -
getHtml('ID', '0', '0'); ?> - getHtml('Name') ?> - getHtml('Unit') ?> - getHtml('Position') ?> - getHtml('Department') ?> - getHtml('Status') ?> + getHtml('Name'); ?> + getHtml('Unit'); ?> + getHtml('Position'); ?> + getHtml('Department'); ?> + getHtml('Status'); ?>
printHtml($value->getId()); ?> - printHtml( + printHtml($value->getId()); ?> + printHtml( \sprintf('%3$s %2$s %1$s', $value->getProfile()->getAccount()->getName1(), $value->getProfile()->getAccount()->getName2(), $value->getProfile()->getAccount()->getName3()) ); ?> printHtml($value->getNewestHistory()->getUnit()->getName()); ?> diff --git a/Theme/Backend/staff-single.tpl.php b/Theme/Backend/staff-single.tpl.php index 3a084bf..9c36d7f 100755 --- a/Theme/Backend/staff-single.tpl.php +++ b/Theme/Backend/staff-single.tpl.php @@ -36,7 +36,7 @@ echo $this->getData('nav')->render(); ?>
- request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : '' ?>> + request->getUri()->getFragment() === 'c-tab-1' ? ' checked' : ''; ?>>
@@ -58,19 +58,19 @@ echo $this->getData('nav')->render(); ?> - - - - - - -
getHtml('Position') ?> + getHtml('Position'); ?> printHtml($recentHistory->getPosition()->getName()); ?>
getHtml('Department') ?> + getHtml('Department'); ?> printHtml($recentHistory->getDepartment()->getName()); ?>
getHtml('Unit') ?> + getHtml('Unit'); ?> printHtml($recentHistory->getUnit()->getName()); ?>
getHtml('Birthday') ?> + getHtml('Birthday'); ?> 06.09.1934
getHtml('Email') ?> + getHtml('Email'); ?> printHtml($employee->getProfile()->getAccount()->getEmail()); ?>
Address @@ -82,7 +82,7 @@ echo $this->getData('nav')->render(); ?> Work SMALLSYS INC
795 E DRAGRAM
TUCSON AZ 85705
USA
getHtml('Phone') ?> + getHtml('Phone'); ?>
Private @@ -94,7 +94,7 @@ echo $this->getData('nav')->render(); ?> Work +01 12345-4567
getHtml('Status') ?> + getHtml('Status'); ?> getHtml('Active') : $this->getHtml('Inactive'); ?>
@@ -107,13 +107,13 @@ echo $this->getData('nav')->render(); ?>
- + - @@ -128,84 +128,84 @@ echo $this->getData('nav')->render(); ?> - request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : '' ?>> + request->getUri()->getFragment() === 'c-tab-2' ? ' checked' : ''; ?>>
-

getHtml('Clocking') ?>

+

getHtml('Clocking'); ?>

- request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : '' ?>> + request->getUri()->getFragment() === 'c-tab-3' ? ' checked' : ''; ?>>
-

getHtml('Clocking') ?>

+

getHtml('Clocking'); ?>

- request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : '' ?>> + request->getUri()->getFragment() === 'c-tab-4' ? ' checked' : ''; ?>>
-

getHtml('Clocking') ?>

+

getHtml('Clocking'); ?>

- request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : '' ?>> + request->getUri()->getFragment() === 'c-tab-5' ? ' checked' : ''; ?>>
-

getHtml('Clocking') ?>

+

getHtml('Clocking'); ?>

- request->getUri()->getFragment() === 'c-tab-6' ? ' checked' : '' ?>> + request->getUri()->getFragment() === 'c-tab-6' ? ' checked' : ''; ?>>
-

getHtml('Clocking') ?>

+

getHtml('Clocking'); ?>

- request->getUri()->getFragment() === 'c-tab-7' ? ' checked' : '' ?>> + request->getUri()->getFragment() === 'c-tab-7' ? ' checked' : ''; ?>>
-

getHtml('Clocking') ?>

+

getHtml('Clocking'); ?>

- request->getUri()->getFragment() === 'c-tab-8' ? ' checked' : '' ?>> + request->getUri()->getFragment() === 'c-tab-8' ? ' checked' : ''; ?>>
-

getHtml('Clocking') ?>

+

getHtml('Clocking'); ?>

diff --git a/tests/Admin/AdminTest.php b/tests/Admin/AdminTest.php index 7c3ee77..b2cb906 100755 --- a/tests/Admin/AdminTest.php +++ b/tests/Admin/AdminTest.php @@ -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;
getHtml('History') ?>getHtml('History'); ?>
getHtml('Start') ?> - getHtml('End') ?> - getHtml('Unit') ?> - getHtml('Department') ?> - getHtml('Position') ?> + getHtml('Start'); ?> + getHtml('End'); ?> + getHtml('Unit'); ?> + getHtml('Department'); ?> + getHtml('Position'); ?>