This commit is contained in:
Dennis Eichhorn 2024-10-11 22:12:29 +00:00
parent 876f897c0e
commit 12c902af70
5 changed files with 7 additions and 7 deletions

View File

@ -311,7 +311,7 @@ final class ApiController extends Controller
$unit->descriptionRaw = $request->getDataString('description') ?? '';
$unit->description = Markdown::parse($request->getDataString('description') ?? '');
$unit->parent = new NullUnit((int) $request->getData('unit'));
$unit->parent = new NullUnit((int) $request->getData('parent'));
$unit->status = Status::tryFromValue($request->getDataInt('status')) ?? Status::ACTIVE;
if ($request->hasData('address') || $request->hasData('legal')) {
@ -598,7 +598,7 @@ final class ApiController extends Controller
$position->status = Status::tryFromValue($request->getDataInt('status')) ?? Status::ACTIVE;
$position->descriptionRaw = $request->getDataString('description') ?? '';
$position->description = Markdown::parse($request->getDataString('description') ?? '');
$position->parent = new NullPosition((int) $request->getData('position'));
$position->parent = new NullPosition((int) $request->getData('parent'));
$position->department = new NullDepartment((int) $request->getData('department'));
return $position;
@ -772,7 +772,7 @@ final class ApiController extends Controller
$department->name = (string) $request->getData('name');
$department->status = Status::tryFromValue($request->getDataInt('status')) ?? Status::ACTIVE;
$department->parent = new NullDepartment((int) $request->getData('department'));
$department->parent = new NullDepartment((int) $request->getData('parent'));
$department->unit = new NullUnit($request->getDataInt('unit') ?? 1);
$department->descriptionRaw = $request->getDataString('description') ?? '';
$department->description = Markdown::parse($request->getDataString('description') ?? '');

View File

@ -42,7 +42,7 @@ echo $this->data['nav']->render(); ?>
<div id="iParentSelector" class="smart-input-wrapper" data-src="<?= UriFactory::build('{/api}organization/department/find?csrf={$CSRF}'); ?>">
<div
data-value=""
data-name="department"
data-name="parent"
data-limit="10"
data-container=""
class="input-div"

View File

@ -44,7 +44,7 @@ echo $this->data['nav']->render(); ?>
<div id="iParentSelector" class="smart-input-wrapper" data-src="<?= UriFactory::build('{/api}organization/position/find?csrf={$CSRF}'); ?>">
<div
data-value=""
data-name="position"
data-name="parent"
data-limit="10"
data-container=""
class="input-div"

View File

@ -42,7 +42,7 @@ echo $this->data['nav']->render(); ?>
<div id="iParentSelector" class="smart-input-wrapper" data-src="<?= UriFactory::build('{/api}organization/unit/find?csrf={$CSRF}'); ?>">
<div
data-value=""
data-name="unit"
data-name="parent"
data-limit="10"
data-container=""
class="input-div"

View File

@ -73,7 +73,7 @@ echo $this->data['nav']->render(); ?>
<div id="iParentSelector" class="smart-input-wrapper" data-src="<?= UriFactory::build('{/api}organization/unit/find?csrf={$CSRF}'); ?>">
<div
data-value=""
data-name="unit"
data-name="parent"
data-limit="10"
data-container=""
class="input-div"