registration fixes

This commit is contained in:
Dennis Eichhorn 2023-03-24 16:20:24 +01:00
parent 8dab18e60c
commit bad7cae26e
114 changed files with 267 additions and 253 deletions

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Admin * @package Modules\Organization\Admin
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Admin\Install * @package Modules\Organization\Admin\Install
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Application\ApplicationAbstract;
* Admin class. * Admin class.
* *
* @package Modules\Organization\Admin\Install * @package Modules\Organization\Admin\Install
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Admin\Install * @package Modules\Organization\Admin\Install
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Application\ApplicationAbstract;
* Media class. * Media class.
* *
* @package Modules\Organization\Admin\Install * @package Modules\Organization\Admin\Install
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Media * @package Modules\Media
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Media * @package Modules\Media
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -19,7 +19,7 @@
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Organigram", "name": "Organigram",
"uri": "{/lang}/{/app}/organization/organigram?{?}", "uri": "{/base}/organization/organigram?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 1, "order": 1,
@ -38,7 +38,7 @@
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Units", "name": "Units",
"uri": "{/lang}/{/app}/organization/unit/list", "uri": "{/base}/organization/unit/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -52,7 +52,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/lang}/{/app}/organization/unit/list", "uri": "{/base}/organization/unit/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -67,7 +67,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Create", "name": "Create",
"uri": "{/lang}/{/app}/organization/unit/create?{?}", "uri": "{/base}/organization/unit/create?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 25, "order": 25,
@ -84,7 +84,7 @@
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Departments", "name": "Departments",
"uri": "{/lang}/{/app}/organization/department/list", "uri": "{/base}/organization/department/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 10, "order": 10,
@ -98,7 +98,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/lang}/{/app}/organization/department/list", "uri": "{/base}/organization/department/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -113,7 +113,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Create", "name": "Create",
"uri": "{/lang}/{/app}/organization/department/create?{?}", "uri": "{/base}/organization/department/create?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 25, "order": 25,
@ -130,7 +130,7 @@
"type": 2, "type": 2,
"subtype": 1, "subtype": 1,
"name": "Positions", "name": "Positions",
"uri": "{/lang}/{/app}/organization/position/list", "uri": "{/base}/organization/position/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 20, "order": 20,
@ -144,7 +144,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "List", "name": "List",
"uri": "{/lang}/{/app}/organization/position/list", "uri": "{/base}/organization/position/list",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 5, "order": 5,
@ -159,7 +159,7 @@
"type": 3, "type": 3,
"subtype": 1, "subtype": 1,
"name": "Create", "name": "Create",
"uri": "{/lang}/{/app}/organization/position/create?{?}", "uri": "{/base}/organization/position/create?{?}",
"target": "self", "target": "self",
"icon": null, "icon": null,
"order": 25, "order": 25,

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Admin\Install * @package Modules\Organization\Admin\Install
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Application\ApplicationAbstract;
* Navigation class. * Navigation class.
* *
* @package Modules\Organization\Admin\Install * @package Modules\Organization\Admin\Install
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Admin * @package Modules\Organization\Admin
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -28,7 +28,7 @@ use phpOMS\Uri\HttpUri;
* Installer class. * Installer class.
* *
* @package Modules\Organization\Admin * @package Modules\Organization\Admin
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules * @package Modules
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules * @package Modules
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Admin * @package Modules\Organization\Admin
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Module\StatusAbstract;
* Status class. * Status class.
* *
* @package Modules\Organization\Admin * @package Modules\Organization\Admin
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Admin * @package Modules\Organization\Admin
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Module\UninstallerAbstract;
* Uninstaller class. * Uninstaller class.
* *
* @package Modules\Organization\Admin * @package Modules\Organization\Admin
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Admin * @package Modules\Organization\Admin
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -23,7 +23,7 @@ use phpOMS\System\File\Local\Directory;
* Navigation class. * Navigation class.
* *
* @package Modules\Organization\Admin * @package Modules\Organization\Admin
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -60,7 +60,7 @@ use phpOMS\Utils\Parser\Markdown\Markdown;
* Organization Controller class. * Organization Controller class.
* *
* @package Modules\Organization * @package Modules\Organization
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */
@ -84,7 +84,7 @@ final class ApiController extends Controller
&& !\is_numeric($request->getData('parent')) && !\is_numeric($request->getData('parent'))
)) ))
|| ($val['status'] = ( || ($val['status'] = (
$request->getData('status') === null !$request->hasData('status')
|| !Status::isValidValue((int) $request->getData('status')) || !Status::isValidValue((int) $request->getData('status'))
)) ))
) { ) {
@ -153,7 +153,7 @@ final class ApiController extends Controller
$parent = (int) $request->getData('parent'); $parent = (int) $request->getData('parent');
$unit->parent = !empty($parent) ? new NullUnit($parent) : $unit->parent; $unit->parent = !empty($parent) ? new NullUnit($parent) : $unit->parent;
$unit->setStatus((int) ($request->getData('status') ?? $unit->getStatus())); $unit->setStatus($request->getDataInt('status') ?? $unit->getStatus());
return $unit; return $unit;
} }
@ -259,12 +259,12 @@ final class ApiController extends Controller
} }
/** @var Unit $unit */ /** @var Unit $unit */
$unit = UnitMapper::get()->with('mainAddress')->where('id', $request->getData('unit'))->execute(); $unit = UnitMapper::get()->with('mainAddress')->where('id', $request->getData('unit'))->execute();
$oldUnit = clone $unit; $oldUnit = clone $unit;
if ($unit->mainAddress->getId() !== 0) { if ($unit->mainAddress->getId() !== 0) {
$oldAddr = clone $unit->mainAddress; $oldAddr = clone $unit->mainAddress;
$addr = $this->updateUnitMainAddressFromRequest($request, $unit); $addr = $this->updateUnitMainAddressFromRequest($request, $unit);
$this->updateModel($request->header->account, $oldAddr, $addr, AddressMapper::class, 'address', $request->getOrigin()); $this->updateModel($request->header->account, $oldAddr, $addr, AddressMapper::class, 'address', $request->getOrigin());
} else { } else {
@ -311,12 +311,12 @@ final class ApiController extends Controller
private function createUnitMainAddressFromRequest(RequestAbstract $request) : Address private function createUnitMainAddressFromRequest(RequestAbstract $request) : Address
{ {
$addr = new Address(); $addr = new Address();
$addr->name = (string) ($request->getData('legal') ?? ''); $addr->name = $request->getDataString('legal') ?? '';
$addr->address = (string) ($request->getData('address') ?? ''); $addr->address = $request->getDataString('address') ?? '';
$addr->postal = (string) ($request->getData('postal') ?? ''); $addr->postal = $request->getDataString('postal') ?? '';
$addr->city = (string) ($request->getData('city') ?? ''); $addr->city = $request->getDataString('city') ?? '';
$addr->setCountry($request->getData('country') ?? ISO3166TwoEnum::_XXX); $addr->state = $request->getDataString('state') ?? '';
$addr->state = (string) ($request->getData('state') ?? ''); $addr->setCountry($request->getDataString('country') ?? ISO3166TwoEnum::_XXX);
return $addr; return $addr;
} }
@ -333,12 +333,12 @@ final class ApiController extends Controller
private function updateUnitMainAddressFromRequest(RequestAbstract $request, Unit $unit) : Address private function updateUnitMainAddressFromRequest(RequestAbstract $request, Unit $unit) : Address
{ {
$addr = $unit->mainAddress; $addr = $unit->mainAddress;
$addr->name = (string) ($request->getData('legal') ?? ''); $addr->name = $request->getDataString('legal') ?? '';
$addr->address = (string) ($request->getData('address') ?? ''); $addr->address = $request->getDataString('address') ?? '';
$addr->postal = (string) ($request->getData('postal') ?? ''); $addr->postal = $request->getDataString('postal') ?? '';
$addr->city = (string) ($request->getData('city') ?? ''); $addr->city = $request->getDataString('city') ?? '';
$addr->setCountry($request->getData('country') ?? ISO3166TwoEnum::_XXX); $addr->state = $request->getDataString('state') ?? '';
$addr->state = (string) ($request->getData('state') ?? ''); $addr->setCountry($request->getDataString('country') ?? ISO3166TwoEnum::_XXX);
return $addr; return $addr;
} }
@ -356,20 +356,21 @@ final class ApiController extends Controller
{ {
$unit = new Unit(); $unit = new Unit();
$unit->name = (string) $request->getData('name'); $unit->name = (string) $request->getData('name');
$unit->descriptionRaw = (string) ($request->getData('description') ?? ''); $unit->descriptionRaw = $request->getDataString('description') ?? '';
$unit->description = Markdown::parse((string) ($request->getData('description') ?? '')); $unit->description = Markdown::parse($request->getDataString('description') ?? '');
$unit->parent = new NullUnit((int) $request->getData('parent')); $unit->parent = new NullUnit((int) $request->getData('parent'));
$unit->setStatus((int) $request->getData('status')); $unit->setStatus((int) $request->getData('status'));
if ($request->hasData('address')) { if ($request->hasData('address')) {
$addr = new Address(); $addr = new Address();
$addr->name = (string) ($request->getData('legal') ?? ($request->getData('name') ?? '')); $addr->name = $request->getDataString('legal') ?? ($request->getDataString('name') ?? '');
$addr->address = (string) ($request->getData('address') ?? ''); $addr->address = $request->getDataString('address') ?? '';
$addr->postal = (string) ($request->getData('postal') ?? ''); $addr->postal = $request->getDataString('postal') ?? '';
$addr->city = (string) ($request->getData('city') ?? ''); $addr->city = $request->getDataString('city') ?? '';
$addr->setCountry($request->getData('country') ?? ISO3166TwoEnum::_XXX); $addr->state = $request->getDataString('state') ?? '';
$addr->state = (string) ($request->getData('state') ?? ''); $addr->setCountry($request->getDataString('country') ?? ISO3166TwoEnum::_XXX);
$unit->mainAddress = $addr; $unit->mainAddress = $addr;
} }
@ -400,7 +401,7 @@ final class ApiController extends Controller
} }
/** @var Unit $unit */ /** @var Unit $unit */
$unit = UnitMapper::get()->where('id', (int) ($request->getData('id') ?? 0))->execute(); $unit = UnitMapper::get()->where('id', $request->getDataInt('id') ?? 0)->execute();
$old = clone $unit; $old = clone $unit;
$path = '/Modules/Organization/' . $unit->name; $path = '/Modules/Organization/' . $unit->name;
@ -439,7 +440,7 @@ final class ApiController extends Controller
&& !\is_numeric($request->getData('parent')) && !\is_numeric($request->getData('parent'))
)) ))
|| ($val['status'] = ( || ($val['status'] = (
$request->getData('status') === null !$request->hasData('status')
|| !Status::isValidValue((int) $request->getData('status')) || !Status::isValidValue((int) $request->getData('status'))
)) ))
) { ) {
@ -532,7 +533,7 @@ final class ApiController extends Controller
$department = (int) $request->getData('department'); $department = (int) $request->getData('department');
$position->department = !empty($department) ? new NullDepartment($department) : $position->department; $position->department = !empty($department) ? new NullDepartment($department) : $position->department;
$position->setStatus((int) ($request->getData('status') ?? $position->getStatus())); $position->setStatus($request->getDataInt('status') ?? $position->getStatus());
return $position; return $position;
} }
@ -589,8 +590,8 @@ final class ApiController extends Controller
$position = new Position(); $position = new Position();
$position->name = (string) ($request->getData('name')); $position->name = (string) ($request->getData('name'));
$position->setStatus((int) $request->getData('status')); $position->setStatus((int) $request->getData('status'));
$position->descriptionRaw = (string) ($request->getData('description') ?? ''); $position->descriptionRaw = $request->getDataString('description') ?? '';
$position->description = Markdown::parse((string) ($request->getData('description') ?? '')); $position->description = Markdown::parse($request->getDataString('description') ?? '');
$position->parent = new NullPosition((int) $request->getData('parent')); $position->parent = new NullPosition((int) $request->getData('parent'));
$position->department = new NullDepartment((int) $request->getData('department')); $position->department = new NullDepartment((int) $request->getData('department'));
@ -683,7 +684,7 @@ final class ApiController extends Controller
$parent = (int) $request->getData('parent'); $parent = (int) $request->getData('parent');
$department->parent = !empty($parent) ? new NullDepartment($parent) : $department->parent; $department->parent = !empty($parent) ? new NullDepartment($parent) : $department->parent;
$department->setStatus((int) ($request->getData('status') ?? $department->getStatus())); $department->setStatus($request->getDataInt('status') ?? $department->getStatus());
$unit = (int) $request->getData('unit'); $unit = (int) $request->getData('unit');
$department->unit = !empty($unit) ? new NullUnit($unit) : $department->unit; $department->unit = !empty($unit) ? new NullUnit($unit) : $department->unit;
@ -767,9 +768,9 @@ final class ApiController extends Controller
$department->setStatus((int) $request->getData('status')); $department->setStatus((int) $request->getData('status'));
$department->parent = new NullDepartment((int) $request->getData('parent')); $department->parent = new NullDepartment((int) $request->getData('parent'));
$department->unit = new NullUnit((int) ($request->getData('unit') ?? 1)); $department->unit = new NullUnit($request->getDataInt('unit') ?? 1);
$department->descriptionRaw = (string) ($request->getData('description') ?? ''); $department->descriptionRaw = $request->getDataString('description') ?? '';
$department->description = Markdown::parse((string) ($request->getData('description') ?? '')); $department->description = Markdown::parse($request->getDataString('description') ?? '');
return $department; return $department;
} }
@ -789,12 +790,15 @@ final class ApiController extends Controller
*/ */
public function apiUnitFind(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void public function apiUnitFind(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
/** @var \Modules\Organization\Models\Unit[] $units */
$units = UnitMapper::getAll()
->where('name', '%' . ($request->getDataString('search') ?? '') . '%', 'LIKE')
->execute();
$response->header->set('Content-Type', MimeType::M_JSON, true); $response->header->set('Content-Type', MimeType::M_JSON, true);
$response->set( $response->set(
$request->uri->__toString(), $request->uri->__toString(),
\array_values( \array_values($units)
UnitMapper::getAll()->where('name', '%' . ($request->getData('search') ?? '') . '%', 'LIKE')->execute()
)
); );
} }
@ -813,12 +817,15 @@ final class ApiController extends Controller
*/ */
public function apiDepartmentFind(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void public function apiDepartmentFind(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
/** @var \Modules\Organization\Models\Department[] $departments */
$departments = DepartmentMapper::getAll()
->where('name', '%' . ($request->getDataString('search') ?? '') . '%', 'LIKE')
->execute();
$response->header->set('Content-Type', MimeType::M_JSON, true); $response->header->set('Content-Type', MimeType::M_JSON, true);
$response->set( $response->set(
$request->uri->__toString(), $request->uri->__toString(),
\array_values( \array_values($departments)
DepartmentMapper::getAll()->where('name', '%' . ($request->getData('search') ?? '') . '%', 'LIKE')->execute()
)
); );
} }
@ -837,12 +844,15 @@ final class ApiController extends Controller
*/ */
public function apiPositionFind(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void public function apiPositionFind(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
{ {
/** @var \Modules\Organization\Models\Position[] $positions */
$positions = PositionMapper::getAll()
->where('name', '%' . ($request->getDataString('search') ?? '') . '%', 'LIKE')
->execute();
$response->header->set('Content-Type', MimeType::M_JSON, true); $response->header->set('Content-Type', MimeType::M_JSON, true);
$response->set( $response->set(
$request->uri->__toString(), $request->uri->__toString(),
\array_values( \array_values($positions)
PositionMapper::getAll()->where('name', '%' . ($request->getData('search') ?? '') . '%', 'LIKE')->execute()
)
); );
} }
@ -889,7 +899,7 @@ final class ApiController extends Controller
$attribute->unit = (int) $request->getData('unit'); $attribute->unit = (int) $request->getData('unit');
$attribute->type = new NullUnitAttributeType((int) $request->getData('type')); $attribute->type = new NullUnitAttributeType((int) $request->getData('type'));
if ($request->getData('value') !== null) { if ($request->hasData('value')) {
$attribute->value = new NullUnitAttributeValue((int) $request->getData('value')); $attribute->value = new NullUnitAttributeValue((int) $request->getData('value'));
} else { } else {
$newRequest = clone $request; $newRequest = clone $request;
@ -964,11 +974,11 @@ final class ApiController extends Controller
private function createUnitAttributeTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n private function createUnitAttributeTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n
{ {
$attrL11n = new BaseStringL11n(); $attrL11n = new BaseStringL11n();
$attrL11n->ref = (int) ($request->getData('type') ?? 0); $attrL11n->ref = $request->getDataInt('type') ?? 0;
$attrL11n->setLanguage((string) ( $attrL11n->setLanguage(
$request->getData('language') ?? $request->getLanguage() $request->getDataString('language') ?? $request->getLanguage()
)); );
$attrL11n->content = (string) ($request->getData('title') ?? ''); $attrL11n->content = $request->getDataString('title') ?? '';
return $attrL11n; return $attrL11n;
} }
@ -1033,13 +1043,13 @@ final class ApiController extends Controller
*/ */
private function createUnitAttributeTypeFromRequest(RequestAbstract $request) : UnitAttributeType private function createUnitAttributeTypeFromRequest(RequestAbstract $request) : UnitAttributeType
{ {
$attrType = new UnitAttributeType($request->getData('name') ?? ''); $attrType = new UnitAttributeType($request->getDataString('name') ?? '');
$attrType->datatype = (int) ($request->getData('datatype') ?? 0); $attrType->datatype = $request->getDataInt('datatype') ?? 0;
$attrType->custom = (bool) ($request->getData('custom') ?? false); $attrType->custom = $request->getDataBool('custom') ?? false;
$attrType->isRequired = (bool) ($request->getData('is_required') ?? false); $attrType->isRequired = (bool) ($request->getData('is_required') ?? false);
$attrType->validationPattern = (string) ($request->getData('validation_pattern') ?? ''); $attrType->validationPattern = $request->getDataString('validation_pattern') ?? '';
$attrType->setL11n((string) ($request->getData('title') ?? ''), $request->getData('language') ?? ISO639x1Enum::_EN); $attrType->setL11n($request->getDataString('title') ?? '', $request->getDataString('language') ?? ISO639x1Enum::_EN);
$attrType->setFields((int) ($request->getData('fields') ?? 0)); $attrType->setFields($request->getDataInt('fields') ?? 0);
return $attrType; return $attrType;
} }
@ -1115,15 +1125,18 @@ final class ApiController extends Controller
{ {
/** @var UnitAttributeType $type */ /** @var UnitAttributeType $type */
$type = UnitAttributeTypeMapper::get() $type = UnitAttributeTypeMapper::get()
->where('id', (int) ($request->getData('type') ?? 0)) ->where('id', $request->getDataInt('type') ?? 0)
->execute(); ->execute();
$attrValue = new UnitAttributeValue(); $attrValue = new UnitAttributeValue();
$attrValue->isDefault = (bool) ($request->getData('default') ?? false); $attrValue->isDefault = $request->getDataBool('default') ?? false;
$attrValue->setValue($request->getData('value'), $type->datatype); $attrValue->setValue($request->getData('value'), $type->datatype);
if ($request->getData('title') !== null) { if ($request->hasData('title')) {
$attrValue->setL11n($request->getData('title'), $request->getData('language') ?? ISO639x1Enum::_EN); $attrValue->setL11n(
$request->getDataString('title') ?? '',
$request->getDataString('language') ?? ISO639x1Enum::_EN
);
} }
return $attrValue; return $attrValue;
@ -1189,11 +1202,11 @@ final class ApiController extends Controller
private function createUnitAttributeValueL11nFromRequest(RequestAbstract $request) : BaseStringL11n private function createUnitAttributeValueL11nFromRequest(RequestAbstract $request) : BaseStringL11n
{ {
$attrL11n = new BaseStringL11n(); $attrL11n = new BaseStringL11n();
$attrL11n->ref = (int) ($request->getData('value') ?? 0); $attrL11n->ref = $request->getDataInt('value') ?? 0;
$attrL11n->setLanguage((string) ( $attrL11n->setLanguage(
$request->getData('language') ?? $request->getLanguage() $request->getDataString('language') ?? $request->getLanguage()
)); );
$attrL11n->content = (string) ($request->getData('title') ?? ''); $attrL11n->content = $request->getDataString('title') ?? '';
return $attrL11n; return $attrL11n;
} }

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -30,7 +30,7 @@ use phpOMS\Views\View;
* Organization Controller class. * Organization Controller class.
* *
* @package Modules\Organization * @package Modules\Organization
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore
@ -62,9 +62,9 @@ final class BackendController extends Controller
->limit(25); ->limit(25);
if ($request->getData('ptype') === 'p') { if ($request->getData('ptype') === 'p') {
$view->setData('units', $mapper->where('id', (int) ($request->getData('id') ?? 0), '<')->execute()); $view->setData('units', $mapper->where('id', $request->getDataInt('id') ?? 0, '<')->execute());
} elseif ($request->getData('ptype') === 'n') { } elseif ($request->getData('ptype') === 'n') {
$view->setData('units', $mapper->where('id', (int) ($request->getData('id') ?? 0), '>')->execute()); $view->setData('units', $mapper->where('id', $request->getDataInt('id') ?? 0, '>')->execute());
} else { } else {
$view->setData('units', $mapper->where('id', 0, '>')->execute()); $view->setData('units', $mapper->where('id', 0, '>')->execute());
} }
@ -253,16 +253,17 @@ final class BackendController extends Controller
$mapper = DepartmentMapper::getAll()->with('parent')->with('unit')->limit($pageLimit + 1); $mapper = DepartmentMapper::getAll()->with('parent')->with('unit')->limit($pageLimit + 1);
/** @var \Modules\Organization\Models\Department[] $departments */
$departments = [];
if ($request->getData('ptype') === 'p') { if ($request->getData('ptype') === 'p') {
$departments = $mapper->where('id', (int) ($request->getData('id') ?? 0), '<')->execute(); $mapper->where('id', $request->getDataInt('id') ?? 0, '<');
} elseif ($request->getData('ptype') === 'n') { } elseif ($request->getData('ptype') === 'n') {
$departments = $mapper->where('id', (int) ($request->getData('id') ?? 0), '>')->execute(); $mapper->where('id', $request->getDataInt('id') ?? 0, '>');
} else { } else {
$departments = $mapper->where('id', 0, '>')->execute(); $mapper->where('id', 0, '>');
} }
/** @var \Modules\Organization\Models\Department[] $departments */
$departments = $mapper->execute();
$view->setData('hasMore', ($count = \count($departments)) > $pageLimit); $view->setData('hasMore', ($count = \count($departments)) > $pageLimit);
if ($count > $pageLimit) { if ($count > $pageLimit) {
@ -357,9 +358,9 @@ final class BackendController extends Controller
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1004705001, $request, $response)); $view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1004705001, $request, $response));
if ($request->getData('ptype') === 'p') { if ($request->getData('ptype') === 'p') {
$view->setData('positions', PositionMapper::getAll()->with('parent')->with('department')->where('id', (int) ($request->getData('id') ?? 0), '<')->limit(25)->execute()); $view->setData('positions', PositionMapper::getAll()->with('parent')->with('department')->where('id', $request->getDataInt('id') ?? 0, '<')->limit(25)->execute());
} elseif ($request->getData('ptype') === 'n') { } elseif ($request->getData('ptype') === 'n') {
$view->setData('positions', PositionMapper::getAll()->with('parent')->with('department')->where('id', (int) ($request->getData('id') ?? 0), '>')->limit(25)->execute()); $view->setData('positions', PositionMapper::getAll()->with('parent')->with('department')->where('id', $request->getDataInt('id') ?? 0, '>')->limit(25)->execute());
} else { } else {
$view->setData('positions', PositionMapper::getAll()->with('parent')->with('department')->where('id', 0, '>')->limit(25)->execute()); $view->setData('positions', PositionMapper::getAll()->with('parent')->with('department')->where('id', 0, '>')->limit(25)->execute());
} }

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Module\ModuleAbstract;
* Organization Controller class. * Organization Controller class.
* *
* @package Modules\Organization * @package Modules\Organization
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Attribute value type enum. * Attribute value type enum.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -18,7 +18,7 @@ namespace Modules\Organization\Models;
* Organization department class. * Organization department class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Organization department mapper class. * Organization department mapper class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -18,7 +18,7 @@ namespace Modules\Organization\Models;
* Organization null class. * Organization null class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -18,7 +18,7 @@ namespace Modules\Organization\Models;
* Organization null class. * Organization null class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use Modules\Media\Models\NullMedia;
* Organization null class. * Organization null class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -18,7 +18,7 @@ namespace Modules\Organization\Models;
* Null model * Null model
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -18,7 +18,7 @@ namespace Modules\Organization\Models;
* Null model * Null model
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -18,7 +18,7 @@ namespace Modules\Organization\Models;
* Null model * Null model
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Permision state enum. * Permision state enum.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -18,7 +18,7 @@ namespace Modules\Organization\Models;
* Organization position class. * Organization position class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Organization position mapper class. * Organization position mapper class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Module settings enum. * Module settings enum.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\Stdlib\Base\Enum;
* Accept status enum. * Accept status enum.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -22,7 +22,7 @@ use Modules\Media\Models\NullMedia;
* Organization unit class. * Organization unit class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */
@ -103,8 +103,8 @@ class Unit implements \JsonSerializable
*/ */
public function __construct() public function __construct()
{ {
$this->image = new NullMedia(); $this->image = new NullMedia();
$this->parent = new NullUnit(); $this->parent = new NullUnit();
$this->mainAddress = new NullAddress(); $this->mainAddress = new NullAddress();
} }

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -18,7 +18,7 @@ namespace Modules\Organization\Models;
* Unit class. * Unit class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Unit mapper class. * Unit mapper class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -21,7 +21,7 @@ use phpOMS\Localization\ISO639x1Enum;
* Unit Attribute Type class. * Unit Attribute Type class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */
@ -143,7 +143,7 @@ class UnitAttributeType implements \JsonSerializable
if ($l11n instanceof BaseStringL11n) { if ($l11n instanceof BaseStringL11n) {
$this->l11n = $l11n; $this->l11n = $l11n;
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) { } elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
$this->l11n->content = $l11n; $this->l11n->content = $l11n;
$this->l11n->setLanguage($lang); $this->l11n->setLanguage($lang);
} else { } else {
$this->l11n = new BaseStringL11n(); $this->l11n = new BaseStringL11n();

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -21,7 +21,7 @@ use phpOMS\Localization\BaseStringL11n;
* Unit mapper class. * Unit mapper class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Unit mapper class. * Unit mapper class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -23,7 +23,7 @@ use phpOMS\Localization\ISO639x1Enum;
* The relation with the type/bill is defined in the UnitAttribute class. * The relation with the type/bill is defined in the UnitAttribute class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */
@ -135,7 +135,7 @@ class UnitAttributeValue implements \JsonSerializable
if ($l11n instanceof BaseStringL11n) { if ($l11n instanceof BaseStringL11n) {
$this->l11n = $l11n; $this->l11n = $l11n;
} elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) { } elseif (isset($this->l11n) && $this->l11n instanceof BaseStringL11n) {
$this->l11n->content = $l11n; $this->l11n->content = $l11n;
$this->l11n->setLanguage($lang); $this->l11n->setLanguage($lang);
} else { } else {
$this->l11n = new BaseStringL11n(); $this->l11n = new BaseStringL11n();

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -21,7 +21,7 @@ use phpOMS\Localization\BaseStringL11n;
* Unit mapper class. * Unit mapper class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,7 +20,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Unit mapper class. * Unit mapper class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -22,7 +22,7 @@ use phpOMS\DataStorage\Database\Mapper\DataMapperFactory;
* Organization unit mapper class. * Organization unit mapper class.
* *
* @package Modules\Organization\Models * @package Modules\Organization\Models
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -23,7 +23,7 @@ use phpOMS\Views\View;
* Component view. * Component view.
* *
* @package Modules\Organization * @package Modules\Organization
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -23,7 +23,7 @@ use phpOMS\Views\View;
* Component view. * Component view.
* *
* @package Modules\Organization * @package Modules\Organization
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore

View File

@ -5,9 +5,9 @@
{ {
"key": 1, "listener": "click", "action": [ "key": 1, "listener": "click", "action": [
{"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->getId(); ?>"}, {"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->getId(); ?>"},
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"}, {"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/base}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}, {"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1},
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"}, {"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/base}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1} {"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}
] ]
} }

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -23,7 +23,7 @@ use phpOMS\Views\View;
* Component view. * Component view.
* *
* @package Modules\Organization * @package Modules\Organization
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -23,7 +23,7 @@ use phpOMS\Views\View;
* Component view. * Component view.
* *
* @package Modules\Organization * @package Modules\Organization
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore

View File

@ -5,9 +5,9 @@
{ {
"key": 1, "listener": "click", "action": [ "key": 1, "listener": "click", "action": [
{"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->getId(); ?>"}, {"key": 1, "type": "dom.popup", "selector": "#acc-grp-tpl", "aniIn": "fadeIn", "id": "<?= $this->getId(); ?>"},
{"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"}, {"key": 2, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/base}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}, {"key": 3, "type": "dom.table.append", "id": "acc-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1},
{"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/lang}/{/app}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"}, {"key": 4, "type": "message.request", "uri": "<?= \phpOMS\Uri\UriFactory::build('{/base}/admin/account?filter=some&limit=10'); ?>", "method": "GET", "request_type": "json"},
{"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1} {"key": 5, "type": "dom.table.append", "id": "grp-table", "aniIn": "fadeIn", "data": [], "bindings": {"id": "id", "name": "name"}, "position": -1}
] ]
} }

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -23,7 +23,7 @@ use phpOMS\Views\View;
* Component view. * Component view.
* *
* @package Modules\Organization * @package Modules\Organization
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -23,7 +23,7 @@ use phpOMS\Views\View;
* Component view. * Component view.
* *
* @package Modules\Organization * @package Modules\Organization
* @license OMS License 1.0 * @license OMS License 2.0
* @link https://jingga.app * @link https://jingga.app
* @since 1.0.0 * @since 1.0.0
* @codeCoverageIgnore * @codeCoverageIgnore

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Localization * @package Modules\Localization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -90,12 +90,12 @@ echo $this->getData('nav')->render(); ?>
<tbody> <tbody>
<?php $c = 0; <?php $c = 0;
foreach ($departments as $key => $value) : ++$c; foreach ($departments as $key => $value) : ++$c;
$url = UriFactory::build('{/lang}/{/app}/organization/department/profile?{?}&id=' . $value->getId()); ?> $url = UriFactory::build('{/base}/organization/department/profile?{?}&id=' . $value->getId()); ?>
<tr tabindex="0" data-href="<?= $url; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a> <td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a> <td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/organization/department/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a> <td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('{/base}/organization/department/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/organization/unit/profile?{?}&id=' . $value->unit->getId()); ?>"><?= $this->printHtml($value->unit->name); ?></a> <td data-label="<?= $this->getHtml('Name'); ?>"><a class="content" href="<?= UriFactory::build('{/base}/organization/unit/profile?{?}&id=' . $value->unit->getId()); ?>"><?= $this->printHtml($value->unit->name); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php if ($c === 0) : ?> <?php if ($c === 0) : ?>
<tr> <tr>

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */
@ -20,8 +20,8 @@ use phpOMS\Uri\UriFactory;
*/ */
$positions = $this->getData('positions') ?? []; $positions = $this->getData('positions') ?? [];
$previous = empty($positions) ? 'organization/position/list' : '{/lang}/{/app}/organization/position/list?{?}&id=' . \reset($positions)->getId() . '&ptype=p'; $previous = empty($positions) ? 'organization/position/list' : '{/base}/organization/position/list?{?}&id=' . \reset($positions)->getId() . '&ptype=p';
$next = empty($positions) ? 'organization/position/list' : '{/lang}/{/app}/organization/position/list?{?}&id=' . \end($positions)->getId() . '&ptype=n'; $next = empty($positions) ? 'organization/position/list' : '{/base}/organization/position/list?{?}&id=' . \end($positions)->getId() . '&ptype=n';
echo $this->getData('nav')->render(); ?> echo $this->getData('nav')->render(); ?>
@ -87,8 +87,8 @@ echo $this->getData('nav')->render(); ?>
<tr tabindex="0" data-href="<?= $url; ?>"> <tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a> <td data-label="<?= $this->getHtml('ID', '0', '0'); ?>"><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a> <td data-label="<?= $this->getHtml('Name'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->name); ?></a>
<td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/organization/position/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a> <td data-label="<?= $this->getHtml('Parent'); ?>"><a class="content" href="<?= UriFactory::build('{/base}/organization/position/profile?{?}&id=' . $value->parent->getId()); ?>"><?= $this->printHtml($value->parent->name); ?></a>
<td data-label="<?= $this->getHtml('Department'); ?>"><a class="content" href="<?= UriFactory::build('{/lang}/{/app}/organization/department/profile?{?}&id=' . $value->department->getId()); ?>"><?= $this->printHtml($value->department->name); ?></a> <td data-label="<?= $this->getHtml('Department'); ?>"><a class="content" href="<?= UriFactory::build('{/base}/organization/department/profile?{?}&id=' . $value->department->getId()); ?>"><?= $this->printHtml($value->department->name); ?></a>
<?php endforeach; ?> <?php endforeach; ?>
<?php if ($count === 0) : ?> <?php if ($count === 0) : ?>
<tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?> <tr><td colspan="5" class="empty"><?= $this->getHtml('Empty', '0', '0'); ?>

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

View File

@ -6,7 +6,7 @@
* *
* @package Modules\Organization * @package Modules\Organization
* @copyright Dennis Eichhorn * @copyright Dennis Eichhorn
* @license OMS License 1.0 * @license OMS License 2.0
* @version 1.0.0 * @version 1.0.0
* @link https://jingga.app * @link https://jingga.app
*/ */

Some files were not shown because too many files have changed in this diff Show More