diff --git a/Models/DepartmentMapper.php b/Models/DepartmentMapper.php index dad25d3..036b02a 100644 --- a/Models/DepartmentMapper.php +++ b/Models/DepartmentMapper.php @@ -34,7 +34,7 @@ final class DepartmentMapper extends DataMapperAbstract */ protected static array $columns = [ 'organization_department_id' => ['name' => 'organization_department_id', 'type' => 'int', 'internal' => 'id'], - 'organization_department_name' => ['name' => 'organization_department_name', 'type' => 'string', 'internal' => 'name'], + 'organization_department_name' => ['name' => 'organization_department_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], 'organization_department_description' => ['name' => 'organization_department_description', 'type' => 'string', 'internal' => 'description'], 'organization_department_descriptionraw' => ['name' => 'organization_department_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'], 'organization_department_parent' => ['name' => 'organization_department_parent', 'type' => 'int', 'internal' => 'parent'], diff --git a/Models/PositionMapper.php b/Models/PositionMapper.php index 21d9b0d..a58872a 100644 --- a/Models/PositionMapper.php +++ b/Models/PositionMapper.php @@ -34,7 +34,7 @@ final class PositionMapper extends DataMapperAbstract */ protected static array $columns = [ 'organization_position_id' => ['name' => 'organization_position_id', 'type' => 'int', 'internal' => 'id'], - 'organization_position_name' => ['name' => 'organization_position_name', 'type' => 'string', 'internal' => 'name'], + 'organization_position_name' => ['name' => 'organization_position_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], 'organization_position_description' => ['name' => 'organization_position_description', 'type' => 'string', 'internal' => 'description'], 'organization_position_descriptionraw' => ['name' => 'organization_position_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'], 'organization_position_parent' => ['name' => 'organization_position_parent', 'type' => 'int', 'internal' => 'parent'], diff --git a/Models/UnitMapper.php b/Models/UnitMapper.php index 1b402d9..611f8d2 100644 --- a/Models/UnitMapper.php +++ b/Models/UnitMapper.php @@ -34,7 +34,7 @@ final class UnitMapper extends DataMapperAbstract */ protected static array $columns = [ 'organization_unit_id' => ['name' => 'organization_unit_id', 'type' => 'int', 'internal' => 'id'], - 'organization_unit_name' => ['name' => 'organization_unit_name', 'type' => 'string', 'internal' => 'name'], + 'organization_unit_name' => ['name' => 'organization_unit_name', 'type' => 'string', 'internal' => 'name', 'autocomplete' => true], 'organization_unit_description' => ['name' => 'organization_unit_description', 'type' => 'string', 'internal' => 'description'], 'organization_unit_descriptionraw' => ['name' => 'organization_unit_descriptionraw', 'type' => 'string', 'internal' => 'descriptionRaw'], 'organization_unit_parent' => ['name' => 'organization_unit_parent', 'type' => 'int', 'internal' => 'parent'], diff --git a/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php b/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php index c85701f..6085114 100644 --- a/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php +++ b/Theme/Backend/Components/DepartmentTagSelector/DepartmentTagSelectorView.php @@ -38,6 +38,14 @@ class DepartmentTagSelectorView extends View */ private string $id = ''; + /** + * Dom name + * + * @var string + * @since 1.0.0 + */ + private string $name = ''; + /** * Is required * @@ -70,6 +78,18 @@ class DepartmentTagSelectorView extends View return $this->id; } + /** + * Get name + * + * @return string + * + * @since 1.0.0 + */ + public function getName() : string + { + return $this->name; + } + /** * Is required? * @@ -88,7 +108,8 @@ class DepartmentTagSelectorView extends View public function render(...$data) : string { $this->id = $data[0]; - $this->isRequired = $data[1] ?? false; + $this->name = $data[1]; + $this->isRequired = $data[2] ?? false; $this->getData('department-selector-popup')->setId($this->id); return parent::render(); diff --git a/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php b/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php index b796cd4..9592e7b 100644 --- a/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php +++ b/Theme/Backend/Components/DepartmentTagSelector/department-selector.tpl.php @@ -4,46 +4,46 @@ - - - isRequired() ? ' required' : ''; ?>> + ]' formaction=""> +
+ + +
-
+
-
\ No newline at end of file +
+ +
\ No newline at end of file diff --git a/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php b/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php index 9ab6a42..ebc208b 100644 --- a/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php +++ b/Theme/Backend/Components/PositionTagSelector/PositionTagSelectorView.php @@ -38,6 +38,14 @@ class PositionTagSelectorView extends View */ private string $id = ''; + /** + * Dom name + * + * @var string + * @since 1.0.0 + */ + private string $name = ''; + /** * Is required * @@ -70,6 +78,18 @@ class PositionTagSelectorView extends View return $this->id; } + /** + * Get name + * + * @return string + * + * @since 1.0.0 + */ + public function getName() : string + { + return $this->name; + } + /** * Is required? * @@ -88,7 +108,8 @@ class PositionTagSelectorView extends View public function render(...$data) : string { $this->id = $data[0]; - $this->isRequired = $data[1] ?? false; + $this->name = $data[1]; + $this->isRequired = $data[2] ?? false; $this->getData('position-selector-popup')->setId($this->id); return parent::render(); diff --git a/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php b/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php index 30c4df6..b55dc2e 100644 --- a/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php +++ b/Theme/Backend/Components/PositionTagSelector/position-selector.tpl.php @@ -4,46 +4,46 @@ - - - isRequired() ? ' required' : ''; ?>> +
+ + +
-
+
-
\ No newline at end of file +
+ +
\ No newline at end of file diff --git a/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php b/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php index 48dbf04..174f22a 100644 --- a/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php +++ b/Theme/Backend/Components/UnitTagSelector/UnitTagSelectorView.php @@ -38,6 +38,14 @@ class UnitTagSelectorView extends View */ private string $id = ''; + /** + * Dom name + * + * @var string + * @since 1.0.0 + */ + private string $name = ''; + /** * Is required * @@ -82,13 +90,26 @@ class UnitTagSelectorView extends View return $this->isRequired; } + /** + * Get name + * + * @return string + * + * @since 1.0.0 + */ + public function getName() : string + { + return $this->name; + } + /** * {@inheritdoc} */ public function render(...$data) : string { $this->id = $data[0]; - $this->isRequired = $data[1] ?? false; + $this->name = $data[1]; + $this->isRequired = $data[2] ?? false; $this->getData('unit-selector-popup')->setId($this->id); return parent::render(); diff --git a/Theme/Backend/Components/UnitTagSelector/unit-selector.tpl.php b/Theme/Backend/Components/UnitTagSelector/unit-selector.tpl.php index 707aae4..73b43c1 100644 --- a/Theme/Backend/Components/UnitTagSelector/unit-selector.tpl.php +++ b/Theme/Backend/Components/UnitTagSelector/unit-selector.tpl.php @@ -4,46 +4,46 @@ - - - isRequired() ? ' required' : ''; ?>> +
+ + +
-
+
-
\ No newline at end of file +
+ +
\ No newline at end of file diff --git a/Theme/Backend/department-create.tpl.php b/Theme/Backend/department-create.tpl.php index f085fc2..fff705a 100644 --- a/Theme/Backend/department-create.tpl.php +++ b/Theme/Backend/department-create.tpl.php @@ -29,9 +29,9 @@ echo $this->getData('nav')->render(); ?> - getData('department-selector')->render('iParent', false); ?> + getData('department-selector')->render('iParent', 'parent', false); ?> - getData('unit-selector')->render('iUnit', false); ?> + getData('unit-selector')->render('iUnit', 'unit', false); ?> getData('editor')->render('department-editor'); ?> getData('editor')->getData('text')->render('department-editor', 'description', 'fDepartmentCreate'); ?> diff --git a/Theme/Backend/department-list.tpl.php b/Theme/Backend/department-list.tpl.php index 21c0e52..79e26d4 100644 --- a/Theme/Backend/department-list.tpl.php +++ b/Theme/Backend/department-list.tpl.php @@ -39,7 +39,7 @@ echo $this->getData('nav')->render(); ?> $value) : ++$c; $url = \phpOMS\Uri\UriFactory::build('{/prefix}organization/department/profile?{?}&id=' . $value->getId()); ?> - + printHtml($value->getId()); ?> printHtml($value->getName()); ?> printHtml($value->getParent()->getName()); ?> diff --git a/Theme/Backend/department-profile.tpl.php b/Theme/Backend/department-profile.tpl.php index 650a97f..1f5c67b 100644 --- a/Theme/Backend/department-profile.tpl.php +++ b/Theme/Backend/department-profile.tpl.php @@ -32,9 +32,9 @@ echo $this->getData('nav')->render(); ?> - getData('department-selector')->render('iParent', false); ?> + getData('department-selector')->render('iParent', 'parent', false); ?> - getData('unit-selector')->render('iUnit', false); ?> + getData('unit-selector')->render('iUnit', 'unit', false); ?> - getData('position-selector')->render('iParent', false); ?> + getData('position-selector')->render('iParent', 'parent', false); ?> - getData('department-selector')->render('iDepartment', false); ?> + getData('department-selector')->render('iDepartment', 'department', false); ?> - getData('position-selector')->render('iParent', false); ?> + getData('position-selector')->render('iParent', 'parent', false); ?> - getData('department-selector')->render('iDepartment', false); ?> + getData('department-selector')->render('iDepartment', 'department', false); ?>