autofixes

This commit is contained in:
Dennis Eichhorn 2020-08-30 20:13:11 +02:00
parent 710e5ae29b
commit 857f183ba7
20 changed files with 83 additions and 74 deletions

View File

@ -24,7 +24,7 @@ use phpOMS\Contract\ArrayableInterface;
* @link https://orange-management.org
* @since 1.0.0
*/
class Department implements ArrayableInterface, \JsonSerializable
class Department implements \JsonSerializable, ArrayableInterface
{
/**
* Article ID.

View File

@ -27,7 +27,10 @@ use phpOMS\Stdlib\Base\Enum;
abstract class PermissionState extends Enum
{
public const UNIT = 1;
public const DEPARTMENT = 2;
public const POSITION = 3;
public const ORGANIGRAM = 4;
}

View File

@ -24,7 +24,7 @@ use phpOMS\Contract\ArrayableInterface;
* @link https://orange-management.org
* @since 1.0.0
*/
class Position implements ArrayableInterface, \JsonSerializable
class Position implements \JsonSerializable, ArrayableInterface
{
/**
* Article ID.

View File

@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
abstract class SettingsEnum extends Enum
{
public const GROUP_GENERATE_AUTOMATICALLY_UNIT = '1004700001';
public const GROUP_GENERATE_AUTOMATICALLY_DEPARTMENT = '1004700002';
public const GROUP_GENERATE_AUTOMATICALLY_POSITION = '1004700003';
}

View File

@ -27,6 +27,8 @@ use phpOMS\Stdlib\Base\Enum;
abstract class Status extends Enum
{
public const ACTIVE = 1;
public const INACTIVE = 2;
public const HIDDEN = 4;
}

View File

@ -26,7 +26,7 @@ use phpOMS\Contract\ArrayableInterface;
* @link https://orange-management.org
* @since 1.0.0
*/
class Unit implements ArrayableInterface, \JsonSerializable
class Unit implements \JsonSerializable, ArrayableInterface
{
/**
* Article ID.

View File

@ -1,6 +1,6 @@
<template id="org-department-selector-tpl">
<section id="org-department-selector" class="box w-50" style="z-index: 9; position: absolute; margin: 0 auto; left: 50%; top: 50%; transform: translate(-50%, -50%);">
<header><h1><?= $this->getHtml('Department', 'Organization') ?></h1></header>
<header><h1><?= $this->getHtml('Department', 'Organization'); ?></h1></header>
<div class="inner">
<label for="iSearchOrgDepartment">Search</label>
@ -42,7 +42,7 @@
{"key": 1, "type": "dom.remove", "selector": "#org-department-selector", "aniOut": "fadeOut"}
]
}
]'><?= $this->getHtml('Close', 'Admin') ?></button>
]'><?= $this->getHtml('Close', 'Admin'); ?></button>
</div>
</section>
</template>

View File

@ -1,6 +1,6 @@
<template id="org-position-selector-tpl">
<section id="org-position-selector" class="box w-50" style="z-index: 9; position: absolute; margin: 0 auto; left: 50%; top: 50%; transform: translate(-50%, -50%);">
<header><h1><?= $this->getHtml('Position', 'Organization') ?></h1></header>
<header><h1><?= $this->getHtml('Position', 'Organization'); ?></h1></header>
<div class="inner">
<label for="iSearchOrgPosition">Search</label>
@ -42,7 +42,7 @@
{"key": 1, "type": "dom.remove", "selector": "#org-position-selector", "aniOut": "fadeOut"}
]
}
]'><?= $this->getHtml('Close', 'Admin') ?></button>
]'><?= $this->getHtml('Close', 'Admin'); ?></button>
</div>
</section>
</template>

View File

@ -1,6 +1,6 @@
<template id="org-unit-selector-tpl">
<section id="org-unit-selector" class="box w-50" style="z-index: 9; position: absolute; margin: 0 auto; left: 50%; top: 50%; transform: translate(-50%, -50%);">
<header><h1><?= $this->getHtml('Unit', 'Organization') ?></h1></header>
<header><h1><?= $this->getHtml('Unit', 'Organization'); ?></h1></header>
<div class="inner">
<label for="iSearchOrgUnit">Search</label>
@ -42,7 +42,7 @@
{"key": 1, "type": "dom.remove", "selector": "#org-unit-selector", "aniOut": "fadeOut"}
]
}
]'><?= $this->getHtml('Close', 'Admin') ?></button>
]'><?= $this->getHtml('Close', 'Admin'); ?></button>
</div>
</section>
</template>

View File

@ -21,16 +21,16 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="fDepartmentCreate" method="PUT" action="<?= UriFactory::build('{/api}{/rootPath}{/lang}/api/organization/department'); ?>">
<div class="portlet-head"><?= $this->getHtml('Department') ?></div>
<div class="portlet-head"><?= $this->getHtml('Department'); ?></div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; R&D" required>
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><label for="iParent"><?= $this->getHtml('Parent'); ?></label>
<tr><td><?= $this->getData('department-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iUnit"><?= $this->getHtml('Unit') ?></label>
<tr><td><label for="iUnit"><?= $this->getHtml('Unit'); ?></label>
<tr><td><?= $this->getData('unit-selector')->render('iUnit', 'unit', false); ?>
<tr><td><label for="iDescription"><?= $this->getHtml('Description') ?></label>
<tr><td><label for="iDescription"><?= $this->getHtml('Description'); ?></label>
<tr><td><?= $this->getData('editor')->render('department-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('department-editor', 'description', 'fDepartmentCreate'); ?>
</table>

View File

@ -28,22 +28,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 id="departmentList" 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('Parent') ?><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 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('Parent'); ?><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>
<tbody>
<?php $c = 0; foreach ($departments as $key => $value) : ++$c;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/department/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($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getUnit()->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('Parent'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getUnit()->getName()); ?></a>
<?php endforeach; ?>
<?php if ($c === 0) : ?>
<tr>

View File

@ -25,20 +25,20 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="iDepartment" action="<?= UriFactory::build('{/api}organization/department?{?}') ?>" method="POST">
<div class="portlet-head"><?= $this->getHtml('Department') ?></div>
<form id="iDepartment" action="<?= UriFactory::build('{/api}organization/department?{?}'); ?>" method="POST">
<div class="portlet-head"><?= $this->getHtml('Department'); ?></div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($department->getName()); ?>">
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><label for="iParent"><?= $this->getHtml('Parent'); ?></label>
<tr><td><?= $this->getData('department-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iUnit"><?= $this->getHtml('Unit') ?></label>
<tr><td><label for="iUnit"><?= $this->getHtml('Unit'); ?></label>
<tr><td><?= $this->getData('unit-selector')->render('iUnit', 'unit', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option><?= $this->getHtml('Active') ?>
<option><?= $this->getHtml('Inactive') ?>
<option><?= $this->getHtml('Active'); ?>
<option><?= $this->getHtml('Inactive'); ?>
</select>
<tr><td><?= $this->getData('editor')->render('department-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render(

View File

@ -21,19 +21,19 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="fPositionCreate" method="POST" action="<?= UriFactory::build('{/api}{/rootPath}{/lang}/api/organization/position'); ?>">
<div class="portlet-head"><?= $this->getHtml('Position') ?></div>
<div class="portlet-head"><?= $this->getHtml('Position'); ?></div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required>
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><label for="iParent"><?= $this->getHtml('Parent'); ?></label>
<tr><td><?= $this->getData('position-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iDepartment"><?= $this->getHtml('Department') ?></label>
<tr><td><label for="iDepartment"><?= $this->getHtml('Department'); ?></label>
<tr><td><?= $this->getData('department-selector')->render('iDepartment', 'department', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::ACTIVE); ?>"><?= $this->getHtml('Active') ?>
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::INACTIVE); ?>"><?= $this->getHtml('Inactive') ?>
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::ACTIVE); ?>"><?= $this->getHtml('Active'); ?>
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::INACTIVE); ?>"><?= $this->getHtml('Inactive'); ?>
</select>
<tr><td><?= $this->getData('editor')->render('position-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('position-editor', 'description', 'fPositionCreate'); ?>

View File

@ -29,22 +29,22 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Positions') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('Positions'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table id="positionList" 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('Parent') ?><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 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('Parent'); ?><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>
<tbody>
<?php $count = 0; foreach ($positions as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/position/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($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>
<td data-label="<?= $this->getHtml('Department') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getDepartment()->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('Parent'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>
<td data-label="<?= $this->getHtml('Department'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getDepartment()->getName()); ?></a>
<?php endforeach; ?>
<?php if ($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -25,20 +25,20 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="iPosition" action="<?= UriFactory::build('{/api}organization/position?{?}') ?>" method="POST">
<div class="portlet-head"><?= $this->getHtml('Position') ?></div>
<form id="iPosition" action="<?= UriFactory::build('{/api}organization/position?{?}'); ?>" method="POST">
<div class="portlet-head"><?= $this->getHtml('Position'); ?></div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($position->getName()); ?>">
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><label for="iParent"><?= $this->getHtml('Parent'); ?></label>
<tr><td><?= $this->getData('position-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iDepartment"><?= $this->getHtml('Department') ?></label>
<tr><td><label for="iDepartment"><?= $this->getHtml('Department'); ?></label>
<tr><td><?= $this->getData('department-selector')->render('iDepartment', 'department', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option><?= $this->getHtml('Active') ?>
<option><?= $this->getHtml('Inactive') ?>
<option><?= $this->getHtml('Active'); ?>
<option><?= $this->getHtml('Inactive'); ?>
</select>
<tr><td><?= $this->getData('editor')->render('position-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render(

View File

@ -22,20 +22,20 @@ echo $this->getData('nav')->render(); ?>
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="fUnitCreate" method="put" action="<?= UriFactory::build('{/api}organization/unit'); ?>">
<div class="portlet-head"><?= $this->getHtml('Unit') ?></div>
<div class="portlet-head"><?= $this->getHtml('Unit'); ?></div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" placeholder="&#xf040; Orange Management" required>
<tr><td><label for="iParent"><?= $this->getHtml('UnitLogo') ?></label>
<tr><td><img id="preview-logo" class="preview" src="#" accept="image/*" alt="<?= $this->getHtml('UnitLogo') ?>">
<tr><td><label for="iParent"><?= $this->getHtml('UnitLogo'); ?></label>
<tr><td><img id="preview-logo" class="preview" src="#" accept="image/*" alt="<?= $this->getHtml('UnitLogo'); ?>">
<tr><td><?= $this->getData('media-preview-upload')->render('fUnitCreate', 'logo', '/Modules/Organization'); ?>
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><label for="iParent"><?= $this->getHtml('Parent'); ?></label>
<tr><td><?= $this->getData('unit-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= $this->printHtml(Status::ACTIVE); ?>"><?= $this->getHtml('Active') ?>
<option value="<?= $this->printHtml(Status::INACTIVE); ?>"><?= $this->getHtml('Inactive') ?>
<option value="<?= $this->printHtml(Status::ACTIVE); ?>"><?= $this->getHtml('Active'); ?>
<option value="<?= $this->printHtml(Status::INACTIVE); ?>"><?= $this->getHtml('Inactive'); ?>
</select>
<tr><td><?= $this->getData('editor')->render('unit-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render('unit-editor', 'description', 'fUnitCreate'); ?>

View File

@ -29,14 +29,14 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12">
<div class="portlet">
<div class="portlet-head"><?= $this->getHtml('Units') ?><i class="fa fa-download floatRight download btn"></i></div>
<div class="portlet-head"><?= $this->getHtml('Units'); ?><i class="fa fa-download floatRight download btn"></i></div>
<table id="unitList" 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><?= $this->getHtml('Logo') ?>
<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('Parent') ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<td><?= $this->getHtml('Logo'); ?>
<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('Parent'); ?><i class="sort-asc fa fa-chevron-up"></i><i class="sort-desc fa fa-chevron-down"></i>
<tbody>
<?php foreach ($units as $key => $value) :
$url = UriFactory::build('{/prefix}organization/unit/profile?{?}&id=' . $value->getId()); ?>
@ -45,8 +45,8 @@ echo $this->getData('nav')->render(); ?>
<td><a href="<?= $url; ?>"><img class="profile-image" src="<?= $value->getImage() instanceof NullMedia ?
UriFactory::build('Web/Backend/img/user_default_' . \mt_rand(1, 6) .'.png') :
UriFactory::build('{/prefix}' . $value->getImage()->getPath()); ?>"></a>
<td data-label="<?= $this->getHtml('Name') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Parent') ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getName()); ?></a>
<td data-label="<?= $this->getHtml('Parent'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->getParent()->getName()); ?></a>
<?php endforeach; ?>
</table>
<div class="portlet-foot">

View File

@ -28,7 +28,7 @@ echo $this->getData('nav')->render(); ?>
<div class="row">
<div class="col-xs-12 col-md-6">
<div class="portlet">
<form id="iUnit" action="<?= UriFactory::build('{/api}organization/unit') ?>" method="post">
<form id="iUnit" action="<?= UriFactory::build('{/api}organization/unit'); ?>" method="post">
<div class="portlet-head row middle-xs">
<div class="col-xs-0">
<a id="iUnitUploadButton" href="#upload" data-action='[{"listener": "click", "key": 1, "action": [{"key": 1, "type": "event.prevent"}, {"key": 2, "type": "dom.click", "selector": "#iUnitUpload"}]}]'>
@ -42,18 +42,18 @@ echo $this->getData('nav')->render(); ?>
width="40x">
</a>
</div>
<div><?= $this->getHtml('Unit') ?></div>
<div><?= $this->getHtml('Unit'); ?></div>
</div>
<div class="portlet-body">
<table class="layout wf-100" style="table-layout: fixed">
<tr><td><label for="iName"><?= $this->getHtml('Name') ?></label>
<tr><td><label for="iName"><?= $this->getHtml('Name'); ?></label>
<tr><td><input type="text" name="name" id="iName" value="<?= $this->printHtml($unit->getName()); ?>">
<tr><td><label for="iParent"><?= $this->getHtml('Parent') ?></label>
<tr><td><label for="iParent"><?= $this->getHtml('Parent'); ?></label>
<tr><td><?= $this->getData('unit-selector')->render('iParent', 'parent', false); ?>
<tr><td><label for="iStatus"><?= $this->getHtml('Status') ?></label>
<tr><td><label for="iStatus"><?= $this->getHtml('Status'); ?></label>
<tr><td><select name="status" id="iStatus">
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::ACTIVE); ?>"<?= \Modules\Organization\Models\Status::ACTIVE === $unit->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('Active') ?>
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::INACTIVE); ?>"<?= \Modules\Organization\Models\Status::INACTIVE === $unit->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('Inactive') ?>
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::ACTIVE); ?>"<?= \Modules\Organization\Models\Status::ACTIVE === $unit->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('Active'); ?>
<option value="<?= $this->printHtml(\Modules\Organization\Models\Status::INACTIVE); ?>"<?= \Modules\Organization\Models\Status::INACTIVE === $unit->getStatus() ? ' selected' : ''; ?>><?= $this->getHtml('Inactive'); ?>
</select>
<tr><td><?= $this->getData('editor')->render('unit-editor'); ?>
<tr><td><?= $this->getData('editor')->getData('text')->render(

View File

@ -20,6 +20,7 @@ namespace Modules\Organization\tests\Admin;
class AdminTest extends \PHPUnit\Framework\TestCase
{
protected const MODULE_NAME = 'Organization';
protected const URI_LOAD = 'http://127.0.0.1/en/backend/organization';
use \Modules\tests\ModuleTestTrait;

View File

@ -40,6 +40,7 @@ use phpOMS\Utils\TestUtils;
class ControllerTest extends \PHPUnit\Framework\TestCase
{
protected $app = null;
protected $module = null;
protected function setUp() : void